This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extract all BED intervals between genomic coordinates

Trying to extract some DNAse HS peaks (I have the peaks as BED file), which tool would be best to use to extract all the peaks, between a set of genomic coordinates?

chip-seq sequencing bed

Wouldn't a bedtools intersect with the peaks bed and the coordinates bed suffice?

In addition to the other options, you can also tabix index the file and then use tabix.

1 answer

You can use BEDOPS bedops --element-of 1 to get peaks that overlap regions of interest by one or more bases:

$ bedops -e 1 peaks.bed regions.bed > answer.bed

If you want peaks that are completely contained inside regions, replace 1 with 100%:

$ bedops -e 100% peaks.bed regions.bed > answer.bed

Log in to answer this question.