Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
get_pion_signal.sh
# A little bash script to download our juicy ONT PION data
# If this doesn't work for you, express your disappointment to @samstudio8.
# Use "EVEN" or "LOG" for $1, eg: `bash get_pion_signal.sh EVEN`
MODE=$1
echo "Fetching signal blocks. Don't be afraid to CRTL+C and resume if needed..."
for i in {00..25}
do
echo $i;
wget -c https://nanopore.s3.climb.ac.uk/Zymo-PromethION-$MODE-BB-SN_signal.tar.$i;
done
wget -c https://nanopore.s3.climb.ac.uk/Zymo-PromethION-$MODE-BB-SN_signal.md5sums.remote;
echo "Calculating md5sums, this will definitely take a little while..."
echo "If you're feeling adventurous, you could go and comment these lines out."
md5sum Zymo-PromethION-$MODE-BB-SN_signal.tar.* > Zymo-PromethION-$MODE-BB-SN_signal.md5sums.local
echo "Comparing md5sums, if all is well, you shouldn't see any hashy looking output..."
comm -3 Zymo-PromethION-$MODE-BB-SN_signal.md5sums.local Zymo-PromethION-$MODE-BB-SN_signal.md5sums.remote
echo "---"
echo "Sticking your signal tar back together..."
echo "FYI, I'm doing this regardless of the above md5sum checks."
echo "The onus is on you to prevent any hash-based calamity."
cat Zymo-PromethION-$MODE-BB-SN_signal.tar.* > Zymo-PromethION-$MODE-BB-SN_signal.tar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment