3

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.

Biomagician
  • 2,459
  • 16
  • 30

2 Answers2

9

-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/
pufferfish
  • 103
  • 2
heathobrien
  • 1,816
  • 7
  • 16
0

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!

bricoletc
  • 161
  • 3