4
$\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$
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 '17 at 14:20
  • $\begingroup$ A sorted BAM will be (potentially substantially) smaller than an equivalent FASTQ file, even when containing mapping information. $\endgroup$ – Konrad Rudolph Feb 4 '19 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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