mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
Reorganization of the documentation book directory
Former-commit-id: 095acaf9c8649b0e527c6253dc79330feedac865
This commit is contained in:
29
doc/book/wolf_data/download_gb.sh
Executable file
29
doc/book/wolf_data/download_gb.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
URL=https://ftp.ncbi.nlm.nih.gov/genbank/
|
||||
DIV="bct|inv|mam|phg|pln|pri|rod|vrl|vrt"
|
||||
|
||||
GB_Release_Number=$(curl "${URL}GB_Release_Number")
|
||||
|
||||
mkdir -p "Release-${GB_Release_Number}"
|
||||
cd "Release-${GB_Release_Number}"
|
||||
|
||||
curl $URL > index.html
|
||||
|
||||
for f in $(egrep "gb(${DIV})[0-9]+\.seq\.gz" index.html \
|
||||
| sed -E 's@^.*<a href="([^"]+)">.*</a>.*$@\1@' ) ; do
|
||||
echo -n "File : $f"
|
||||
|
||||
if [[ -f $f ]] ; then
|
||||
gzip -t $f && echo " ok" || rm -f $f
|
||||
fi
|
||||
|
||||
while [[ ! -f $f ]] ; do
|
||||
echo downloading
|
||||
wget2 --progress bar -v -o - $URL$f
|
||||
if [[ -f $f ]] ; then
|
||||
gzip -t $f && echo " ok" || rm -f $f
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user