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.
http://broadinstitute.github.io/picard/command-line-overview.html#ReorderSam
Does that mean if I have chr1, chr2 ... in my reference file, but chr1, chr3 in my BAM file. The file could be sorted by position but not ordered correctly?