error in reading haps files

20 views
Skip to first unread message

Kaustubh Adhikari

unread,
Feb 3, 2020, 2:37:48 PM2/3/20
to plink2-users
Hi Chris,

I just downloaded the new version of plink2 (20 Jan), and I'm having problems reading haps files created by shapeit. I believe there were no such problems with an earlier version (Sept) of plink2, but I deleted it so can't go back and test now.

When I try to read the haps files, I get an error saying
Error: Invalid categorical phenotype '0' on line 3, column 4 of .sample file
(positive integer < 2^31 or --missing-code value expected).

But when I try to use missing-code, I get another error saying
Error: --missing-code must be used with --data/--gen/--bgen.

So I'm unable to read in haps files, which I used to be able to earlier with older versions of plink2. What should I do?

Thanks,

Kaustubh.

Christopher Chang

unread,
Feb 3, 2020, 4:04:55 PM2/3/20
to plink2-users
Oops, that's a --missing-code bug.  Fix for this is on GitHub, and I'll post updated binaries tonight.

With that said, it looks like there was a change to the .sample format recently which creates import/export complications (discrete covariates are no longer restricted to positive integers, and sex can now be coded M/F).  If the latest shapeit build is depending on support for that, you'll need to convert the .sample file to old-style.  A new flag will probably be added to allow import and export of new-style .sample files soon, but there will be a minor restriction on mixing numeric and string values in discrete-phenotype columns.

(Meanwhile, it is always possible to check out an old GitHub revision and use that to build an old binary, though I realize that many people aren't experienced with this.)

Kaustubh Adhikari

unread,
Feb 3, 2020, 4:18:18 PM2/3/20
to plink2-users
Thanks a lot! You're right that I don't have experience compiling pink myself, so didn't attempt that.

I am using shapeit2, i.e. the old style sample files, so should not have this issue.
Reply all
Reply to author
Forward
0 new messages