Question: ChIPpeakAnno: Non-empty IRange object in case of no overlap
gravatar for Jens Preussner
4.9 years ago by
Jens Preussner30 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:

iranges chippeakanno • 774 views
ADD COMMENTlink modified 4.9 years ago by Julie Zhu4.1k • written 4.9 years ago by Jens Preussner30
Answer: ChIPpeakAnno: Non-empty IRange object in case of no overlap
gravatar for Julie Zhu
4.9 years ago by
Julie Zhu4.1k
United States
Julie Zhu4.1k 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 4.9 years ago by Julie Zhu4.1k
Please log in to add an answer.


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