ChIPpeakAnno: Non-empty IRange object in case of no overlap
1
0
Entering edit mode
@jens-preussner-6712
Last seen 5.0 years ago
Germany

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:

library(“ChIPpeakAnno”)

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)

TRUE

Thanks and best regards,

Jens

Edit: Files are available as gist:

chippeakanno iranges • 1.3k views
ADD COMMENT
2
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 5 months ago
United States

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

Best, 

Julie

 

 

 

 

 

 

ADD COMMENT

Login before adding your answer.

Traffic: 720 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6