-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsubmit.sh
executable file
·79 lines (63 loc) · 2.71 KB
/
submit.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
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
#!/bin/bash
set -e
export PYTHONPATH=`pegasus-config --python`
TOPDIR=`pwd`
<<DO_NOT_COMMENT_OUT
You can use raw Illumina sequences stored locally instead of downloading them from NCBI.
To do this, you will need to add information about the input files in rc.txt.
You can add these files in a loop as shown below, or any way you prefer.
You should also comment out the dependency in root-dax.py to skip the download.
DO_NOT_COMMENT_OUT
<<COMM
while read line
do
echo ''${line}'_1.fastq file:///absolute_path_to_fastq_files/'${line}'_1.fastq site="local"' >> rc.txt
echo ''${line}'_2.fastq file:///absolute_path_to_fastq_files/'${line}'_2.fastq site="local"' >> rc.txt
done < sra_ids.txt
COMM
# Clean old directories and files
rm -rf data_tmp
rm -rf scratch
rm -rf outputs
rm -rf prokevo
rm -rf $USER
rm -rf root-pipeline.dax
rm -rf sites.xml
rm -rf rc.txt
cp rc.txt.org rc.txt
# Set working path to current directory
sed -i "s|ProkEvo_dir|$PWD|g" tc.txt
sed -i "s|ProkEvo_dir|$PWD|g" rc.txt
for i in scripts/*.sh
do
sed -i "s|ProkEvo_dir|$PWD|g" $i
done
export RUN_DIR=$TOPDIR/data_tmp
mkdir -p $RUN_DIR
./root-dax.py $RUN_DIR > root-pipeline.dax
# create the site catalog
# this section contains the information about the running site
cat > sites.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<sitecatalog xmlns="http://pegasus.isi.edu/schema/sitecatalog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pegasus.isi.edu/schema/sitecatalog http://pegasus.isi.edu/schema/sc-4.0.xsd" version="4.0">
<site handle="local-hcc" arch="x86_64" os="LINUX">
<directory type="shared-scratch" path="${PWD}/scratch">
<file-server operation="all" url="file://${PWD}/scratch"/>
</directory>
<directory type="local-storage" path="${PWD}/outputs">
<file-server operation="all" url="file://${PWD}/outputs"/>
</directory>
<profile namespace="pegasus" key="style">glite</profile>
<!-- tell pegasus that local-hcc is accessible on submit host -->
<profile namespace="pegasus" key="auxillary.local">true</profile>
<profile namespace="condor" key="grid_resource">batch slurm</profile>
<profile namespace="pegasus" key="queue">batch</profile>
<profile namespace="env" key="PEGASUS_HOME">/util/opt/pegasus-wms/5.0/</profile>
<profile namespace="condor" key="request_memory"> ifthenelse(isundefined(DAGNodeRetry) || DAGNodeRetry == 0, 2000, 120000) </profile>
</site>
</sitecatalog>
EOF
# plan and submit the root workflow
pegasus-plan --conf pegasusrc --sites local-hcc --output-site local-hcc --dir ${PWD} --submit root-pipeline.dax # --cluster label
# to resume/restart fixed workflow
# pegasus-run <run_directory>