stereo.core.StPipeline.find_marker_genes#
- StPipeline.find_marker_genes(cluster_res_key, method='t_test', case_groups='all', control_groups='rest', corr_method='benjamini-hochberg', use_raw=True, use_highly_genes=True, hvg_res_key='highly_variable_genes', res_key='marker_genes', output=None, sort_by='scores', n_genes='all', ascending=False, n_jobs=4)[source]#
A tool to find maker genes. For each group, find statistical test different genes between one group and the rest groups using
t_test
orwilcoxon_test
.- Parameters:
cluster_res_key – the key of clustering to get corresponding result from
self.result
.method (
Literal
['t_test'
,'wilcoxon_test'
]) – choose method for statistics.case_groups (
Union
[str
,ndarray
,list
]) – case group, default all clusters.control_groups (
Union
[str
,ndarray
,list
]) – control group, default the rest of groups.corr_method (
str
) – correlation method.use_raw (
bool
) – whether to use raw express matrix for analysis, default True.use_highly_genes (
bool
) – whether to use only the expression of hypervariable genes as input, default True.hvg_res_key (
Optional
[str
]) – the key of highly variable genes to get corresponding result.res_key (
str
) – the key for storing result of marker genes.output (
Optional
[str
]) – the path to output file.csv
. If None, do not generate output file.sort_by – default to ‘scores’, the result will sort by the key, other options ‘log2fc’.
n_genes (
Union
[str
,int
]) – default to 0, means will auto calculate n_genes by N = 10000/K². K is cluster number, and N is larger or equal to 1, less or equal to 50.ascending (
bool
) – default to False.n_jobs (
int
) – the number of parallel jobs to run. default to 4.
- Returns:
The result of marker genes is stored in
self.result
where the key is'marker_genes'
.