muon.atac.tl.count_fragments_features

muon.atac.tl.count_fragments_features#

muon.atac.tl.count_fragments_features(data: AnnData | MuData, features: DataFrame | None = None, stranded: bool = False, extend_upstream: int = 2000.0, extend_downstream: int = 0) AnnData#

Count fragments overlapping given Features. Returns cells x features matrix.

data

AnnData object with peak counts or multimodal MuData object with ‘atac’ modality.

features

A DataFrame with feature annotation, e.g. genes. Annotation should contain columns (case-insensitive): chr/chrom/chromosome (longer takes precedence), start, end.

stranded

Use strand information for each feature. Has to be encoded as a “strand” (case-insensitive) column in features. When stranded=True, extend_upsteam and extend_downstream will be used according to each feature’s strand information.

extend_upsteam

Number of nucleotides to extend every gene upstream (2000 by default to extend gene coordinates to promoter regions)

extend_downstream

Number of nucleotides to extend every gene downstream (0 by default)