• 0 views
•
link
Resort bam from another bam header
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?
• 3,170 views
•
link
1 answer
The closest tool I can think of is the ReorderSam function from picard tools.
• 0 views
•
link
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).
• 0 views
•
link
Yes, you are right, I've been bitten by that before and still forgot about it.
• 0 views
•
link
Log in to answer this question.