3
$\begingroup$

I have successfully downloaded the whole nt BLAST database into the current folder using:

wget -b "ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.??.tar.gz" 

However, I would like to download it in a specific folder, e.g. output/

I have tried:

wget -b "ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.??.tar.gz"  -O output/

but it does not work. Nothing happens. My 'wget-log' is empty.

I could move to that folder and download it there but I would like to remain in the same working directory.

C.

$\endgroup$

2 Answers 2

9
$\begingroup$

-O is to specify the name of the output file. You want the -P option.

So, from your example

wget -b "ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.??.tar.gz" -P output/
$\endgroup$
0
$\begingroup$

I recommend using NCBI's tool for this called update_blastdb.pl, shipped with the blast suite (I use the conda environment from bioconda).

cd to the directory you want nt DB in and run:

update_blastdb.pl --decompress nt

Pros: if a download fails for whatever reason it is retried, downloads are md5sum checked and re-running in a folder with an existing DB will (as the name suggests) only update the relevant DB portions. More information here!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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