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_obs
xn_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
) – Useraw
attribute ofadata
if 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.uns
information is saved to.layer (Optional[
str
] , default =None
) – Key fromadata.layers
whose 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.obsp
containing the connectivities graph.use_rep (Optional[
str
], default =None
) – Key inadata.uns
containing the packed matrix. If None, run thebioalpha.sc.experimental.tl.thresholding
.
- Returns:
adata – If
copy
isTrue
, returns a new AnnData object with marker genes stored inadata.uns
. IfFalse
, modifies input AnnData in-place.- Return type:
AnnData