Metadata-Version: 2.4
Name: bixverse-gpu
Version: 0.3.1
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Dist: bixverse
Requires-Dist: beartype>=0.19
Requires-Dist: numpy>=1.23
Requires-Dist: polars>=2.0.0
Requires-Dist: manifolds-rs>=0.6.0
Summary: GPU twins of the bixverse single cell methods, on wgpu, in Rust.
Author-email: Gregor Lueg <gregorlueg@me.com>
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/GregorLueg/bixverse-rs

# bixverse-gpu

GPU twins of the [bixverse](https://github.com/GregorLueg/bixverse-rs) single
cell methods, on wgpu, in Rust. Import it as `bixverse_gpu`.

## Install

```bash
uv pip install "bixverse[gpu]"
```

This pulls `bixverse` and `manifolds-rs` (the GPU UMAP, densMAP, t-SNE and
PHATE run there). For those twins you'll want `bixverse[gpu,embed]`. There is no
GPU den-SNE or ForceAtlas2; use the `bixverse.embed` ones.

## Layout

Each module mirrors its `bixverse` namesake: `pp`, `graph`, `embed`,
`integrate`, `de`, `doublets`, `metacells`, `nmf`, `pathways` and `trees`. The
functions take the same `SingleCells` objects, write the same cache slots (bar
Harmony and fastMNN, which write `harmony_gpu` and `mnn_gpu`) and obs columns
and return the same result types, so a pipeline swaps one import
for the other. GPU-specific knobs live in `bixverse_gpu.params`; everything
else takes the `bixverse.params` bundles.

```python
import bixverse as bv
import bixverse_gpu as bvg

bv.pp.find_hvg(sc, hvg_no=2000)
bvg.pp.calculate_pca(sc, 30)
bvg.graph.find_neighbours(sc)
bvg.graph.find_clusters(sc, res=1.0, name="leiden_clusters")
```

`bvg.gpu_available()` probes for an adapter. Without one the twins raise
`bixverse.BixverseError`. A few results get their own name in the cache
(`harmony_gpu`, `mnn_gpu`).

