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

Add email option.

parent 55615bed
......@@ -12,8 +12,9 @@ usage() {
echo "-h --Help documentation for $script_name"
echo "-r --Study_RID."
echo "-t --Tag of pipelne"
echo "-e --Email on failure"
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
}
......@@ -26,11 +27,12 @@ main(){
# Parsing options
OPTIND=1 # Reset OPTIND
while getopts :r:t:0:h opt
while getopts :r:t:e:o:h opt
do
case $opt in
r) rid=$OPTARG;;
t) tag=$OPTARG;;
e) email=$OPTARG;;
o) out=$OPTARG;;
h) usage;;
esac
......@@ -39,7 +41,7 @@ main(){
shift $(($OPTIND -1))
# Check for mandatory options
if [[ -z $rid ]] || [[ -z $tag ]] || [[ -z $out ]]; then
if [[ -z $rid ]] || [[ -z $tag ]] || [[ -z $email ]] || [[ -z $out ]]; then
usage
fi
......@@ -70,7 +72,7 @@ main(){
cd rna-seq
# 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 "$@"
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