parse csv file
1
0
Entering edit mode
15 months ago

How can I parse a csv file based on P.value and Adjusted.P.value.

,Term,Overlap,P.value,Adjusted.P.value,Old.P.value,Old.Adjusted.P.value,Odds.Ratio,Combined.Score,Genes
1,positive regulation of leukocyte mediated cytotoxicity (GO:0001912),15/43,9.50675988639601e-06,0.031981677891461,0,0,4.85030586541922,56.0865479873029

awk -F, '($4 <= .05) { print }' file_name.csv

What is the problem in this command?

awk csv • 486 views
ADD COMMENT
1
Entering edit mode
15 months ago
iraun 6.2k

Just simplify it as:

awk -F, '$4<=.05' file_name.csv

Alternatively:

awk -F, '{ if ( $4 <= .05 ){ print } }' file_name.csv
ADD COMMENT

Login before adding your answer.

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