forked from cunningham-lab/neurocaas_contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_pmd_main.sh
executable file
·40 lines (34 loc) · 1.25 KB
/
run_pmd_main.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
## Bash script that establishes ncap monitoring routines with minimal dependencies on other packages.
## Load in helper functions.
execpath="$0"
echo execpath
scriptpath="$(dirname "$execpath")/ncap_utils"
source "$scriptpath/workflow.sh"
## Import functions for data transfer
source "$scriptpath/transfer.sh"
## Now parse arguments in to relevant variables:
# Bucket Name $bucketname
# Group Directory $groupdir
# Results Directory $resultdir
# Dataset Name $dataname
# Dataset Full Path $datapath
# Configuration Name # configname
# Configuration Path # configpath
set -a
parseargsstd "$1" "$2" "$3" "$4"
set +a
## Example usage:
echo "$bucketname"/"$groupdir"/"$resultdir"/logs/DATASET_NAME:"$dataname"_STATUS.txt""
## Set up Error Status Reporting:
errorlog_init
## Set up STDOUT and STDERR Monitoring:
errorlog_background &
background_pid=$!
echo $background_pid, "is the pid of the background process"
## MAIN SCRIPT GOES HERE #####################
echo $bucketname "$groupdir/inputs" "$dataname" these are the variables to process
bash /home/ubuntu/bin/run.sh "$bucketname" "$groupdir/inputs" "$dataname" "$groupdir/configs" "$configname" "$groupdir/$resultdir"
##############################################
errorlog_final
kill "$background_pid"