itmat / rum

RNA-Seq Unified Mapper
http://cbil.upenn.edu/RUM
MIT License
26 stars 4 forks source link

SAM headers should be changed to contain all chromosomes #163

Open mdelaurentis opened 11 years ago

mdelaurentis commented 11 years ago

A user tried to merge two SAM files from different jobs that were mapped against the same genome. The "samtools merge" command failed, complaining about incompatible headers in the SAM files.

I noticed that each file had a few chromosomes listed in the headers that were not listed in the other file. I advised them to modify the headers so they had the same chromosomes listed, and this fixed the problem.

It looks like we only create header lines for chromosomes that actually have reads that map too them. While this seems sensible, I think in order to have SAM files that are compatible with each other we should probably just create a header line for each annotated chromosome.