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(FilterVcf.java:106)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:209)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)
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.
1 answer
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.
##contig=<ID=chr1,length=249250621>
##contig=<ID=chr2,length=243199373>
##contig=<ID=chr3,length=198022430>
##contig=<ID=chr4,length=191154276>
##contig=<ID=chr5,length=180915260>
##contig=<ID=chr6,length=171115067>
those lines can be added using bcftools reheader --fai or picard UpdateVcfSequenceDictionary
Log in to answer this question.