This is a test version of Biostars. For the public version, visit https://www.biostars.org.
nan in .bim file generated by plink

Hi all..

I used plink to generate .bed, .bim and .fam files from .ped and .map files. This conversion worked well.

When I access the .bim file, I find nan in the third column in one of the lines of the .bim file, like this:

1    rs2027305    nan    245672356    A    G

This seems to happen after the conversion from .ped and .map file to .bed files. Because of this I am unable to use the .bim file for any analysis and the following error:

ERROR: Problem reading BIM file, line 50602

Kindly let me know if anyone has encountered this and how this should be handled.

plinksnp

1 answer

As a temporary measure, you can replace the "nan" with whatever third column value was present on the previous row. For most purposes, it's also safe to just replace all third column values with "0".

Thanks a lot. As of now I have replaced the values of NaNs with a zero. I do not know yet how this will affect the analysis if I do what you have suggested. I will let you know though...

Log in to answer this question.