Filtering BED file for interval length
1
0
Entering edit mode
4.6 years ago
rbronste ▴ 420

Wondering about a quick and easy way to filter a 3 column bed file for interval length, lets say to toss all of the intervals above 1000bp in length. Thanks.

bedtools bed bedops • 2.7k views
ADD COMMENT
4
Entering edit mode
4.6 years ago
alex.zaccaron ▴ 410

awk should work fine:

awk '{if($3-$2 <= 1000) print}' file.bed > file_filtered.bed
ADD COMMENT

Login before adding your answer.

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