Skip to content

Pathways (GPU)

The CPU twin is bixverse.pathways.

pathways

GPU SCENIC GRN inference.

Returns the bixverse.pathways.ScenicGrn the CPU scenic_grn returns. The tree ensembles run on the GPU; the target gene filter is the CPU one. Only the tree learners ("randomforest", "extratrees") have a GPU path.

scenic_grn

scenic_grn(
    sc: ScOrMc,
    tf_ids: Sequence[str],
    *,
    scenic_params: ScenicParams | None = None,
    wave_byte_budget: int = WAVE_BYTE_BUDGET,
    genes_to_take: Sequence[str] | None = None,
    cells_to_take: Sequence[str] | None = None,
    streaming: bool | None = None,
    seed: int = 42,
    verbose: Verbose = True,
) -> ScenicGrn

GRN inference with the tree ensembles on the GPU.

Parameters:

Name Type Description Default
sc ScOrMc

The experiment, a subset or meta cells.

required
tf_ids Sequence[str]

The TF gene ids; ids not in the object warn and drop.

required
scenic_params ScenicParams | None

The parameters, a tree learner. None uses the defaults.

None
wave_byte_budget int

VRAM budget per wave of trees, in bytes.

WAVE_BYTE_BUDGET
genes_to_take Sequence[str] | None

Target gene ids. None runs the CPU gene filter.

None
cells_to_take Sequence[str] | None

Cell (meta cell) ids. None for the kept cells.

None
streaming bool | None

Stream the targets. None decides by size; unused for meta cells.

None
seed int

Seed for the learners.

42
verbose Verbose

0 (False) silent, 1 (True) progress, 2 extra detail where the method has it.

True

Returns:

Type Description
ScenicGrn

The ScenicGrn.

Raises:

Type Description
ValueError

With the gradient boosting learner, or if no TF is in the object or none passes as a target.

BixverseError

Without a GPU adapter.

References

Aibar, et al., Nat. Methods, 2017.