Here are the results:
head -n1 genome.fas >Chr1 CHROMOSOME dumped from ADB: Jun/20/09 14:53; last updated: 2009-02-02 samtools view -H alignmentfile.bam @SQ SN:Chr1 LN:30427671 @SQ SN:Chr2 LN:19698289 @SQ SN:Chr3 LN:23459830 @SQ SN:Chr4 LN:18585056 @SQ SN:Chr5 LN:26975502 @SQ SN:chloroplast LN:154478 @SQ SN:mitochondria LN:366924
samtools view -H alignmentfile.bam.sorted.bam @HD VN:1.3 SO:coordinate @SQ SN:Chr1 LN:30427671 @SQ SN:Chr2 LN:19698289 @SQ SN:Chr3 LN:23459830 @SQ SN:Chr4 LN:18585056 @SQ SN:Chr5 LN:26975502 @SQ SN:chloroplast LN:154478 @SQ SN:mitochondria LN:366924
samtools view file.bam | head
Appears to give what I think are 10 or so alignments? I truncated the rest of the output.
M01440:92:000000000-AEGP7:1:1101:9444:1247 16 Chr5 5962715 32 50S176M * 0 0 [...]
I think it may be worth noting that I just found out that I can view the reads if I open the SAM file, but not the BAM file. Maybe something went wrong during the conversion?
It might be helpful to see the actual commands you executed to convert SAM to BAM.
This is the code I used: