# Author by zhangyida
# 詹皇明年夺冠
download_empiar.sh
#!/usr/bin/env bash
# Downloads a dataset with a given accession code from EMPIAR
##########
ACCESSION_CODE=$1
DEST='/work3/cse/scarf1041'
##########
usage () {
echo 'download_empiar.sh <accession_code>'
}
if [ $# -eq 0 ]
then usage
exit 1
fi
##########
EMPIAR_URI="ftp://ftp.ebi.ac.uk/empiar/world_availability/${ACCESSION_CODE}/*"
LOGFILE="${DEST}/EMPIAR-${ACCESSION_CODE}_download.log"
wget
--continue
--background
--directory-prefix ${DEST}
--mirror ${EMPIAR_URI}
--output-file ${LOGFILE}