[Solved] Error when reading tped

Questions about GenABEL (aka *ABEL) suite of packages
Forum rules
Please remember not to post any sensitive data on this public forum.
The first few posts of newly registered users will be moderated in order to filter out any spammers.

When get a solution to the problem you posted, please change the topic name (e.g. from "how to ..." to "[SOLVED] how to ..."). This will make it easier for the community to follow the posts yet to be attended.
lzhao
GenABEL suite user
GenABEL suite user
Posts: 10
Joined: Thu Jan 23, 2014 8:56 pm

[Solved] Error when reading tped

Postby lzhao » Thu Feb 13, 2014 8:29 pm

When doing the conversion, I encounter the following error message:
"Error in convert.snp.tped(tped = "GENEVA_LungCancer_SLD_txt.recode.tped", : not enough genotypes for snp 'rs11191078' file 'GENEVA_LungCancer_SLD_txt.recode.tped' line 341120 !"
Any suggestion to bypass this error, other than deleting that SNP with "not enough genotypes"?

lckarssen
Site Admin
Site Admin
Posts: 322
Joined: Tue Jan 04, 2011 3:04 pm
Location: Utrecht, The Netherlands

Re: Error when reading tped

Postby lckarssen » Fri Feb 14, 2014 1:28 pm

What happens when you use plink to read the files? Does it also complain about missing genotypes?

(By the way, I moved your post to a separate topic as it wasn't really fitting in the older one you used).
-------
Lennart Karssen
PolyOmica
The Netherlands
-------

lzhao
GenABEL suite user
GenABEL suite user
Posts: 10
Joined: Thu Jan 23, 2014 8:56 pm

Re: Error when reading tped

Postby lzhao » Sat Feb 15, 2014 12:15 am

Hello,
To answer your question, Plink can read in the file without any error.
Also, converting program was completing over 300,000 lines, and then yielded this error message. I wonder if that SNP has too many missing data. In any case, I wonder if you can have a patch to identify the nature of this problem, and to exclude the SNP if there is not enough genotypes.
Thanks.

lckarssen
Site Admin
Site Admin
Posts: 322
Joined: Tue Jan 04, 2011 3:04 pm
Location: Utrecht, The Netherlands

Re: Error when reading tped

Postby lckarssen » Tue Feb 18, 2014 12:41 pm

Thanks for the additional information.
Can you post the output of the following commands (type them at the Linux shell prompt, not within R)?

Code: Select all

gawk 'NR==1 {print NF}; NR==341119 {print NF}; NR==341120 {print NF}' GENEVA_LungCancer_SLD_txt.recode.tped

This should print the number of columns for the three rows mentioned in the NR checks. Also, what is the total number of lines in the file:

Code: Select all

wc -l GENEVA_LungCancer_SLD_txt.recode.tped
-------
Lennart Karssen
PolyOmica
The Netherlands
-------

lzhao
GenABEL suite user
GenABEL suite user
Posts: 10
Joined: Thu Jan 23, 2014 8:56 pm

Re: Error when reading tped

Postby lzhao » Fri Feb 28, 2014 12:49 am

Following your suggestion, I executed two commands, and got following results:
7924
7924
7924
and
561466

Obviously, the above number associates with the sample size and the lower number is the number of SNPs.

lckarssen
Site Admin
Site Admin
Posts: 322
Joined: Tue Jan 04, 2011 3:04 pm
Location: Utrecht, The Netherlands

Re: Error when reading tped

Postby lckarssen » Fri Feb 28, 2014 9:12 am

OK, so the numers are ok. This leads me to believe that your input file is ok (as was to be expected since Plink could read it without problems). It may be that you are hitting some limit on the number of users times the number of SNPs. This can be either a limit in R or one in our code, I'll have to check that. Unfortunately I won't have time to do so in the coming week as I'm very busy with other things.

Could you try to split your data set into two files, each having half the SNPs (e.g. using plink) and test whether importing them separately works? If that works, could you try importing them together into the same GenABEL object?

[edit]
Maybe this is realted to bug #5118.
[/edit]
-------
Lennart Karssen
PolyOmica
The Netherlands
-------

lzhao
GenABEL suite user
GenABEL suite user
Posts: 10
Joined: Thu Jan 23, 2014 8:56 pm

Re: Error when reading tped

Postby lzhao » Fri Mar 07, 2014 7:03 pm

Yes, you are right. It is a limit of my system. Thanks!

lckarssen
Site Admin
Site Admin
Posts: 322
Joined: Tue Jan 04, 2011 3:04 pm
Location: Utrecht, The Netherlands

Re: Error when reading tped

Postby lckarssen » Mon Mar 10, 2014 8:01 pm

Ah, so does that mean you have tried to split the files into smaller ones and then it worked?
-------
Lennart Karssen
PolyOmica
The Netherlands
-------

lzhao
GenABEL suite user
GenABEL suite user
Posts: 10
Joined: Thu Jan 23, 2014 8:56 pm

Re: Error when reading tped

Postby lzhao » Tue Mar 11, 2014 3:54 pm

That is correct. Thanks.


Return to “GenABEL”

Who is online

Users browsing this forum: No registered users and 5 guests