This is a test version of Biostars. For the public version, visit https://www.biostars.org.
quary relted to ChIPpeakAnno & VennDiagram

so i am running this simple code for overlapping of replicates so can anybody help me regrading standard "maxgap"...

library(VennDiagram)
library(ChIPpeakAnno)

# Read in your peak data
peaks1 <- toGRanges("EREB108_rep1_summits.bed")
peaks2 <- toGRanges("EREB108_rep2_summits.bed")
peaks3 <- toGRanges("EREB108_rep12_summits.bed")
peaks4 <- toGRanges("EREB108_rep21_summits.bed")

# Find overlapping peaks
overlap <- findOverlapsOfPeaks(peaks1, peaks2,peaks3,peaks4, maxgap=10)

# Plot the Venn diagram
makeVennDiagram(overlap)
r chip-seq

1 answer

Why choose 10? Rather than a standard, I think it is more important understand what the parameter does.

If you want to allow a gap between peaks to call them as overlapped, increase maxgap. Otherwise, keep default parameters (maxgap=0, minoverlap=1) where it looks for peaks with at least 1bp of overlap. maxgap=0 means peaks cannot have any distance between them. This should be acceptable to most people.

For overlapping replicates, however, I would prefer stringency where you keep maxgap=0 and maybe increase minoverlap=100

This would mean for each replicate, the peaks must at least occupy the same 100bp to be considered common to all reps, which I would expect if replicates agree well.

Log in to answer this question.