scFates.tl.module_inclusion

scFates.tl.module_inclusion(adata, root_milestone, milestones, w=300, step=30, pseudotime_offset=0, module='early', n_perm=10, n_map=1, map_cutoff=0.8, n_jobs=1, alp=10, autocor_cut=0.95, iterations=15, parallel_mode='window', identify_early_features=False, layer=None, perm=False, winp=10, copy=False)

Estimates the pseudotime onset of a feature within its fate-specific module.

Parameters
adata

Annotated data matrix.

root_milestone

tip defining progenitor branch.

milestones

tips defining the progenies branches.

w : int (default: 300)

local window, in number of cells, to estimate correlations.

step : int (default: 30)

steps, in number of cells, between local windows.

pseudotime_offset : all | floatUnion[all, float] (default: 0)

restrict the cell selection up to a pseudotime offset after the fork

module : {‘all’, ‘early’}Literal[‘all’, ‘early’] (default: 'early')

restrict the gene selection to already classified early genes.

n_perm : int (default: 10)

number of permutations used to estimate the background local correlations.

n_map : int (default: 1)

number of probabilistic cells projection to use for estimates.

map_cutoff : float (default: 0.8)

proportion of mapping in which inclusion pseudotimne was found for a given feature to keep it.

n_jobs : int (default: 1)

number of cpu processes to perform estimates.

alp : int (default: 10)

parameter regulating stringency of inclusion event.

autocor_cut : float (default: 0.95)

cutoff on correlation of inclusion times between sequential iterations of the algorithm to stop it.

iterations : int (default: 15)

maximum number of iterations of the algorithm.

parallel_mode : {‘window’, ‘mappings’}Literal[‘window’, ‘mappings’] (default: 'window')

whether to run in parallel over the windows of cells or the mappings.

identify_early_features : bool (default: False)

classify a feature as early if its inclusion pseudotime is before the bifurcation

layer

adata layer to use for estimates.

perm : bool (default: False)

do local estimates for locally permuted expression matrix.

winp : int (default: 10)

window of permutation in cells.

copy : bool (default: False)

Return a copy instead of writing to adata.

Returns

adata – if copy=True it returns subsetted or else subset (keeping only significant features) and add fields to adata:

.uns[‘root_milestone->milestoneA<>milestoneB’][‘module_inclusion’]

Dataframes ontaining inclusion timing for each gene (rows) in each probabilistic cells projection (columns).

.uns[‘root_milestone->milestoneA<>milestoneB’][‘fork’]

Updated with ‘inclusion’ pseudotime column and ‘module column if identify_early_features=True

Return type

anndata.AnnData