Entering edit mode
10.6 years ago
14134125465346445
★
3.6k
I've got two bam files I want to compare, A and B, but bam B comes in a different order of chromosomes as the ones in A. What is the best tool to resort bam B in the same order of chromosomes as the one in bam A?
or ReplaceSamHeader
Don't the sort orders needed to be the same for ReplaceSamHeader (like samtools reheader)? If they aren't you'd end up messing up all of the alignments, since chromosomes aren't actually stored in the alignments in BAM files (just an index into the header).
Yes, you are right, I've been bitten by that before and still forgot about it.