Skip to contents

Subset peaks of an McPeaks object

Usage

subset_peaks(atac_mc, peak_set)

Arguments

atac_mc
  • an McPeaks object

peak_set
  • a subset of peaks of atac_mc@peaks to keep

Value

the atac_mc object only with the peaks of interest (not saved in the "ignore_..." slots)

Examples

if (FALSE) {
## Use "default clustering" - the existing annotations
mc_clusters <- gen_atac_mc_clust(my_atac_mc, use_prior_annot = T)

## Identify peaks of interest, namely peaks neighboring a set of feature genes, and subset by them
nei_peaks_feat_genes <- gintervals.neighbors(my_atac_mc@peaks, tss[tss$name %in% feature_genes, ], maxdist = 5e+5)
peaks_of_interest <- nei_peaks_feat_genes[, c("chrom", "start", "end")]
mc_clusters <- subset_peaks(my_atac_mc, peaks_of_interest)
}