<p>You'll get the exact same index (the <code>amb</code>, <code>ann</code>, <code>bwt</code>, <code>pac</code> and <code>sa</code> files) whether the reference is gzipped or not. BWA also makes its own packed reference sequence (the .pac file) so you don't even need the genome around after you index.</p>

CC BY-SA 3.0
2017-06-02T19:46:16.340Z
2017-06-02T19:46:16.340Z
Devon Ryan
<p>I have indexed a gzipped reference with bwa: <code>bwa index reference.fa.gz</code>, which produces a series of other files <code>reference.fa.gz.{amb,ann,bwt,pac,sa}</code>. These are working fine with bwa alignment.</p>

<p>I have discovered that samtools does not take a gzipped reference, so I am planning to use an unzipped version of the reference for my workflow instead of dealing with two separate representations of the reference. </p>

<p>Are the files <code>reference.fa.gz.{amb,ann,bwt,pac,sa}</code> dependent upon the reference being gzipped? Do I need to reindex the unzipped reference.fa with bwa, or can I just rename the current files to remove the <code>.gz</code> portion of the filename? </p>

<bwa><samtools><reference-genome>
What are all the reference files produced by bwa index, and are these dependent upon whether the reference is zipped?
# What are all the reference files produced by bwa index, and are these dependent upon whether the reference is zipped?

(Asked by: username_0 on 2017-06-02)

I have indexed a gzipped reference with bwa: `bwa index reference.fa.gz`, which produces a series of other files `reference.fa.gz.{amb,ann,bwt,pac,sa}`. These are working fine with bwa alignment.

I have discovered that samtools does not take a gzipped reference, so I am planning to use an unzipped version of the reference for my workflow instead of dealing with two separate representations of the reference.

Are the files `reference.fa.gz.{amb,ann,bwt,pac,sa}` dependent upon the reference being gzipped? Do I need to reindex the unzipped reference.fa with bwa, or can I just rename the current files to remove the `.gz` portion of the filename?

**Tags:** bwa, samtools, reference-genome

---

## 1 answers

### Answer by username_1 on 2017-06-02. Score: 9 | Accepted answer

You'll get the exact same index (the `amb`, `ann`, `bwt`, `pac` and `sa` files) whether the reference is gzipped or not. BWA also makes its own packed reference sequence (the .pac file) so you don't even need the genome around after you index.


---

