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.
Error: Unable to open index file (mark/reset not supported)

I have been trying to use multiple GATK tools after processing my sample bam files with multiple Picard tools (AddOrReplaceReadGroups, SortSam, MarkDuplicates, and ReorderSam in that order) and creating a new index file with each step. However, I keep getting the same error:
My input:
java -jar $GATK -T RealignerTargetCreator -R $human_wgfa -I 000ordered.bam -o 000realignertargetcreator.intervals
Output:
INFO 15:22:51,165 HelpFormatter - --------------------------------------------------------------------------------
INFO 15:22:51,166 HelpFormatter - The Genome Analysis Toolkit (GATK) v3.5-0-g36282e4, Compiled 2015/11/25 04:03:56
INFO 15:22:51,166 HelpFormatter - Copyright (c) 2010 The Broad Institute
INFO 15:22:51,166 HelpFormatter - For support and documentation go to http://www.broadinstitute.org/gatk
INFO 15:22:51,169 HelpFormatter - Program Args: -T RealignerTargetCreator -R /Users/sybouts/Genomes/Homo_sapiens/UCSC/hg38/Sequence/WholeGenomeFasta/genome.fa -I 000ordered.bam -o 000realignertargetcreator.intervals
INFO 15:22:51,173 HelpFormatter - Executing as [email protected] on Mac OS X 10.11.4 x86_64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_92-b14.
INFO 15:22:51,173 HelpFormatter - Date/Time: 2016/05/13 15:22:51
INFO 15:22:51,174 HelpFormatter - --------------------------------------------------------------------------------
INFO 15:22:51,174 HelpFormatter - --------------------------------------------------------------------------------
INFO 15:22:51,435 GenomeAnalysisEngine - Strictness is SILENT
INFO 15:22:51,507 GenomeAnalysisEngine - Downsampling Settings: Method: BY_SAMPLE, Target Coverage: 1000
INFO 15:22:51,511 SAMDataSource$SAMReaders - Initializing SAMRecords in serial
WARNING: BAM index file /Users/sybouts/SA_BLM_family/000ordered.bai is older than BAM /Users/sybouts/SA_BLM_family/000ordered.bam
INFO 15:22:51,529 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.02
INFO 15:22:52,424 GATKRunReport - Uploaded run statistics report to AWS S3
ERROR ------------------------------------------------------------------------------------------
ERROR stack trace
org.broadinstitute.gatk.utils.exceptions.ReviewedGATKException: Unable to open index file (mark/reset not supported)000ordered.bai
at org.broadinstitute.gatk.engine.datasources.reads.GATKBAMIndex.openIndexFile(GATKBAMIndex.java:319)
at org.broadinstitute.gatk.engine.datasources.reads.GATKBAMIndex.(GATKBAMIndex.java:97)
at org.broadinstitute.gatk.engine.datasources.reads.SAMDataSource.(SAMDataSource.java:388)
at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.createReadsDataSource(GenomeAnalysisEngine.java:931)
at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.initializeDataSources(GenomeAnalysisEngine.java:822)
at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:286)
at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:121)
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:106)
Caused by: java.io.IOException: mark/reset not supported
at java.io.InputStream.reset(InputStream.java:348)
at htsjdk.samtools.SamIndexes.asBaiSeekableStreamOrNull(SamIndexes.java:80)
at org.broadinstitute.gatk.engine.datasources.reads.GATKBAMIndex.openIndexFile(GATKBAMIndex.java:314)
... 9 more
ERROR ------------------------------------------------------------------------------------------
ERROR A GATK RUNTIME ERROR has occurred (version 3.5-0-g36282e4):
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: Unable to open index file (mark/reset not supported)000ordered.bai
ERROR ------------------------------------------------------------------------------------------
I am really frustrated and done everything I can to figure out what is going on, but the same thing keeps happening. Please let me know if there is any other information that may be helpful! Thanks!
Best Answer
-
dekling Broad Institute admin
Try ValidateSamFile. Also make sure that your Picard is the most recent version.
Answers
Try ValidateSamFile. Also make sure that your Picard is the most recent version.
Thanks, figured out that the person who did the alignment used a different reference genome than I was using... facepalm
Everything works now!