Skip to content

Instantly share code, notes, and snippets.

@flekschas
Created April 21, 2016 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flekschas/8d7aedf5d70208eb5ec7683cf1b7c337 to your computer and use it in GitHub Desktop.
Save flekschas/8d7aedf5d70208eb5ec7683cf1b7c337 to your computer and use it in GitHub Desktop.
Grab all ISA-Tabs from Nature Scientific Data
#!/bin/bash
# Download Nature Scientific Data ISA Tabs
YEARS[0]=2014
YEARS[1]=2015
YEARS[2]=2016
NUM_ISA_TABS[0]=53
NUM_ISA_TABS[1]=76
# This number will most likely go up.
NUM_ISA_TABS[2]=24
for i in "${!YEARS[@]}";
do
echo "Year ${YEARS[$i]}"
for j in `seq 1 ${NUM_ISA_TABS[$i]}`;
do
[ -f ./sdata${YEARS[$i]}$j-isa1.zip ] || curl -L -O http://www.nature.com/article-assets/npg/sdata/${YEARS[$i]}/sdata${YEARS[$i]}$j/isa-tab/sdata${YEARS[$i]}$j-isa1.zip
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment