Meta cells (GPU)¶
The CPU twin is bixverse.metacells.
metacells
¶
GPU SEACells.
Returns the bixverse.metacells.MetaCells the CPU generate_seacells
returns. Both Frank-Wolfe solves run on the GPU; kernel construction,
archetype initialisation, the kNN and the aggregation are the CPU steps.
generate_seacells
¶
generate_seacells(
sc: ScOrScSubset,
seacell_params: SeacellsParams,
*,
embd_to_use: str = "pca",
no_embd_to_use: int | None = None,
cells_to_use: Sequence[str] | None = None,
regenerate_knn: bool = False,
target_size: float = 100000.0,
seed: int = 42,
verbose: Verbose = True,
backend: Backend = "wgpu",
) -> MetaCells
SEACells with the fit on the GPU.
Inputs, kNN reuse and the result are those of
bixverse.metacells.generate_seacells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sc
|
ScOrScSubset
|
The experiment or a subset of it. |
required |
seacell_params
|
SeacellsParams
|
The SEACells and kNN parameters; |
required |
embd_to_use
|
str
|
The embedding, |
'pca'
|
no_embd_to_use
|
int | None
|
Leading embedding dimensions to use. |
None
|
cells_to_use
|
Sequence[str] | None
|
Cell ids to restrict the meta cells to. |
None
|
regenerate_knn
|
bool
|
Build the kNN on the embedding. |
False
|
target_size
|
float
|
Library size to normalise the meta cells to. |
100000.0
|
seed
|
int
|
Seed. |
42
|
verbose
|
Verbose
|
|
True
|
backend
|
Backend
|
|
'wgpu'
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If the embedding is missing, or it or the kNN is stale. |
BixverseError
|
Without a GPU adapter, or with |
References
Persad, et al., Nat Biotechnol, 2023.