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

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?

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.