Filtering BED file for interval length
1
0
Entering edit mode
5.2 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.9k views
ADD COMMENT
4
Entering edit mode
5.2 years ago
alex.zaccaron ▴ 470

awk should work fine:

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

Login before adding your answer.

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