Bad genetic distances corrupt .bim file when using --extract range

79 views
Skip to first unread message

Daniel Fernandes

unread,
Sep 15, 2016, 10:49:40 AM9/15/16
to plink2-users
Hi,

I came across this error plenty of times when using the flag --extract range to extract specific SNPs using a list file.
The new .bim file contains SNP ranges with genetic distances either as "0" or as enormous numbers like 4.1623974e-143, or -2.5340074e+213, or even "nan".
The same file can also not be open with some Linux text editors, like 'gedit', although it opens with others, like 'kate'. There seems to be a character encoding issue here.

However, the most significant issue is the distances, which makes impossible to do some downstream analysis/conversions.

plink --bfile All_merged_ex_PL --extract range SNP_Positions --make-bed --out All_merged_ex_PL_SNP

I have used the input files before, and they seemed to work fine.

The SNP positions file, with length of 354212 lines, is as follows:

1 752566 752566 R1
1 903426 903426 R2
1 949654 949654 R3
1 1018704 1018704 R4
1 1048955 1048955 R5
etc

Nothing of note on the log file, I think:


PLINK v1
.90b3w 64-bit (3 Sep 2015)
Options in effect:
 
--bfile All_merged_ex_PL
 
--extract range SNP_Positions
 
--make-bed
 
--out All_merged_ex_PL_SNP

Hostname: daniel-Inspiron-7537
Working directory: /home/daniel/NGSdata/Datasets/My_datasets
Start time: Thu Sep 15 12:11:38 2016

Random number seed: 1473937898
7883 MB RAM detected; reserving 3941 MB for main workspace.
584840 variants loaded from .bim file.
2306 people (1443 males, 863 females) loaded from .fam.
2306 phenotype values loaded from .fam.
--extract range: 236510 variants excluded.
--extract range: 348330 variants remaining.
Using 1 thread (no multithreaded calculations invoked.
Before main variant filters, 2306 founders and 0 nonfounders present.
Calculating allele frequencies... done.
Total genotyping rate is 0.919668.
348330 variants and 2306 people pass filters and QC.
Among remaining phenotypes, 0 are cases and 2306 are controls.
--make-bed to All_merged_ex_PL_SNP.bed + All_merged_ex_PL_SNP.bim +
All_merged_ex_PL_SNP.fam ... done.

But here are some lines of this All_merged_ex_PL_SNP.bim:

15    Affx-12199701    1.14303    93091244    A    G
15    Affx-12199712    1.14304    93091725    C    A
15    Affx-12199751    -4.5827316e+151    93093333    A    G
15    Affx-12201900    4.1623974e-143    93226828    T    C
15    Affx-12201993    nan    93233324    T    G
15    Affx-12202182    -4.3877233e-36    93245286    G    A
15    Affx-12202194    -2.0814519e-05    93245776    A    G

Along 5430 lines, the file has these kind of distances, or even "0", and then it suddenly continues with the normal ones.
Below are the distances of the same showed SNPs on the original .bim file.

15    Affx-12199701    1.14303    93091244    A    G
15    Affx-12199712    1.14304    93091725    C    A
15    Affx-12199751    1.14304    93093333    A    G
15    Affx-12201900    1.14768    93226828    T    C
15    Affx-12201993    1.14774    93233324    T    G
15    Affx-12202182    1.14778    93245286    G    A
15    Affx-12202194    1.14782    93245776    A    G

So, any help is welcome! It is a bit time consuming to correct the bad distances by fetching them from the original file.

Daniel Fernandes

PS: I've had another error that I have tried to replicate to no avail, though I have a written description of it in an email I sent. Not sure if I should post that or not...

Daniel Fernandes

unread,
Sep 15, 2016, 10:59:03 AM9/15/16
to plink2-users
I have not updated PLINK to the latest version, my apologies. Will try that now and see if problem persists.

Daniel Fernandes

Christopher Chang

unread,
Sep 15, 2016, 11:01:24 AM9/15/16
to plink2-users
There was a .bim centimorgan column bugfix in February, so yes, the latest build is likely to fix this.  Let me know if you still see any problems.

Daniel Fernandes

unread,
Sep 15, 2016, 11:46:10 AM9/15/16
to plink2-users
Dear Christopher,

Yes, just tried with the newest version and it works fine. Thanks for the prompt reply!
Reply all
Reply to author
Forward
0 new messages