This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vcf file has an empty sample id

It seems like my VCF's header contains at least an empty smaple ID. I am not sure how to figure out where it goes wrong because, if I run awk 'print NF', all lines have the same number of fields.

When I ran bcftools, it told me "[E::bcf_hdr_add_sample] Empty sample name: trailing spaces/tabs in the header line?"

And when I ran refinedIBD, it gives an error of the same reason

> > java -jar ../../../../tools/refined-ibd.17Jan20.102.jar gt=test.vcf out=test ERROR: java.lang.IllegalArgumentException: id.isEmpty()
> java.lang.IllegalArgumentException: id.isEmpty()
>         at beagleutil.SampleIds.getIndices(SampleIds.java:84)
>         at beagleutil.Samples.fromIds(Samples.java:83)
>         at vcf.VcfHeader.samples(VcfHeader.java:172)
>         at vcf.VcfHeader.<init>(VcfHeader.java:127)
>         at vcf.RefIt.<init>(RefIt.java:120)
>         at vcf.RefIt.create(RefIt.java:107)
>         at refined.RefinedIbd.lambda$windowIt$0(RefinedIbd.java:140)
>         at vcf.WindowIt$Reader.run(WindowIt.java:244)
>         at java.lang.Thread.run(Thread.java:745) terminating program.

Yet I couldn't locate which column in the #header line goes wrong. Can anyone help? Thanks a lot!

vcf bcftools snp

How you prepared this vcf file? BAM file or from internet source?

Could you attach header in your question?

0 answers

No answers yet.

Log in to answer this question.