Hello GATK team,
I was about to run SplitNCigarReads tool in GATK3.7. Unfortunately there is an error regarding the input files reads and reference having incompatible contigs.
input:
java -jar ~/GenomeAnalysisTK-3.7/GenomeAnalysisTK.jar -T SplitNCigarReads -R ~/Reference/GRCh38.p7.genome/GRCh38.p7.genome.nochr.fa -I ~/mapped/P1/Mark_duplication/marked_Duplicates.bam -o splitNcigar.bam -rf ReassignOneMappingQuality -RMQF 255 -RMQT 60 -U ALLOW_N_CIGAR_READS
output:
ERROR MESSAGE: Input files reads and reference have incompatible contigs. Please see https://software.broadinstitute.org/gatk/documentation/article?id=63for more information. Error details: The contig order in reads and reference is not the same; to fix this please see: (https://www.broadinstitute.org/gatk/guide/article?id=1328), which describes reordering contigs in BAM and VCF files..
I tried to fix this using ReorderSam tool in picard-2.9.0 to reorder my bam file so that it can match with the reference unfortunately, there is an error and no new reorder bam file created.
input:
java -jar ~/picard-2.9.0/picard.jar ReorderSam I=marked_Duplicates.bam O=reorder_marked_Duplicates.bam R=~/Reference/GRCh38.p7.genome/GRCh38.p7.genome.nochr.fa CREATE_INDEX=TRUE
output:
picard.sam.ReorderSam done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=1519386624
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" picard.PicardException: New reference sequence does not contain a matching contig for MT
at picard.sam.ReorderSam.buildSequenceDictionaryMap(ReorderSam.java:229)
at picard.sam.ReorderSam.doWork(ReorderSam.java:112)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:205)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:94)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:104)
Why is this happening ? and what should I do? your helps is kindly appreciated. Thank you.