Question: ChIPpeakAnno: Non-empty IRange object in case of no overlap
gravatar for Jens Preussner
3.3 years ago by
Jens Preussner10 wrote:

Dear Julie,

when using the annotatePeakInBatch function of your ChIPpeakAnno package with non-overlapping peaks and annotation, the resulting object equals the input peaks.

Is this intended? How would I know that there is no overlap then? I used a work-around with all(ovl == peaks) to check if the result contains the same entries as the peaks (see below).

Code to reproduce:


peaks = BED2RangedData(file.path(“peaks.bed”),header=F)

annotation = GFF2RangedData(file.path(“annotation.gff”),header=F,comment.char=”#”,sep=”\t”)

ovl = annotatePeakInBatch(peaks, AnnotationData = annotation, output = 'overlapping', maxgap = 0, select = "all", FeatureLocForDistance = "TSS")

all(ovl == peaks)


Thanks and best regards,


Edit: Files are available as gist:

ADD COMMENTlink modified 3.3 years ago by Julie Zhu3.8k • written 3.3 years ago by Jens Preussner10
gravatar for Julie Zhu
3.3 years ago by
Julie Zhu3.8k
United States
Julie Zhu3.8k wrote:

Dear Jens,

It is intended. You will notice that there is no annotation added to the peaks without overlap.  This function is intended for annotating peaks. If you are interested in finding overlapping peaks only, I suggest you use function findOverlappingPeaks. For example, t1 <-   findOverlappingPeaks(peaks1, peaks2, maxgap=1000, NameOfPeaks1="TF1", NameOfPeaks2="TF2", select="all", annotate=1) 
r = t1$OverlappingPeaks









ADD COMMENTlink written 3.3 years ago by Julie Zhu3.8k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 216 users visited in the last hour