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.
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.
We will be out of the office for a Broad Institute event from Dec 10th to Dec 11th 2019. We will be back to monitor the GATK forum on Dec 12th 2019. In the meantime we encourage you to help out other community members with their queries.
Thank you for your patience!
GATK 3.3 Genotype GVCF Caused by: java.io.FileNotFoundException: (Too many open files)

I am trying to run GenotypeGVCF using the following command on a cluster and am getting the following exception. How can I fix this? -- Thanks in advance!
java -Xmx30G -jar /opt/ngstools/variantcallers/gatk/GATK-3.3-0/GenomeAnalysisTK.jar -T GenotypeGVCFs -R /opt/ngstools/Human_Decoy_REF/hs37d5.fa -V /home/user/gvcfs.list -L /home/user/chr_1.bed -D /opt/ngstools/dbsnp_138.b37.vcf --out /home/user/chr_1.vcf
INFO 11:23:53,718 ProgressMeter - | processed | time | per 1M | | total | remaining
INFO 11:23:53,718 ProgressMeter - Location | sites | elapsed | sites | completed | runtime | runtime
INFO 11:23:56,923 GenotypeGVCFs - Notice that the -ploidy parameter is ignored in GenotypeGVCFs tool as this is automatically determined by the input variant files
ERROR ------------------------------------------------------------------------------------------
ERROR stack trace
java.lang.InternalError
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:838)
at sun.misc.URLClassPath.getResource(URLClassPath.java:199)
at sun.misc.URLClassPath.getResource(URLClassPath.java:251)
at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1305)
at java.lang.ClassLoader.getResource(ClassLoader.java:1144)
at java.lang.ClassLoader.getResource(ClassLoader.java:1142)
at java.lang.ClassLoader.getSystemResource(ClassLoader.java:1267)
at java.lang.ClassLoader.getSystemResourceAsStream(ClassLoader.java:1370)
at java.lang.Class.getResourceAsStream(Class.java:2109)
at javax.xml.stream.SecuritySupport$4.run(SecuritySupport.java:92)
at java.security.AccessController.doPrivileged(Native Method)
at javax.xml.stream.SecuritySupport.getResourceAsStream(SecuritySupport.java:87)
at javax.xml.stream.FactoryFinder.findJarServiceProvider(FactoryFinder.java:335)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:302)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:215)
at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:154)
at org.simpleframework.xml.stream.NodeBuilder.(NodeBuilder.java:48)
at org.simpleframework.xml.core.Persister.write(Persister.java:1000)
at org.simpleframework.xml.core.Persister.write(Persister.java:982)
at org.simpleframework.xml.core.Persister.write(Persister.java:963)
at org.broadinstitute.gatk.engine.phonehome.GATKRunReport.postReportToStream(GATKRunReport.java:377)
at org.broadinstitute.gatk.engine.phonehome.GATKRunReport.postReportToAWSS3(GATKRunReport.java:569)
at org.broadinstitute.gatk.engine.phonehome.GATKRunReport.postReport(GATKRunReport.java:352)
at org.broadinstitute.gatk.engine.CommandLineExecutable.generateGATKRunReport(CommandLineExecutable.java:165)
at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:124)
at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:248)
at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:155)
at org.broadinstitute.gatk.engine.CommandLineGATK.main(CommandLineGATK.java:107)
Caused by: java.io.FileNotFoundException: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91.x86_64/jre/lib/resources.jar (Too many open files)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:215)
at java.util.zip.ZipFile.(ZipFile.java:145)
at java.util.jar.JarFile.(JarFile.java:154)
at java.util.jar.JarFile.(JarFile.java:91)
at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:728)
at sun.misc.URLClassPath$JarLoader.access$600(URLClassPath.java:591)
at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:673)
at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:666)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:665)
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:836)
... 27 more
ERROR ------------------------------------------------------------------------------------------
ERROR A GATK RUNTIME ERROR has occurred (version 3.3-0-g37228af):
ERROR
ERROR This might be a bug. Please check the documentation guide to see if this is a known problem.
ERROR If not, please post the error message, with stack trace, to the GATK forum.
ERROR Visit our website and forum for extensive documentation and answers to
ERROR commonly asked questions http://www.broadinstitute.org/gatk
ERROR
ERROR MESSAGE: Code exception (see stack trace for error itself)
ERROR ------------------------------------------------------------------------------------------
Best Answer
-
Sheila Broad Institute admin
@ravichav
Hi,Can you try combining your GVCFs before running GenotypeGVCFs? https://www.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_gatk_tools_walkers_variantutils_CombineGVCFs.php
-Sheila
Answers
I noticed this error message:
How many lines in your file
gvcfs.list
?What does
ulimit -n
return when typed on the command line?ulimit -n 1048576
gvcfs.list has 4000 lines
@ravichav
Hi,
Can you try combining your GVCFs before running GenotypeGVCFs? https://www.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_gatk_tools_walkers_variantutils_CombineGVCFs.php
-Sheila