Error: Missing header line in .vcf file.

1,657 views
Skip to first unread message

Henry Bigelow

unread,
Jun 10, 2016, 1:50:32 PM6/10/16
to plink2-users
Hi,

Could anyone help out with the following:

$ plink --vcf whi.some.annot.vcf.gz --allow-extra-chr --make-bed --geno 0.1 --out whi.some.annot
PLINK v1.90b3.31 64-bit (3 Feb 2016)       https://www.cog-genomics.org/plink2
(C) 2005-2016 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to whi.some.annot.log.
Options in effect:
  --allow-extra-chr
  --geno 0.1
  --make-bed
  --out whi.some.annot
  --vcf whi.some.annot.vcf.gz

516830 MB RAM detected; reserving 258415 MB for main workspace.
Error: Missing header line in .vcf file.


That is all the error message that I get.  Is there some way to check the vcf file and get a more informative error message?

Thanks,

Henry

Christopher Chang

unread,
Jun 10, 2016, 1:53:49 PM6/10/16
to plink2-users
"zcat whi.some.annot.vcf.gz | head" should decompress and display the top lines.

Henry Bigelow

unread,
Jun 10, 2016, 2:13:41 PM6/10/16
to plink2-users
Hi Chris,

Thanks for your reply.  But, once I look at the vcf header (though I use bcftools view -h for that), how do I know which line should be there but isn't?  There is no detail in PLINK's error message about what is missing.

Thanks,

Henry

Christopher Chang

unread,
Jun 10, 2016, 2:26:45 PM6/10/16
to plink2-users
PLINK expects a sequence of header lines starting with '##', followed by one starting with '#CHROM'.  All other details are ignored.

(If you have a BCF2 file, that must be loaded with --bcf instead.)

Henry Bigelow

unread,
Jun 10, 2016, 4:05:24 PM6/10/16
to plink2-users
Great!  It turned out I had a bcf file, so when I switched to --bcf, it worked.
Reply all
Reply to author
Forward
0 new messages