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?
• 3,771 views
•
link
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
• 1 views
•
link
Log in to answer this question.
Did you had a look at plink
Wouldn't a bedtools intersect with the peaks bed and the coordinates bed suffice?
yes indeed :)
http://bedtools.readthedocs.io/en/latest/content/tools/intersect.html
In addition to the other options, you can also tabix index the file and then use tabix.