How to prepare vcf for use with Picard?
Entering edit mode
4 months ago

I'm trying to use picard tool set up with Conda, however, it doesn't work with any VCF i'm throwing at it, e.g. this VCF file throws an error to simple filtering command: picard FilterVcf MIN_DP=10 I=trio.2010_06.ychr.sites.vcf.gz O=testt.vcf

Exception in thread "main" picard.PicardException: The input vcf must have a sequence dictionary in order to create indexed vcf or bcfs.
    at picard.vcf.filter.FilterVcf.doWork(
    at picard.cmdline.CommandLineProgram.instanceMain(
    at picard.cmdline.PicardCommandLine.instanceMain(
    at picard.cmdline.PicardCommandLine.main(

Although test VCF is fine and work with other tools with no issue.

Is there an accepted workflow to prepare VCF files for work with picard? Or is there some other obvious issue i'm ignoring?

I also can't find any tutorial with test data to confirm if my system has everything set up correctly.

picard • 277 views
Entering edit mode
4 months ago

is there some other obvious issue i'm ignoring?

most VCF in picard must have a sequence dictionary in the header = a reminder of the reference that was used. This is usually a very good practice because you'll know in the future what was the REF used. A dictionary is defined with the ##contig lines in the header.


those lines can be added using bcftools reheader --fai or picard UpdateVcfSequenceDictionary


Login before adding your answer.

Traffic: 2507 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6