Extracting Snps with pvalue <5x10-8 from gwas result
1
0
Entering edit mode
3.8 years ago
brendaumoh6 ▴ 10

I am working on Multivariate GWAS analysis and I have my results output from the analysis. I would like to extract Snps which have the pvalue < 5x10-8. However,I used

awk '{ if($4 < 5e-8) { print $1 }}' file | head

and

awk '{ if($4 < 0.00000005) { print $1 }}' file |  head

This two commands didnt output any data.

SNP • 1.0k views
ADD COMMENT
0
Entering edit mode

what does the input look like ? show us a few lines.

ADD REPLY
0
Entering edit mode
CHR     SNP     POS     P
1       rs147324274     11063   0.788453971217744
1       rs144804129     30741   0.3335653075464541
1       rs6602381       51427   0.7555139906863562
1       rs189891329     58396   0.9016132067991081
1       rs114824410     69487   0.44423311912092556
1       rs573719411     69569   0.23298959712788614
1       rs574200131     77470   0.7608982219420641
1       rs538386461     85435   0.1200837784195348
1       rs751479053     108658  0.021944278384597855

Above is my dataset

ADD REPLY
0
Entering edit mode

Make sure you have such p-values. Maybe try with $4<=0.01 ?

ADD REPLY
0
Entering edit mode

Thanks for the input. I used the previous command with another dataset and there was an output. I then sorted my data and discovered that there was no pvalues at that threshold. In conclusion the problem wasnt from the command but rather from the dataset.

ADD REPLY
0
Entering edit mode
3.8 years ago

with the example your provided above, the following awk script works:

awk '($4<1E-1) {print $1}' input.txt

furthermore: check your LOCALE : https://www.gnu.org/software/gawk/manual/html_node/Locale-influences-conversions.html

ADD COMMENT

Login before adding your answer.

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