Thank you very much zx8754 :) it works.
• 0 views
•
link
How can we get total number of SNPs in plink association output file as "qassoc" and "adjusted file" which has less than 0.05 P values?
From the plink manuals the pvalue column for qassoc file is the 9th. So we can use awk to keep the 1st row header, then filter on 9th column value, see example:
awk '(NR==1) || ($9 < 0.05) ' myfile.qassoc > myfile_subset.qassoc
To get the number of rows:
awk '$9 < 0.05' myfile.qassoc | wc -l
Thank you very much zx8754 :) it works.
Hi aarvaBioinfo,
If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.

Log in to answer this question.
please post some example lines from that files.