bioalpha.singlecell.tools.aucell
- bioalpha.singlecell.tools.aucell(adata: AnnData | H5ADMap, gene_sigs: str | Sequence[GeneSignature] = 'gene_sigs', auc_threshold: float = 0.05, normalize: bool = True, key_added: str = 'aucell', copy: bool | str = False, csr_key: str = 'layers/X_csr', **kwargs) AnnData | H5ADMap | None
Calculate enrichment of gene signatures for single cells.
- Parameters:
adata (
AnnData
) – The annotated data matrix of shapen_obs
xn_vars
. Rows correspond to cells and columns to genes.gene_sigs (Union[
str
, Sequence[GeneSignature
]], default ="gene_sigs"
) – The gene signatures for calculate scores. If a key(str
) is passed,adata.uns[key]
will be used as gene signatures.auc_threshold (
float
, default =0.05
) – The fraction of the ranked genome to take into account for the calculation of the Area Under the recovery Curve.normalize (
bool
, default =True
) – Normalize the AUC values to a maximum of1.0
per regulon.key_added (Optional[
str
], default ="aucell"
) – Name of the field inadata.obsm
where the aucell score is stored.copy (
bool
orstr
, default =False
) – Whether to modify copied input object. Ifadata
is mapping AnnData, copy will beFalse
orPath
.csr_key (
str
, default ="layers/X_csr"
) – Key for runto_csr()
when run on disk.kwargs (
dict
) – Any additional arguments will be passed to_sctools.enrichment.aucell
.
- Returns:
adata – If
copy=True
it returns or else adds fields toadata
.obsm[
key_added
] : AUC scores of each genes sets.
- Return type:
AnnData