scFates.tl.activation_lm

Contents

scFates.tl.activation_lm#

scFates.tl.activation_lm(adata, root_milestone, milestones, fdr_cut=0.05, stf_cut=0.8, pseudotime_offset=0, n_map=1, copy=False, n_jobs=-1, layer=None)#

A more robust version of tl.activation.

This is considered to be a more robust version of scFates.tl.activation(). The common path between the two fates is retained for analysis, each feature is tested for its upregulation along the path from progenitor to the fork, using the linear model \(g_{i} \sim\ pseudotime\).

Parameters:
adata AnnData

Annotated data matrix.

root_milestone

tip defining progenitor branch.

milestones

tips defining the progenies branches.

stf_cut float (default: 0.8)

fraction of projections when gene passed fdr < 0.05.

pseudotime_offset float (default: 0)

consider cells to retain up to the pseudotime_fork-pseudotime_offset.

n_map int (default: 1)

number of cell mappings from which to do the test.

n_jobs default: -1

number of cpu processes used to perform the test.

copy bool (default: False)

Return a copy instead of writing to adata.

layer default: None

layer to use for the test

Returns:

adata : anndata.AnnData if copy=True it returns or else add fields to adata:

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

classify feature as ‘early’ or ‘late’.

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

slope calculated by the linear model.

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

pval resulting from linear model.

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

corrected fdr value.

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

proportion of projections where fdr<0.05.