i have a sorted & read group added bam file and when i try to run the following GATK command on it
java -jar GenomeAnalysisTK.jar -T RealignerTargetCreator -R hg19.fa -o read.bam.list -I read.sorted.bam
I get the following message
input file reads and reference have incompatible contigs
i can see that in my bam file the contig order is as follows chr1,.......chrX,.......chr18,.......chrY,.....chr22,.....chrM whereas the reference contig order is chr1,chr2........chr22,chrX,chrY,chrM
does sorting the bam file not take care of this issue?
any ideas how this can issue can be fixed?
thanks in advance.