This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Mapping reads to nuclear, chloroplast, and mitochondria genome separately but all resulting bam files are similar sizes

I mapped reads onto a nuclear, chloroplast, and mitochondrial genome separately using bwa mem and then sorted using samtools. Entire genome: 179 Mb, chloroplast: 169Kb, mitochondria: 43Kb. The resulting bam files are all similar in sizes (23G, 27G, and 27G). Is their an error? Why would this be the case?

chloroplast bwa-mem mitochondrial-genome

1 answer

Because a BAM contains all reads (mapped and unmapped) that were in the original fastq file, so this is normal and expected.

so for further process just remove unmapped reads from those bam files?

Technically you can do that to reduce file size. If you want that is on you.

This would be dependent on aligner options. Some aligners will allow you to drop unmapped reads.

Log in to answer this question.