Extract all BED intervals between genomic coordinates
1
0
Entering edit mode
7.6 years ago

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 • 3.1k views
ADD COMMENT
2
Entering edit mode

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

ADD REPLY
0
Entering edit mode

yes indeed :)

bedtools intersect [OPTIONS] -a <FILE>  -b <FILE1, FILE2, ..., FILEN>

http://bedtools.readthedocs.io/en/latest/content/tools/intersect.html

ADD REPLY
1
Entering edit mode

Did you had a look at plink

ADD REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode
7.6 years ago

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
ADD COMMENT

Login before adding your answer.

Traffic: 2536 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