This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Trouble running vcf2bam jvarkit tool

I am trying to use the tool called vcf2bam from jvarkit on a server and I have the following 2 files: GRCh38_latest_genomic.fna - the file is of format FASTQ , and 00-common_all.vcf. I used samtools faidx and also picard CreateSequenceDictionary, but when I try to run the following command: $ java -jar jvarkit/dist/vcf2bam.jar -R GRCh38_latest_genomic.fna 00-common_all.vcf

I get the following errors:

[SEVERE][VcfToBam]Sequence Dictionary missing in VCF

java.io.IOException: Sequence Dictionary missing in VCF

    at com.github.lindenb.jvarkit.tools.misc.VcfToBam.run(VcfToBam.java:144)
    at com.github.lindenb.jvarkit.tools.misc.VcfToBam.doWork(VcfToBam.java:416)
    at com.github.lindenb.jvarkit.util.jcommander.Launcher.instanceMain(Launcher.java:760)
    at com.github.lindenb.jvarkit.util.jcommander.Launcher.instanceMainWithExit(Launcher.java:923)
    at com.github.lindenb.jvarkit.tools.misc.VcfToBam.main(VcfToBam.java:434)

[INFO][Launcher]vcf2bam Exited with failure (-1)

Has anyone here encountered this and managed to solve this problem?

jvarkit vcf2bam vcf picard

hello guys i am just trying to convert vcf file to bam file how did you use that VCF2BAM jvarkit
can you show me example

The command is in original question:

$ java -jar jvarkit/dist/vcf2bam.jar -R GRCh38_latest_genomic.fna 00-common_all.vcf

1 answer

The error is "Sequence Dictionary missing in VCF"

Your VCF is missing the required lines starting with "##contig=" (see "Contig field format" in https://samtools.github.io/hts-specs/VCFv4.2.pdf).

You can ad it with picard UpdateVcfSequenceDictionary : https://broadinstitute.github.io/picard/command-line-overview.html#UpdateVcfSequenceDictionary

Log in to answer this question.