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

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:

ADD COMMENTlink modified 3.5 years ago by Julie Zhu3.8k • written 3.5 years ago by Jens Preussner30
2
gravatar for Julie Zhu
3.5 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

Best, 

Julie

 

 

 

 

 

 

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

Help
Access

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