bioalpha.singlecell.experimental.tools.find_marker
- bioalpha.singlecell.experimental.tools.find_marker(adata: AnnData, *, groupby: str | None = None, use_raw: bool | None = None, groups: Literal['all'] | Iterable[str] = 'all', reference: str = 'rest', layer: str | None = None, copy: bool | str = False, key_added: str | None = None, negative: bool = True, panel_size: int = 2, top: int = 16, connectivities_keys: str | None = 'connectivities', use_rep: str | None = 'thresholding')
Identifies marker genes.
- Parameters:
adata (
AnnData) – The annotated data matrix of shapen_obsxn_vars. Rows correspond to cells and columns to genes.groupby (
str) – The key of the observations grouping to consider.use_raw (Optional[
bool], defautl =None) – Userawattribute ofadataif present.groups (Union[
"all", Iterable[str]], default ="all") – Subset of groups, e.g. [“g1”, “g2”, “g3”], to which comparison shall be restricted, or “all” (default), for all groups.reference (
str, default ="rest") – If"rest", compare each group to the union of the rest of the group. If a group identifier, compare with respect to this group.key_added (Optional[
str], default =None) – The key inadata.unsinformation is saved to.layer (Optional[
str] , default =None) – Key fromadata.layerswhose value will be used to perform tests on.copy (
bool, default =False) – Determines whether a copy is returned.negative (
bool, default =True) – Allowed for negation terms in gene panelspanel_size (
int, default =2) – Max number of genes in panel to consider.top (
int, default =16) – Number of top panels to identify for each group.connectivities_keys (Optional[
str], default ="connectivities") – Key inadata.obspcontaining the connectivities graph.use_rep (Optional[
str], default =None) – Key inadata.unscontaining the packed matrix. If None, run thebioalpha.sc.experimental.tl.thresholding.
- Returns:
adata – If
copyisTrue, returns a new AnnData object with marker genes stored inadata.uns. IfFalse, modifies input AnnData in-place.- Return type:
AnnData