Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

java.lang.NumberFormatException when trying to perform VariantFiltration

I'm trying to get a set of robust variants to use to recalibrate quality scores. I called variants using gatk4, and then tried to perform VariantFiltration:

gatk-4.0.5.1/gatk VariantFiltration -R data/genome.fasta -V variants/6753_12-15-2015_first_pass_filtered.vcf -filter 'QD > 2 && FS > 60 && SOR < 3 && MQ > 40 && MQRankSum > -3 && ReadPosRankSum > -4' -output variants/6753_12-15-2015_second_pass_filtered.vcf -filter-name "default"

However, it complains with a java.lang.NumberFormatException:

Using GATK jar gatk-4.0.5.1/gatk-package-4.0.5.1-local.jar
Running:
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -jar gatk-4.0.5.1/gatk-package-4.0.5.1-local.jar VariantFiltration -R data/genome.fasta -V variants/6753_12-15-2015_first_pass_filtered.vcf -filter QD > 2 && FS > 60 && SOR < 3 && MQ > 40 && MQRankSum > -3 && ReadPosRankSum > -4 -output variants/6753_12-15-2015_second_pass_filtered.vcf -filter-name default
15:42:33.964 INFO NativeLibraryLoader - Loading libgkl_compression.dylib from jar:file:gatk-4.0.5.1/gatk-package-4.0.5.1-local.jar!/com/intel/gkl/native/libgkl_compression.dylib
15:42:34.114 INFO VariantFiltration - ------------------------------------------------------------
15:42:34.115 INFO VariantFiltration - The Genome Analysis Toolkit (GATK) v4.0.5.1
15:42:34.115 INFO VariantFiltration - For support and documentation go to https://software.broadinstitute.org/gatk/
15:42:34.115 INFO VariantFiltration - Executing as [email protected] on Mac OS X v10.13.5 x86_64
15:42:34.116 INFO VariantFiltration - Java runtime: Java HotSpot(TM) 64-Bit Server VM v1.8.0_91-b14
15:42:34.116 INFO VariantFiltration - Start Date/Time: June 15, 2018 3:42:33 PM PDT
15:42:34.116 INFO VariantFiltration - ------------------------------------------------------------
15:42:34.116 INFO VariantFiltration - ------------------------------------------------------------
15:42:34.117 INFO VariantFiltration - HTSJDK Version: 2.15.1
15:42:34.118 INFO VariantFiltration - Picard Version: 2.18.2
15:42:34.118 INFO VariantFiltration - HTSJDK Defaults.COMPRESSION_LEVEL : 2
15:42:34.118 INFO VariantFiltration - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
15:42:34.118 INFO VariantFiltration - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
15:42:34.118 INFO VariantFiltration - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
15:42:34.118 INFO VariantFiltration - Deflater: IntelDeflater
15:42:34.119 INFO VariantFiltration - Inflater: IntelInflater
15:42:34.119 INFO VariantFiltration - GCS max retries/reopens: 20
15:42:34.119 INFO VariantFiltration - Using google-cloud-java patch 6d11bef1c81f885c26b2b56c8616b7a705171e4f from https://github.com/droazen/google-cloud-java/tree/dr_all_nio_fixes
15:42:34.119 INFO VariantFiltration - Initializing engine
15:42:34.634 INFO FeatureManager - Using codec VCFCodec to read file file:///Users/sherlock/dev/Bhatt_lab/crassphage/variants/6753_12-15-2015_first_pass_filtered.vcf
15:42:34.663 INFO VariantFiltration - Done initializing engine
15:42:34.750 INFO ProgressMeter - Starting traversal
15:42:34.750 INFO ProgressMeter - Current Locus Elapsed Minutes Variants Processed Variants/Minute
15:42:34.781 INFO VariantFiltration - Shutting down engine
[June 15, 2018 3:42:34 PM PDT] org.broadinstitute.hellbender.tools.walkers.filters.VariantFiltration done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=342884352
java.lang.NumberFormatException: For input string: "26.67"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:589)
at java.lang.Long.parseLong(Long.java:631)
at org.apache.commons.jexl2.JexlArithmetic.toLong(JexlArithmetic.java:906)
at org.apache.commons.jexl2.JexlArithmetic.compare(JexlArithmetic.java:718)
at org.apache.commons.jexl2.JexlArithmetic.greaterThan(JexlArithmetic.java:790)
at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:796)
at org.apache.commons.jexl2.parser.ASTGTNode.jjtAccept(ASTGTNode.java:18)
at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:449)
at org.apache.commons.jexl2.parser.ASTAndNode.jjtAccept(ASTAndNode.java:18)
at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:449)
at org.apache.commons.jexl2.parser.ASTAndNode.jjtAccept(ASTAndNode.java:18)
at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:449)
at org.apache.commons.jexl2.parser.ASTAndNode.jjtAccept(ASTAndNode.java:18)
at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:449)
at org.apache.commons.jexl2.parser.ASTAndNode.jjtAccept(ASTAndNode.java:18)
at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:449)
at org.apache.commons.jexl2.parser.ASTAndNode.jjtAccept(ASTAndNode.java:18)
at org.apache.commons.jexl2.Interpreter.interpret(Interpreter.java:232)
at org.apache.commons.jexl2.ExpressionImpl.evaluate(ExpressionImpl.java:65)
at htsjdk.variant.variantcontext.JEXLMap.evaluateExpression(JEXLMap.java:186)
at htsjdk.variant.variantcontext.JEXLMap.get(JEXLMap.java:95)
at htsjdk.variant.variantcontext.JEXLMap.get(JEXLMap.java:15)
at htsjdk.variant.variantcontext.VariantContextUtils.match(VariantContextUtils.java:338)
at org.broadinstitute.hellbender.tools.walkers.filters.VariantFiltration.matchesFilter(VariantFiltration.java:380)
at org.broadinstitute.hellbender.tools.walkers.filters.VariantFiltration.filter(VariantFiltration.java:339)
at org.broadinstitute.hellbender.tools.walkers.filters.VariantFiltration.apply(VariantFiltration.java:299)
at org.broadinstitute.hellbender.engine.VariantWalkerBase.lambda$traverse$0(VariantWalkerBase.java:109)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.broadinstitute.hellbender.engine.VariantWalkerBase.traverse(VariantWalkerBase.java:107)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:994)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:135)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:180)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:199)
at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:160)
at org.broadinstitute.hellbender.Main.mainEntry(Main.java:203)
at org.broadinstitute.hellbender.Main.main(Main.java:289)

I don't really know how to fix it. ValidateVariants gives no errors, and I am able to perform variant selection, e.g.:

gatk-4.0.5.1/gatk SelectVariants -R data/genome.fasta -V variants/6753_12-15-2015_first_pass_raw.vcf -select 'vc.getGenotype("6753_12-15-2015").getAD().1/vc.getGenotype("6753_12-15-2015").getDP() > 0.9 ' -output variants/6753_12-15-2015_first_pass_filtered.vcf

with no problems. Insights would be gratefully appreciated.
Thanks!
Gavin

Issue · Github
by Sheila

Issue Number
4921
State
closed
Last Updated
Assignee
Array
Closed By
chandrans

Best Answers

Answers

Sign In or Register to comment.