5
$\begingroup$

Is there a way to estimate the size of a BAM file will have after mapping with BWA?

The input file are two mates fastq files, compressed with gzip, each one about 70G.

$\endgroup$

1 Answer 1

4
$\begingroup$

A BAM file should have a roughly similar size to a compressed FASTQ file, because they're both compressed files that contain similar information. BAM will be slightly larger, because it contains information about mapping and differences from the reference.

If you are concerned about space and have a reference sequence available, you can store mapped reads as CRAM format, which will save a lot more space.

$\endgroup$
2
  • 4
    $\begingroup$ Could also be smaller if you remove duplicate reads. I doubt it will ever be significantly different in size from the original fastq file, but a +/- a few hundred megabytes (more for larger files) or so is to be expected. $\endgroup$
    – terdon
    Nov 25, 2017 at 14:20
  • 1
    $\begingroup$ A sorted BAM will be (potentially substantially) smaller than an equivalent FASTQ file, even when containing mapping information. $\endgroup$ Feb 4, 2019 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.