This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filter rows below a given threshold

Hey everyone,

I have a numeric matrix like this one

1       4       0.439453125
1       5       0.03662109375
1       6       0.49609375
1       9       0.4384765625
1       14      0.55322265625
1       18      1

I would like to remove all rows with a threshold <0.3 based on the 3rd column. Could you help me out? Thanks!

sequence

...tell me what you have already tried?

... ¿dime lo que has ya intentado?

1 answer

To remove rows from a tab-delimited text file, where the third column is less than 0.3:

$ awk -v FS="\t" -v OFS="\t" '($3>=0.3)' in.txt > out.txt

Log in to answer this question.