Counting reads per chromosome in BAM files
BAM files store aligned sequence reads in a compressed binary format. Counting reads by chromosome is a common task in genomics workflows—useful for quality control, coverage analysis, and identifying potential sequencing biases. Using samtools idxstats The fastest and most straightforward approach is samtools idxstats, which requires an indexed BAM file: samtools index reads.bam samtools idxstats…
