pegasus.markers¶
-
pegasus.
markers
(data, head=None, de_key='de_res', alpha=0.05)[source]¶ Extract DE results into a human readable structure.
This function extracts information from
data.varm[de_key]
, and return as a human readible dictionary of pandas DataFrame objects.- Parameters
data (
MultimodalData
,UnimodalData
, oranndata.AnnData
) – Data matrix with rows for cells and columns for genes.head (
int
, optional, default:None
) – List only tophead
genes for each cluster. IfNone
, show any DE genes.de_key (
str
, optional, default,de_res
) – Keyword of DE result stored indata.varm
.alpha (
float
, optional, default:0.05
) – q-value threshold for getting significant DE genes. Only those with q-value of any test no less thanalpha
are significant, and thus considered as DE genes.
- Returns
results – A Python dictionary containing markers. If DE is performed between clusters, the structure is
dict[cluster_id]['up' or 'down'][dataframe]
. If DE is performed between conditions within each cluster, the structure isdict[cluster_id][condition_id]['up' or 'down'][dataframe]
.- Return type
Dict[str, Dict[str, pd.DataFrame]]
Examples
>>> marker_dict = pg.markers(data)