Cell trees (GPU)¶
The CPU twin is bixverse.trees.
trees
¶
GPU Bonsai.
Returns the bixverse.trees.BonsaiTree the CPU bonsai returns. Only Sanity
moves to the GPU, gene chunk by gene chunk; the tree search and the layout
stay on the CPU.
bonsai
¶
bonsai(
sc: SingleCells | MetaCells,
*,
hvg: ndarray | Sequence[int] | None = None,
bonsai_params: BonsaiParams | None = None,
verbose: Verbose = True,
) -> BonsaiTree
A Bonsai tree over the cells or meta cells with Sanity on the GPU.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sc
|
SingleCells | MetaCells
|
The experiment or meta cells. |
required |
hvg
|
ndarray | Sequence[int] | None
|
0-based candidate genes. |
None
|
bonsai_params
|
BonsaiParams | None
|
The parameters. |
None
|
verbose
|
Verbose
|
|
True
|
Returns:
| Type | Description |
|---|---|
BonsaiTree
|
The |
Raises:
| Type | Description |
|---|---|
ValueError
|
On a gene index out of range, or if no gene survives the signal-to-noise filter. |
BixverseError
|
Without a GPU adapter that runs plane operations. |
References
de Groot, et al., Nat. Biotechnol., 2026; Breda, et al., Nat. Biotechnol., 2021.