Menggg / BLINK

BLINK: A Package for Next Level of Genome Wide Association Studies with Both Individuals and Markers in Millions
http://www.zzlab.net/blink/index.html
30 stars 10 forks source link

Small bug in --trait 0? #1

Open philippbayer opened 5 years ago

philippbayer commented 5 years ago

Hi thank you for this, it works perfectly fine with my data.

I noticed that when I use --trait 0, the p-values reported for all phenotypes are identical to the p-values of the first phenotype - if I use a loop instead of --trait 0 like

for traitnumber in ${seq 1 53}
do
./blink_linux --gwas --file myData --hapmap --trait ${traitnumber}
done

it works fine and I get different p-values.

With --trait 0:

$head -5 *result.txt
==> Pheno1_GWAS_result.txt <==
taxa    chr     pos     maf     p_value
1_1     1       1       7.228916e-02    6.907761e-01
1_499   1       499     6.626506e-02    2.884782e-01
1_873   1       873     1.204819e-02    3.273402e-01
1_950   1       950     3.614458e-02    2.862584e-01

==> Pheno2_GWAS_result.txt <==
taxa    chr     pos     maf     p_value
1_1     1       1       7.228916e-02    6.907761e-01
1_499   1       499     6.626506e-02    2.884782e-01
1_873   1       873     1.204819e-02    3.273402e-01
1_950   1       950     3.614458e-02    2.862584e-01

==> Pheno3_GWAS_result.txt <==
taxa    chr     pos     maf     p_value
1_1     1       1       7.228916e-02    6.907761e-01
1_499   1       499     6.626506e-02    2.884782e-01
1_873   1       873     1.204819e-02    3.273402e-01
1_950   1       950     3.614458e-02    2.862584e-01

When iterating over each trait:

$head -5 *result.txt
==> Pheno1_GWAS_result.txt <==
taxa    chr     pos     maf     p_value
1_1     1       1       7.228916e-02    6.907761e-01
1_499   1       499     6.626506e-02    2.884782e-01
1_873   1       873     1.204819e-02    3.273402e-01
1_950   1       950     3.614458e-02    2.862584e-01

==> Pheno2_GWAS_result.txt <==
taxa    chr     pos     maf     p_value
1_1     1       1       7.228916e-02    5.100997e-01
1_499   1       499     6.626506e-02    1.916890e-01
1_873   1       873     1.204819e-02    3.734269e-01
1_950   1       950     3.614458e-02    3.355286e-01

==> Pheno3_GWAS_result.txt <==
taxa    chr     pos     maf     p_value
1_1     1       1       7.228916e-02    7.040188e-01
1_499   1       499     6.626506e-02    9.876577e-01
1_873   1       873     1.204819e-02    5.208803e-01
1_950   1       950     3.614458e-02    4.325002e-01

or am I doing something wrong? It works fine when I use the for-loop

Jamin-Smitchger commented 4 years ago

I also had problems with the trait 0 bug. I sent a message to the developer about it so hopefully it should be resolved.

It should also be noted that when using a hapmap file, all genotypes have to be in the doubled format, or it doesn't work.

Chromosomes have to be in a numerical format, or it doesn't work.

Menggg commented 4 years ago

Yes, Philipp's way should be correct. And chromosomes must be numeric format currently, but I can change it to character format later.