This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Run Makeblastdb For Compressed File

Hi all, Does anyone know how to make database for compressed file fasta.gz using blast? I am using the blast2.2.29+. I saw the tutorial of makeblastdb, there is no option for dealing with the fasta.gz file. Does that mean I have to unzip the file first and then build database?

blast+ makeblastdb

1 answer

You should be able to uncompress the file then pipe the output to makeblastdb, without an intermediate file. The command would look something like:

gunzip -c myfastafile.gz | makeblastdb -in stdin <other options>

or

gunzip -c myfastafile.gz | makeblastdb -in - <other options>

I had the same question and was so relieved to find this solution, thanks!

However, I would like to note that the SECOND syntax above:

gunzip -c myfastafile.gz | makeblastdb -in - <other options>

is the correct one. The first one does not work

Log in to answer this question.