Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to download methyl files #415

Merged
merged 7 commits into from
Jul 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions scripts/download_methyl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

set -e
set -o pipefail

# download methylation files from the OpenPedCan data v12 data release s3 bucket

URL="https://d3b-openaccess-us-east-1-prd-pbta.s3.amazonaws.com/open-targets"
RELEASE="v13"

FILES=(`tr -s ' ' < ../data/$RELEASE/methyl-md5sum.txt | cut -d ' ' -f 2` release-notes.md)
for file in "${FILES[@]}"
do
if [ ! -e "../data/$RELEASE/$file" ]
then
echo "Downloading $file"
curl $URL/$RELEASE/$file -o ../data/$RELEASE/$file
fi
done

#check md5sum
cd ../data/$RELEASE
echo "Checking MD5 hashes..."
md5sum -c methyl-md5sum.txt
cd ../../

# Make symlinks in data/ to the files in the just downloaded release folder.
for file in "${FILES[@]}"
do
ln -sfn $RELEASE/$file data/$file
done
Loading