scglue.data.extract_rank_genes_groups

scglue.data.extract_rank_genes_groups(adata, groups=None, filter_by='pvals_adj < 0.01', sort_by='scores', ascending=False)[source]

Extract result of scanpy.tl.rank_genes_groups() in the form of marker gene data frame for specific cell groups

Parameters:
  • adata (AnnData) – Input dataset

  • groups (typing.Optional[typing.List[str]]) – Target groups for which markers should be extracted, by default extract all groups.

  • filter_by (str) – Marker filtering criteria (passed to pandas.DataFrame.query())

  • sort_by (str) – Column used for sorting markers

  • ascending (str) – Whether to sort in ascending order

Return type:

DataFrame

Returns:

marker_df – Extracted marker data frame

Note

Markers shared by multiple groups will be assign to the group with highest score.