This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Export tped file to R

Hi all!

I'm writing this post because I have a problem to export .tped file into R. I used this command in R:

convert.snp.tped (tped="name of tped file", tfam="name of tfam file", out="namedataset.raw")

and I got this error:

"Error in convert.snp.tped : coding 'RD' for SNP not recognised!"

I used this command with files of small dimensions in order to learn the commands in GenABEL and it worked well but when I used the same command for my big files I obtained that error and I'm not understanding. Also, since my file is very big, I checked the first rows of the tped file in order to check the snp identifier and it starts with 'rs'.

Someone have some suggestions to solve this problem? Thank you

r plink genabel

On which operating system did you produce the tped file, and on which are you trying to execute convert.snp.tped?

There is logic to my comment (above). The error has been reported elsewhere without a valid solution, from what I can see. I figured that there could be some encoding issue between different operating systems.

1 answer

Hi! thank you for your answer. I read only now your message. Finally, I fixed it. There were some errors in the original file, indeed some SNPs were codified with R or D code instead of A,C,G,T. Therefore, I removed directly these SNPs using PLINK and now I can export the file in R.

Great thanks - You can 'Accept' your own answer, in that case.

Log in to answer this question.