dotools_py.tl.run_mast#
- dotools_py.tl.run_mast(adata, cond_key, reference, disease, covariates=None)[source]#
Run MAST Test for sc/snRNAseq.
- Parameters:
- Return type:
- Returns:
Returns a
DataFrame. The following fields are included:GeneNameName of the genes
pvalsandpadjThe adjusted p-value uses Benjamini-Hochberg correction method.
log2fcLog2FoldChamge
pts_refandpts_groupPercentage of cells in the reference in the disease group expressing the gene
groupsColumn containing the group tested
See also
dotools_py.tl.rank_genes_groups()run DEA at single-cell level
dotools_py.tl.grouped_ttest()run DEA at pseudobulk level
Example
>>> import dotools_py as do >>> adata = do.dt.example_10x_processed() >>> df = do.tl.run_mast(adata, "condition", "healthy", "disease") >>> df.head(5) GeneName pvals log2fc padj pts_ref pts_group groups 0 A4GALT 0.001722 -1.018231 0.015546 0.003846 0.000000 disease 1 AAK1 0.019197 0.517996 0.105754 0.457692 0.516667 disease 2 ABAT 0.551787 1.530515 0.842536 0.000000 0.000000 disease 3 ABCB4 0.581264 -1.968762 0.842536 0.176923 0.050000 disease 4 ABCB9 0.458918 -1.468043 0.808238 0.121154 0.044444 disease