GATK Runtime Error

dward0487dward0487 Member
edited October 2012 in Ask the GATK team

Hello everyone,

I am working with some sequence data in the form of FASTQ files. I use BWA to align the data, which ultimately gives me a SAM file. I then convert the SAM file to a BAM file using Samtools. The BAM file is then sorted and indexed. Finally, I use GATK to do the SNP-calling. I have been doing this with no problems until today. Here is the error I got:

ERROR ------------------------------------------------------------------------------------------
ERROR stack trace

org.broadinstitute.sting.utils.exceptions.ReviewedStingException: Unable to merge temporary Tribble output file.
at org.broadinstitute.sting.gatk.executive.HierarchicalMicroScheduler.mergeExistingOutput(HierarchicalMicroScheduler.java:259)
at org.broadinstitute.sting.gatk.executive.HierarchicalMicroScheduler.execute(HierarchicalMicroScheduler.java:103)
at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:248)
at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:113)
at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:236)
at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:146)
at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:92)
Caused by: org.broad.tribble.TribbleException$MalformedFeatureFile: We saw a record with a start of chr22:29448584 after a record with a start of chr22:29618488, for input source: /illumina/data/vcf/53_GGTGCG_L006_R1_001.raw.vcf
at org.broad.tribble.index.DynamicIndexCreator.addFeature(DynamicIndexCreator.java:164)
at org.broadinstitute.sting.utils.codecs.vcf.IndexingVCFWriter.add(IndexingVCFWriter.java:118)
at org.broadinstitute.sting.utils.codecs.vcf.StandardVCFWriter.add(StandardVCFWriter.java:163)
at org.broadinstitute.sting.gatk.io.storage.VCFWriterStorage.mergeInto(VCFWriterStorage.java:120)
at org.broadinstitute.sting.gatk.io.storage.VCFWriterStorage.mergeInto(VCFWriterStorage.java:26)
at org.broadinstitute.sting.gatk.executive.OutputMergeTask.merge(OutputMergeTask.java:48)
at org.broadinstitute.sting.gatk.executive.HierarchicalMicroScheduler.mergeExistingOutput(HierarchicalMicroScheduler.java:253)
... 6 more

ERROR ------------------------------------------------------------------------------------------
ERROR A GATK RUNTIME ERROR has occurred (version 1.6-13-g91f02df):
ERROR
ERROR Please visit the wiki to see if this is a known problem
ERROR If not, please post the error, with stack trace, to the GATK forum
ERROR Visit our wiki for extensive documentation http://www.broadinstitute.org/gsa/wiki
ERROR Visit our forum to view answers to commonly asked questions http://getsatisfaction.com/gsa
ERROR
ERROR MESSAGE: Unable to merge temporary Tribble output file.
ERROR ------------------------------------------------------------------------------------------

Can anyone tell me what causes this error? I have never seen it until now... Thank you!

Best Answers

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MA admin
    Accepted Answer

    Indeed, you are right. Sorry about that.

    Can you please post your command line? And have you validated the bam file you use as input?

    Also, I see you are using an older version of the GATK. Unless there's a good reason to keep that, I recommend you upgrade to the latest version, try again and see if you still experience that error. If its due to a bug, we may have fixed it already.

  • ebanksebanks Broad Institute ✭✭✭✭
    Accepted Answer

    You can't go that many ways parallel. I'd recommend the scatter-gather approach (e.g. through Queue) if you need to break up your jobs into that many pieces. That's 100% what the problem is here.

  • ebanksebanks Broad Institute ✭✭✭✭
    Accepted Answer

    Hmm, well all I can say is that this type of error has been reported in the past and it's always due to some local file system issue that goes away when running single-threaded. We have never been able to reproduce this error on our own machines, so there has been no way for us to debug. If you have normally run that many ways parallel then feel free to continue doing so. Hopefully this was just a one time blip for you!

Answers

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    This problem has been covered previously; see this thread.

  • dward0487dward0487 Member

    I've seen the post you're referring to, and I'm not really sure it's the same problem... In the error message to which you're referring, the phrase "too many open files" is listed... The answers to that question seem to be related to this particular line. However, my error message does not include this line. Instead, a different statement regarding the order of chromosomal positions is given... I could be wrong, but it seems like these are different issues... Thanks!

  • ebanksebanks Broad InstituteMember, Broadie, Dev ✭✭✭✭

    Look carefully at your error. Note this:
    "We saw a record with a start of chr22:29448584 after a record with a start of chr22:29618488, for input source: /illumina/data/vcf/53_GGTGCG_L006_R1_001.raw.vcf"
    Your VCF is malformed.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin
    Accepted Answer

    Indeed, you are right. Sorry about that.

    Can you please post your command line? And have you validated the bam file you use as input?

    Also, I see you are using an older version of the GATK. Unless there's a good reason to keep that, I recommend you upgrade to the latest version, try again and see if you still experience that error. If its due to a bug, we may have fixed it already.

  • dward0487dward0487 Member

    ebanks: I noticed the part that said "MalformedFeatureFile," and I had already read the line you pasted... I can tell that the file is malformed, but I was asking what caused it. It is my understanding that GATK is creating the VCF file, so the problem must be occurring during this process. I'd like to know how to fix it.

    Geraldine: Here is my command line:

    java -jar GenomeAnalysisTK.jar -l INFO -R /illumina/data/genomes/Homo_sapiens/UCSC/hg19_2/ucsc.hg19.fasta -T UnifiedGenotyper -I /illumina/data/bam/53_GGTGCG_L006_R1_001.sorted.bam -o /illumina/data/vcf/53_GGTGCG_L006_R1_001.raw.vcf -stand_call_conf 30.0 -stand_emit_conf 10.0 -dt NONE --ouput_mode EMIT_ALL_CONFIDENT_SITES -glm BOTH -nt 32

    I understand that this could be the result of an irregularity in the BAM file I'm using, but I need more specific instructions on how to "validate" the BAM file... I'm curious as to why I'm seeing this error only with this sample. I have used the same BAM conversion process on other FASTQ files with great results. It seems odd that I'm seeing this error for the first time. Also, I will look into updating my version of GATK. For now, I'm just trying to get the analysis done by the end of the weekend, as I have a deadline looming! Thanks for your help!

  • ebanksebanks Broad InstituteMember, Broadie, Dev ✭✭✭✭
    Accepted Answer

    You can't go that many ways parallel. I'd recommend the scatter-gather approach (e.g. through Queue) if you need to break up your jobs into that many pieces. That's 100% what the problem is here.

  • dward0487dward0487 Member

    ebanks: I'm confused... We have been using "-nt 64" in the past without receiving this error. It seems strange that we would get the error using less parallelization than before.

  • ebanksebanks Broad InstituteMember, Broadie, Dev ✭✭✭✭
    Accepted Answer

    Hmm, well all I can say is that this type of error has been reported in the past and it's always due to some local file system issue that goes away when running single-threaded. We have never been able to reproduce this error on our own machines, so there has been no way for us to debug. If you have normally run that many ways parallel then feel free to continue doing so. Hopefully this was just a one time blip for you!

  • dward0487dward0487 Member

    I will try to run single-threaded and see if that resolves the issue. Thanks!

  • dward0487dward0487 Member

    Well, when I ran it single-threaded, it gave me a new error that said that the BAM file was malformed. To fix this, I used the --filter_mismatching_base_and_quals option on the command line. Things seem to be working properly now. Thanks everyone!

  • ekanterakisekanterakis UKMember
    edited March 2015

    I've found that spurious errors like this may be caused from temporary files overwriting each-other, especially in highly parallel implementations. It's a good idea to point each parallel java process to its own tmp dir as such:
    java -Djava.io.tmpdir=/tmp/UG_(chr)_(chunk).tmp -Xmx6g ...
    This both decreases the number of files in a directory (ulimit issues) and prevents processes overwriting each-other's temp files.

Sign In or Register to comment.