Answers.Body: <p>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.</p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-25T14:20:19.890Z
Answers.Text: 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.
Answers.UserDisplayName: terdon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-04T14:26:49.393Z
Answers.Text: A *sorted* BAM will be (potentially substantially) *smaller* than an equivalent FASTQ file, even when containing mapping information.
Answers.UserDisplayName: Konrad Rudolph
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-25T01:42:16.123Z
Answers.LastActivityDate: 2017-11-25T01:42:16.123Z
Answers.UserDisplayName: gringer
Body: <p>Is there a way to estimate the size of a BAM file will have after mapping with BWA?</p>
  
  <p>The input file are two mates fastq files, compressed with gzip, each one about 70G.</p>
  
Tags: <sam><fastq><bwa>
Title: Estimating BAM file from compressed fastq file size
ThreadText: # Estimating BAM file from compressed fastq file size
  
  (Asked by: username_0 on 2017-11-24)
  
  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.
  
  **Tags:** sam, fastq, bwa
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-11-25. Score: 4 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_2**: 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.  
  > **username_3**: A *sorted* BAM will be (potentially substantially) *smaller* than an equivalent FASTQ file, even when containing mapping information.  
  
  ---
  
  