Commit 0c90455b authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Add email option.

parent 55615bed
...@@ -12,8 +12,9 @@ usage() { ...@@ -12,8 +12,9 @@ usage() {
echo "-h --Help documentation for $script_name" echo "-h --Help documentation for $script_name"
echo "-r --Study_RID." echo "-r --Study_RID."
echo "-t --Tag of pipelne" echo "-t --Tag of pipelne"
echo "-e --Email on failure"
echo "-o --Path to output directory" echo "-o --Path to output directory"
echo "Example: $script_name -r 16-1ZP0 -t 0.1.0 -o '/path/to/output/dir/'" echo "Example: $script_name -r 16-1ZP0 -t 0.1.0 -e 'first.last@utsouthwestern.edu' -o '/path/to/output/dir/'"
exit 1 exit 1
} }
...@@ -26,11 +27,12 @@ main(){ ...@@ -26,11 +27,12 @@ main(){
# Parsing options # Parsing options
OPTIND=1 # Reset OPTIND OPTIND=1 # Reset OPTIND
while getopts :r:t:0:h opt while getopts :r:t:e:o:h opt
do do
case $opt in case $opt in
r) rid=$OPTARG;; r) rid=$OPTARG;;
t) tag=$OPTARG;; t) tag=$OPTARG;;
e) email=$OPTARG;;
o) out=$OPTARG;; o) out=$OPTARG;;
h) usage;; h) usage;;
esac esac
...@@ -39,7 +41,7 @@ main(){ ...@@ -39,7 +41,7 @@ main(){
shift $(($OPTIND -1)) shift $(($OPTIND -1))
# Check for mandatory options # Check for mandatory options
if [[ -z $rid ]] || [[ -z $tag ]] || [[ -z $out ]]; then if [[ -z $rid ]] || [[ -z $tag ]] || [[ -z $email ]] || [[ -z $out ]]; then
usage usage
fi fi
...@@ -70,7 +72,7 @@ main(){ ...@@ -70,7 +72,7 @@ main(){
cd rna-seq cd rna-seq
# run pipeline on replicate RIDs in parallel # run pipeline on replicate RIDs in parallel
while read repRID; do echo ${repRID}; sleep 30; done < "../${rid}_studyRID.csv" | xargs -P 5 -I {} nextflow -q run workflow/rna-seq.nf --repRID {} --source production --deriva /project/BICF/BICF_Core/shared/gudmap/test_data/auth/credential.json --bdbag /project/BICF/BICF_Core/shared/gudmap/test_data/auth/cookies.txt --dev false --upload true --email gervaise.henry@utsouthwestern.edu -with-report ./output/{}_report.html -with-timeline ./output/{}_timeline.html while read repRID; do echo ${repRID}; sleep 30; done < "../${rid}_studyRID.csv" | xargs -P 5 -I {} nextflow -q run workflow/rna-seq.nf --repRID {} --source production --deriva /project/BICF/BICF_Core/shared/gudmap/test_data/auth/credential.json --bdbag /project/BICF/BICF_Core/shared/gudmap/test_data/auth/cookies.txt --dev false --upload true --email ${email} -with-report ./output/{}_report.html -with-timeline ./output/{}_timeline.html
} }
main "$@" main "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment