Select only peaks that are close to a gene promoter. In case of alternative promoters or multiple peaks close to the same promoter, the reads from all the peaks and promoters are summed.
Usage
gen_promoter_features(
atac,
upstream = 500,
downstream = 50,
tss_intervals = "intervs.global.tss",
id_field = "geneSymbol"
)
Arguments
- atac
a McPeaks or ScPeaks object
- upstream
bp upstream to TSS
- downstream
bp downstread from tss
- tss_intervals
name of the intervals set with the TSS
- id_field
the field in
tss_intervals
containing the gene names. Default: "geneSymbol"
Value
the McPeaks or ScPeaks object with new peaks which are a sum of the peaks within the defined promoters. The rownames of the atac@mat
and the field 'peak_name' in atac@peaks
would contain the name of the promoter (from id_field
).
Note that previous peak metadata and previous ignored peaks are dropped.