This is a test version of Biostars. For the public version, visit https://www.biostars.org.
why would tped file from command plink --bfile [extenstion] --recode --tranpose have strange outputs?

I'm trying to use GenABEL and when attemping to use the command;

convert.snp.tped(tpedfile="plink.tped", tfamfile="plink.tfam", out="tdata.dat")

I get the error:

Error in convert.snp.tped(tpedfile = "plink.tped", tfamfile = "plink.tfam",  : 
  illegal genotype (three alleles) snp 'chr1_2367259_D' file 'plink.tped' line 42 !

So I checked the tped file and on line 42 I have:

1 chr1_2367259_D 0 2367259 I2 I2 I2 I2 I2 I2 I2 I2 I2 I2 D I2 I2 I2 I2 I2 I2 I2....

Anyone have experience with this error ? What might have caused the plink conversion to give this output ?

snp genome r genabel plink

I changed your post to a question because that's what it is and I added genabel and plink to the tags, because those are quite relevant for your problem.

Did you get the plink file from a vcf file? How does the variant look like there?

Unfortunately no vcf file the only plink files I have are .bed .bim .fam

Well, the error is quite clear, no?

illegal genotype (three alleles)

Which alleles does that line contain? I see an I2 and D, but likely also an I1?

1 answer

Hei i got the same problem in R genABEL. Error in convert.snp.ped(pedfile = "xxx.txt", mapfile = "xxx.txt", illegal genotype (three alleles) snp 'AX-165037936' file 'xxx.txt' line 1118 ! The file file contains only 1117 individuals. and there is no 3 alleles in line 1118 because simple such a line does not exist. I have tried subsetting a smaller dataset (reduced inviduals( and i get the same message.

has anyone being able to solve this?

Log in to answer this question.