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 shape n_obs x n_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) – Use raw attribute of adata 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 in adata.uns information is saved to.

  • layer (Optional[str] , default = None) – Key from adata.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 panels

  • panel_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 in adata.obsp containing the connectivities graph.

  • use_rep (Optional[str], default = None) – Key in adata.uns containing the packed matrix. If None, run the bioalpha.sc.experimental.tl.thresholding.

Returns:

adata – If copy is True, returns a new AnnData object with marker genes stored in adata.uns. If False, modifies input AnnData in-place.

Return type:

AnnData