This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filter .bed file by numbers in final column

Hi,

I would like to filter a .bed file by numbers in the last column:

chr1    0       14400   18
chr1    14400   19000   6
chr1    19000   567400  18
chr1    567400  567800  10
chr1    567800  713200  18
chr1    713200  713800  2
chr1    713800  714600  1
chr1    714600  715400  2
chr1    715400  724000  6

How can I create a new file with lines that only contain 1,2 and 18? like this:

chr1    0       14400   18
chr1    19000   567400  18
chr1    567800  713200  18 
chr1    713200  713800  2
chr1    713800  714600  1
chr1    714600  715400  2

Would it involve using the awk command?

Many Thanks

bed file filter sequence genomic

Hello kdecoteau!

We believe that this post does not fit the main topic of this site.

Just an awk question, not really bioinformatics.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

0 answers

No answers yet.

Log in to answer this question.