scFates.tl.test_association¶
- scFates.tl.test_association(adata, n_map=1, n_jobs=1, spline_df=5, fdr_cut=0.0001, A_cut=1, st_cut=0.8, reapply_filters=False, plot=False, copy=False, layer=None)¶
Determine a set of genes significantly associated with the trajectory.
Feature expression is modeled as a function of pseudotime in a branch-specific manner, using cubic spline regression \(g_{i} \sim\ t_{i}\) for each branch independently. This tree-dependent model is then compared with an unconstrained model \(g_{i} \sim\ 1\) using F-test.
The models are fit using mgcv R package.
Benjamini-Hochberg correction is used to adjust for multiple hypothesis testing.
- Parameters
- adata :
AnnData
Annotated data matrix.
- layer :
str
|None
Optional
[str
] (default:None
) adata layer to use for the test.
- n_map :
int
(default:1
) number of cell mappings from which to do the test.
- n_jobs :
int
(default:1
) number of cpu processes used to perform the test.
- spline_df :
int
(default:5
) dimension of the basis used to represent the smooth term.
- fdr_cut :
float
(default:0.0001
) FDR (Benjamini-Hochberg adjustment) cutoff on significance; significance if FDR < fdr_cut.
- A_cut :
int
(default:1
) amplitude is max of predicted value minus min of predicted value by GAM. significance if A > A_cut.
- st_cut :
float
(default:0.8
) cutoff on stability (fraction of mappings with significant (fdr,A) pair) of association; significance, significance if st > st_cut.
- reapply_filters :
bool
(default:False
) avoid recomputation and reapply fitlers.
- plot :
bool
(default:False
) call scf.pl.test_association after the test.
- root
restrain the test to a subset of the tree (in combination with leaves).
- leaves
restrain the test to a subset of the tree (in combination with root).
- copy :
bool
(default:False
) Return a copy instead of writing to adata.
- adata :
- Returns
adata – if copy=True it returns or else add fields to adata:
- .var[‘p_val’]
p-values from statistical test.
- .var[‘fdr’]
corrected values from multiple testing.
- .var[‘st’]
proportion of mapping in which feature is significant.
- .var[‘A’]
amplitue of change of tested feature.
- ’.var[‘signi’]`
feature is significantly changing along pseuodtime
- .uns[‘stat_assoc_list’]
list of fitted features on the tree for all mappings.
- Return type