Samtools Spells

If you use Alex Dobin's genome build and forgot he uses # instead of chr#, and you feel sad. Don't worry, use this to fix your bam files:

samtools view input.bam -h | sed -e '/^@SQ/s/SN\:/SN\:chr/' -e '/^[^@]/s/\t/\tchr/2' | samtools view -bSh - > corrected.bam
samtools sort on naxos vs naxos2
# naxos
samtools sort unsorted.bam sorted
# naxos2
samtools sort unsorted.bam -o sorted.bam >> sorted.bam