Skip to contents

ATAC peaks are classified into either 'promoter', 'intronic', 'exonic', 'ig_proximal' (intergenic-proximal), 'ig_distal' (intergenic-distal) or 'desert'.
Promoter peaks are those less than min_proximal away from a TSS.
Intronic peaks are within gene bodies, but not in an exon.
Exonic peaks overlap exons.
Intergenic-proximal peaks are less than max_proximal away from a TSS, but not within a gene body.
Intergenic-distal peaks are more than min_distal away from some TSS, and less than max-distal from any TSS, and not within a gene body.
Desert peaks are at least max_distal from any known TSS (as defined by the tss interval set).

Usage

annotate_intervals(
  intervals,
  genome,
  min_proximal = 1000,
  max_proximal = 20000,
  min_distal = max_proximal,
  max_distal = 1000000,
  exonic_peak_dist = 0,
  tss = "intervs.global.tss",
  exons = "intervs.global.exon"
)

Arguments

intervals

the intervals set to annotate

genome

which genome/genomic database to use (e.g. 'mm10', 'hg19')

min_proximal

the minimum distance from a TSS, under which a peak is considered to be a promoter peak, and beyond (or at) which it is a proximal enhancer.

max_proximal

the minimum distance from a TSS, under which a peak is considered to be a proximal enhancer peak, and beyond (or at) which it is not.

min_distal

the minimum distance from some TSS, only above which a peak is considered to be of a distal enhancer. Usually equal to max_proximal, unless there is good reason

max_distal

the maximum distance from any TSS, under which a peak is considered to be of a distal enhancer, and above which it is a 'desert' peak.

exonic_peak_dist

a parameter that allows proximity (without overlap) of peaks to exons that still classifies them as exonic peaks, as active transcription usually confers accessibility in the vicinity of exons, and this might confound a possible assignment of regulatory activity to an exon.

tss

the TSS interval set or the name of the TSS interval set to use.

exons

the exons interval set or the name of the exons interval set to use.

Value

intervals - the input intervals set with added fields .code peak_type, .code closest_tss, .code closest_exon_gene and .code gene_body_gene.

Examples

if (FALSE) {
my_intervals <- annotate_intervals(my_intervals, "mm10", min_proximal = 1e+03, max_proximal = 2e+04, max_distal = 1e+06, exonic_peak_dist = 5e+2)
table(my_intervals$peak_type)
my_intervals[which(toupper(my_intervals$closest_tss) == "PCNA"), ]
}