I downloaded a bam file of an exome sequence from the 1000 genome project website and ran samtools view to extract chromosome 22. My command was
samtools view -b NA20515.bam 22 > chr22.bam
I received the message
random alignment retrieval only works for indexed BAM or CRAM files but it still created a bam file nonetheless that was 5 kb in size. I then ran
samtools index chr22.bam to create the indexed bam file. I want to map the reads in Tablet genome viewer, so I load the chr22 bam file with the reference genome in Tablet, but when I visualize all of the reads in tablet all I see are N's. Did I do something wrong with samtools?