txt file process in linux
1
0
Entering edit mode
2.4 years ago
Super • 0

Dear all, How can I extract the lines with "qvalue" <0.01 and "meth.diff" >25

Best!

    chr start   end strand  pvalue  qvalue  meth.diff
1   chr1    5615    5615    +   1   0.846983772 0
2   chr1    6164    6164    +   0.758505476 0.846983772 -5.555555556
3   chr1    6223    6223    +   0.017866522 0.128440966 45.71428571
4   chr1    6230    6230    +   0.130641065 0.34493409  -14.28571429
5   chr1    7074    7074    +   1   0.846983772 0
6   chr1    7090    7090    +   0.014258153 0.117110985 42.85714286
7   chr1    7103    7103    +   0.246427048 0.483690518 -25.71428571
8   chr1    7140    7140    +   0.010863121 0.100794245 57.14285714
linux awk • 658 views
ADD COMMENT
0
Entering edit mode

This should work:

awk '$8  > 25 && $7 < 0.01' file.txt
ADD REPLY
1
Entering edit mode
2.4 years ago

Assuming that file is tab de-limited and first column is chr, try this:

$ awk 'NR==1;$5<0.01 && $7>25' input.txt
ADD COMMENT

Login before adding your answer.

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