Created
January 4, 2024 15:58
-
-
Save d0choa/714d341d1d5e95a05b26a68570d9e8e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Job requirements | |
#Submit this script with: sbatch thefilename | |
#For more details about each parameter, please check SLURM sbatch documentation https://slurm.schedmd.com/sbatch.html | |
#SBATCH --time=8:00:00 # walltime | |
#SBATCH --ntasks=1 # number of tasks | |
#SBATCH --cpus-per-task=16 # number of CPUs Per Task i.e if your code is multi-threaded | |
#SBATCH --nodes=1 # number of nodes | |
#SBATCH -p datamover # partition(s) | |
#SBATCH --mem=32G # memory per node | |
#SBATCH -J "gcp-uploader" # job name | |
#SBATCH -o "/nfs/production/opentargets/lsf/logs/ot_gwascat_gcp_rsync-%j.out" # job output file | |
#SBATCH -e "/nfs/production/opentargets/lsf/logs/ot_gwascat_gcp_rsync-%j.err" # job error file | |
target_path='gs://open-targets-gwas-summary-stats/raw-harmonised/' | |
base_path=/nfs/ftp/public/databases/gwas/summary_statistics/ | |
gsutil_path=${HOME}/google-cloud-sdk/bin | |
path_ops_baseline="/nfs/production/opentargets/ot-ops" | |
path_ops_credentials="${path_ops_baseline}/credentials" | |
path_ops_gcp_service_account="${path_ops_credentials}/gcp-service-account-gwas-summary-stats.json" | |
# Setting up credentials: | |
${gsutil_path}/gcloud auth activate-service-account --key-file=${path_ops_gcp_service_account} | |
${gsutil_path}/gsutil -m rsync -r -d -x '^(?!.*\.h\.tsv\.gz$)' ${base_path} ${target_path}[ochoa@codon-slurm-login-02 gwas-summary-stats]$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment