deconvatac.pp.feature_selection#
Functions#
|
Selects highly variable features the "var" way. |
|
Selects the most accessible peaks from the given AnnData object. |
Module Contents#
- deconvatac.pp.feature_selection.highly_variable_peaks(adata: anndata.AnnData, cluster_key: str, layer: str = None, scale: float = 1, n_top_features: int = 20000)#
Selects highly variable features the “var” way.
Adapted from: GreenleafLab/ArchR
Parameters#
- adata: AnnData
AnnData object of the (reference) scATAC data.
- cluster_key: str
Name of column in adata.obs containing the clusters.
- layer: str
Layer of the raw counts. If None, uses .X
- scale: float
Scale factor, i.e. log2((sums/feature_sums) *scale + 1).
- n_top_features: int
How many features to select.
Returns#
Saves a boolean indicator of the HVPs in place to adata.var[‘highly_variable’].
- deconvatac.pp.feature_selection.highly_accessible_peaks(adata: anndata.AnnData, layer: str = None, n_top_features: int = 20000, copy: bool = False)#
Selects the most accessible peaks from the given AnnData object.
Parameters#
- adata: AnnData
Annotated data object containing the peaks.
- layer: str
Name of the layer to use for peak accessibility.
- n_top_features: int
Number of top accessible peaks to select.
- copy: bool
Whether to copy the AnnData object.
Returns#
AnnData object with the highly accessible peaks saved to adata.var[‘highly_accessible’].