-
Notifications
You must be signed in to change notification settings - Fork 2
/
submit
executable file
·90 lines (69 loc) · 2.5 KB
/
submit
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
set -e
# are we on OSG Connect?
if [ -e /stash2 ]; then
# needed for stashcp to be picked up the site catalog for the local site
module load xrootd
module load stashcp
module load pegasus
TOPDIR=`pwd`
export RUN_ID=osg-gem-`date +'%s'`
export RUN_DIR=/local-scratch/$USER/workflows/$RUN_ID
mkdir -p $RUN_DIR/scratch/$RUN_ID/level-2
# make the data availabile over http
mkdir -p /stash2/user/$USER/public/$RUN_ID/data
ln -s /stash2/user/$USER/public/$RUN_ID/data $RUN_DIR/data
# generate the site catalog
SC=$RUN_DIR/sites.xml
envsubst <sites.xml.template >$SC
# generate the dax
export PYTHONPATH=`pegasus-config --python`
./tools/dax-level-1 $RUN_ID $RUN_DIR $RUN_DIR/data
echo
echo "An 'Output's directory will be created within the base of the workflow directory."
echo "This directory, $RUN_DIR/outputs"
echo "will have a 'merged_GEM.tab' file, an expression vector for each individual file,"
echo "and a report of trimming and alignment statistics, QC_Report.tab"
# plan and submit the workflow
echo
pegasus-plan \
-Dpegasus.catalog.site.file=$SC \
--conf pegasus.conf \
--relative-dir $RUN_ID \
--sites condorpool \
--staging-site stash \
--output-site local \
--dir $RUN_DIR/workflow \
--dax dax.xml \
--submit
else
# jetstream
TOPDIR=`pwd`
export RUN_ID=osg-gem-`date +'%s'`
export RUN_DIR=$PWD/runs/$RUN_ID
mkdir -p $RUN_DIR/scratch/$RUN_ID/level-2
mkdir -p $RUN_DIR/data
# generate the site catalog
SC=$RUN_DIR/sites.xml
envsubst <sites.xml.template >$SC
# generate the dax
export PYTHONPATH=`pegasus-config --python`
./tools/dax-level-1 $RUN_ID $RUN_DIR $RUN_DIR/data
echo
echo "An 'Output's directory will be created within the base of the workflow directory."
echo "This directory, $RUN_DIR/outputs"
echo "will have a 'merged_GEM.tab' file, an expression vector for each individual file,"
echo "and all standard output files from trimmomatic/hisat2 jobs."
# plan and submit the workflow
echo
pegasus-plan \
-Dpegasus.catalog.site.file=$SC \
--conf pegasus.conf \
--relative-dir $RUN_ID \
--sites jetstream-condorpool \
--staging-site jetstream-staging \
--output-site local \
--dir $RUN_DIR/workflow \
--dax dax.xml \
--submit
fi