deconvatac.pp#

Submodules#

Functions#

highly_variable_peaks(adata, cluster_key[, layer, ...])

Selects highly variable features the "var" way.

highly_accessible_peaks(adata[, layer, ...])

Selects the most accessible peaks from the given AnnData object.

reads_to_fragments(→ None)

Convert scATAC-seq read counts to appoximate fragment counts.

Package Contents#

deconvatac.pp.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.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’].

deconvatac.pp.reads_to_fragments(adata: anndata.AnnData, read_layer: str | None = None, fragment_layer: str = 'fragments') None#

Convert scATAC-seq read counts to appoximate fragment counts.

Parameters#

adata

AnnData object that contains read counts.

read_layer

Key in`.layer` that the read counts are stored in.

fragment_layer

Key in`.layer` that the fragment counts will be stored in.

Returns#

Adds layer with fragment counts in .layers[fragment_layer].