Problem with PICARD FilterVcf

Dear all,
I have a problem using Picard tool FilterVcf.
I first run the command:

java -jar picard.jar FilterVcf \
MIN_AB=10.0 \
INPUT=12-3455_S6.final.vcf \
OUTPUT=test.vcf

And I receive the error:

[Mon Aug 31 12:04:53 CEST 2015] Executing as [email protected] on Linux 2.6.32-279.2.1.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.7.0_45-b18; Picard version: 1.138() JdkDeflater
[Mon Aug 31 12:04:56 CEST 2015] picard.vcf.filter.FilterVcf done. Elapsed time: 0.06 minutes.
Runtime.totalMemory()=1138753536
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" java.lang.IllegalArgumentException: A reference dictionary is required for creating Tribble indices on the fly
at htsjdk.variant.variantcontext.writer.VariantContextWriterBuilder.build(VariantContextWriterBuilder.java:389)
at picard.vcf.filter.FilterVcf.doWork(FilterVcf.java:97)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:206)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)

Then I tried with:
java -jar picard.jar FilterVcf \
REFERENCE_SEQUENCE=/lustre1/genomes/hg19/fa/hg19 \
MIN_AB=10.0 \
INPUT=12-3455_S6.final.vcf \
OUTPUT=test.vcf

And I received the same error. In the directory /lustre1/genomes/hg19/fa/ I have the files hg19.dict hg19.fa hg19.fa.fai.
I don't understand what I am doing wrong.

Thanks for the help.

[[email protected] scratch_bmc]$ java -jar picard.jar FilterVcf --version
1.138()

Issue · Github
by Sheila

Issue Number
147
State
closed
Last Updated
Milestone
Array
Closed By
chandrans

Best Answer

Answers

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @merella.stefania
    Hi,

    Your input reference does not have the .fa ending. Try with hg19.fa instead of hg19

    -Sheila

  • merella.stefaniamerella.stefania ItalyMember

    Dear Sheila,
    thanks for the answer!! I tried with:

    java -jar picard.jar FilterVcf REFERENCE_SEQUENCE=/lustre1/genomes/hg19/fa/hg19.fa MIN_AB=10.0 INPUT=12-3455_S6.final.vcf OUTPUT=test.vcf
    But I still got the error:

    [Mon Aug 31 14:09:24 CEST 2015] picard.vcf.filter.FilterVcf INPUT=2-3455_S6.final.vcf OUTPUT=test.vcf MIN_AB=10.0 REFERENCE_SEQUENCE=/lustre1/genomes/hg19/fa/hg19.fa MIN_DP=0 MIN_GQ=0 MAX_FS=1.7976931348623157E308 MIN_QD=0.0 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=true CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
    [Mon Aug 31 14:09:24 CEST 2015] Executing as [email protected] on Linux 2.6.32-279.2.1.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.7.0_45-b18; Picard version: 1.138() JdkDeflater
    [Mon Aug 31 14:09:29 CEST 2015] picard.vcf.filter.FilterVcf done. Elapsed time: 0.08 minutes.
    Runtime.totalMemory()=1138753536
    To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
    Exception in thread "main" java.lang.IllegalArgumentException: A reference dictionary is required for creating Tribble indices on the fly
    at htsjdk.variant.variantcontext.writer.VariantContextWriterBuilder.build(VariantContextWriterBuilder.java:389)
    at picard.vcf.filter.FilterVcf.doWork(FilterVcf.java:97)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:206)
    at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
    at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)

    Issue · Github
    by Sheila

    Issue Number
    274
    State
    closed
    Last Updated
    Closed By
    vdauwera
  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @merella.stefania
    Hi,

    This seems like a bug, so I just submitted a bug report. Thanks for reporting this.

    I will let you know when a fix is in.

    -Sheila

  • merella.stefaniamerella.stefania ItalyMember

    Thanks Sheila!!
    Let me know when the bug is solved!

    Stefania

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    I don't think this is a bug. The line

    reference dictionary is required for creating Tribble indices on the fly

    Suggests that the .dict file is missing. See the FAQ on reference file input requirements.

  • merella.stefaniamerella.stefania ItalyMember

    Thanks Geraldine for the answer.
    In the directory /lustre1/genomes/hg19/fa/ I have the file hg19.dict:

    [[email protected] utilities]$ head /lustre1/genomes/hg19/fa/hg19.dict
    @HD VN:1.0 SO:unsorted
    @SQ SN:chr1 LN:249250621 UR:file:/usr/local/scratch/genomes/hg19/fa/hg19.fa M5:1b22b98cdeb4a9304cb5d48026a85128
    @SQ SN:chr2 LN:243199373 UR:file:/usr/local/scratch/genomes/hg19/fa/hg19.fa M5:a0d9851da00400dec1098a9255ac712e
    @SQ SN:chr3 LN:198022430 UR:file:/usr/local/scratch/genomes/hg19/fa/hg19.fa M5:641e4338fa8d52a5b781bd2a2c08d3c3
    @SQ SN:chr4 LN:191154276 UR:file:/usr/local/scratch/genomes/hg19/fa/hg19.fa M5:23dccd106897542ad87d2765d28a19a1
    @SQ SN:chr5 LN:180915260 UR:file:/usr/local/scratch/genomes/hg19/fa/hg19.fa M5:0740173db9ffd264d728f32784845cd7
    @SQ SN:chr6 LN:171115067 UR:file:/usr/local/scratch/genomes/hg19/fa/hg19.fa M5:1d3a93a248d92a729ee764823acbbc6b
    @SQ SN:chr7 LN:159138663 UR:file:/usr/local/scratch/genomes/hg19/fa/hg19.fa M5:618366e953d6aaad97dbe4777c29375e
    @SQ SN:chrX LN:155270560 UR:file:/usr/local/scratch/genomes/hg19/fa/hg19.fa M5:7e0e2e580297b7764e31dbc80c2540dd
    @SQ SN:chr8 LN:146364022 UR:file:/usr/local/scratch/genomes/hg19/fa/hg19.fa M5:96f514a9929e410c6651697bded59aec

    Is it correct?

    Thanks for the support.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @merella.stefania
    Hi Stefania,

    I have confirmed this is a bug. You have done things correctly.

    -Sheila

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Yep, I commented too soon -- Sheila reproduced the bug on our own files.

    You may be able to work around this by generating an index file for your VCF; I believe the dictionary only needs to be loaded if the VCF does not have an index. But I could be wrong.

  • @Sheila
    Hi! Any news about the bug?

    Thanks!!

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @merella.stefania
    Hi Stefania,

    No, sorry. I think you will have to wait a while for this unfortunately. The developers are swamped with other higher priority issues now.

    -Sheila

  • Ok thanks Sheila!

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @merella.stefania
    Hi Stefania,

    The fix will be in the next Picard release. For now, you can get around this issue by outputting a compressed VCF.

    -Sheila

  • @Sheila
    Hi Sheila,
    With compressed VCF you mean a BCF file, correct? Then I have to run the command in this way:
    java -jar picard.jar FilterVcf REFERENCE_SEQUENCE=/lustre1/genomes/hg19/fa/hg19.fa MIN_AB=10.0 INPUT=12-3455_S6.final.vcf OUTPUT=test.bcf

    Thanks for the support!!

Sign In or Register to comment.