Skip to main content

Crate bixverse_rs

Crate bixverse_rs 

Source
Expand description

Highly optimised code for computational biology: statistics, enrichment, graphs, matrix factorisation, a single cell suite and GPU backends.

This crate is a facade. The code lives in the bixverse-* crates; this one re-exports them under the module paths the crate has always had, so a consumer that wants everything only needs one dependency and a consumer that wants one layer can depend on that crate directly.

§Feature flags

  • accelerate (enabled by default) — Routes dense CPU GEMMs through Apple Accelerate on macOS (no effect elsewhere). Decompositions (SVD, eigen) stay on faer, which is faster there.
  • dge — The negative binomial differential expression methods built on edge-rs. Implied by single-cell, but usable on its own for the bulk half.
  • single-cell — The single cell suite and the bixverse binary store. No HDF5: add h5 for the h5ad and 10x h5 readers.
  • h5 — The h5ad and 10x h5 readers and writers. Pulls in HDF5.
  • hdf5-static — Compile the bundled HDF5 C library from source. See bixverse-sc-data.
  • hdf5-filters — Compile the LZF and Blosc filters into the HDF5 build. See bixverse-sc-data.
  • parquet — Parquet export of the h5ad obs / var and 10x barcodes / features. See bixverse-sc-data.
  • multi-modal — Multi-modal single cell analysis (requires single-cell)
  • bonsai — Bonsai trees over single cell counts via bonsai-rs, with Sanity posteriors as the input (requires single-cell)
  • gpu — GPU linear algebra and bulk methods via cubecl
  • sc-gpu — GPU single cell methods (requires gpu and single-cell)
  • mlx — Experimental, Apple Silicon only: MLX backend via mlx-c. Independent of gpu. Needs brew install mlx-c (or MLX_C_PREFIX pointing at an install prefix); without the library the build warns and the backend is skipped.
  • large-test — Slow but asserting tests: the GPU parity gates and the large-scale numerical checks. Run in release or the CPU reference solves dominate.
  • large_scale_diagnostics — Unasserted diagnostic sweeps that print tables for a human to read.

Modules§

core
Various core functions that include mathematical functions used across different methods in this crate, think correlation, distance metrics, linear algebra). Additionally, also has synthetic data for assumption testing on bulk data.
enrichment
Methods for the calculation of gene set enrichment statistics. The module contains overenrichment analysis, gene set variation analysis, gene set enrichment analysis (fgsea and blitzGSEA), mitch multi-dimensional enrichment and decoupler-style linear model activity scores (ULM, MLM).
errors
The error enums of every crate compiled in. Each upper enum wraps the ones below it, so ? converts upwards.
graph
Module contains all of the graph-based algorithms within bixverse-rs.
methods
This module contains Rust-based methods of various common bioinformatics methods, accelerated and optimised were possible via multi-threading and data structures with good cache locality
ml
Various machine learning implementations that can be useful for bioinformatics, such as clustering methods, etc.
ontology
Methods that work on ontologies, think Gene Ontology or Disease/Phenotype ontologies with relationships like ancestry, part of, etc.
prelude
The union of the preludes of every crate compiled in.
single_cell
Single cell and metacell analysis.
utils
All type of utility modules with shared code that does not fit fully into other modules. Has assertion macros, structures designed for the heap, traits and their implementations, R <> Rust interface functions and more.

Constants§

MLX_AVAILABLE
Whether the MLX backend was compiled in: the mlx feature is on and the build script found libmlxc.
VERSION
Version of this crate.