Finding intergenic regions in bed file?
1
0
Entering edit mode
7.5 years ago
pavep • 0

How would I find the intergenic regions on a bed file using an awk script and separating the strands by + and -?

awk • 4.6k views
ADD COMMENT
6
Entering edit mode
7.5 years ago
novice ★ 1.1k

1) You need to know the size of each chromosome to find all intergenic regions.
2) Do you have to limit yourself to awk? It is smarter to make use of available tools, like BEDTools:

bedtools complement -i genes.bed -g genome.txt > intergenic.bed

where genome.txt looks something like this:

chr1    249250621
chr2    243199373
...
ADD COMMENT
0
Entering edit mode

Does this take care of overlapping genes?

ADD REPLY

Login before adding your answer.

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