-
Notifications
You must be signed in to change notification settings - Fork 33
/
download-ebi.sh
31 lines (28 loc) · 768 Bytes
/
download-ebi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# @AUTHOR: Chun-Jie Liu
# @CONTACT: chunjie.sam.liu.at.gmail.com
# @DATE: 2021-05-08 10:34:14
# @DESCRIPTION:
# Number of input parameters
url="ftp.ebi.ac.uk"
remote_dir="/pub/databases/metagenomics/mgnify_genomes/human-gut/v1.0/uhgg_catalogue"
prefix="MGYG-HGUT-0"
for i in `seq 0 4`;
do
for j in `seq 0 9`;
do
[[ ${i} -eq 4 && ${j} -gt 6 ]] && continue
dir1=${prefix}${i}${j}
for m in `seq 0 9`;
do
for n in `seq 0 9`;
do
[[ ${i}${j}${m}${n} = "0000" ]] && continue
[[ ${i}${j} = "46" && ${m}${n} -gt 44 ]] && continue
dir2=${dir1}${m}${n}
cmd="lftp -e \"get -c ${remote_dir}/${dir1}/${dir2}/genome/${dir2}.fna\" ftp.ebi.ac.uk"
echo ${cmd}
done
done
done
done