Mercurial > repos > mingchen0919 > aurora_skewer
annotate shell-script-template.sh @ 5:2c663ddb8488 draft
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
| author | mingchen0919 |
|---|---|
| date | Wed, 25 Apr 2018 16:47:59 -0400 |
| parents | |
| children | 5b07e567864b |
| rev | line source |
|---|---|
|
5
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
1 # SHELL_SCRIPT file name |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
2 SHELL_SCRIPT='skewer.sh' |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
3 |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
4 # run SHELL_SCRIPT within tool outputs directory |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
5 cd ${REPORT_FILES_PATH} |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
6 |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
7 # build job-script.sh |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
8 cat >temp.sh <<EOF |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
9 skewer \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
10 ${X_A} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
11 ${X_B} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
12 -x ${X_x} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
13 -y ${X_y} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
14 -m ${X_m} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
15 -r ${X_r} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
16 -d ${X_D} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
17 -q ${X_q} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
18 -Q ${X_Q} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
19 -l ${X_l} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
20 -j ${X_j} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
21 -M ${X_M} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
22 -b ${X_b} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
23 -c ${X_b} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
24 -n ${X_n} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
25 -u ${X_u} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
26 -f ${X_f} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
27 -z ${X_z} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
28 -qiime ${X_E} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
29 -quiet ${X_F} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
30 -i ${X_i} \\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
31 -o trim > /dev/null 2>&1 |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
32 EOF |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
33 |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
34 # remove empty input lines |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
35 grep -v '\-M \\' temp.sh |\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
36 grep -v 'None' |\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
37 grep -v 'NO_ARGUMENT_NO' |\ |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
38 sed 's/NO_ARGUMENT_YES//g' > ${SHELL_SCRIPT} |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
39 |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
40 rm temp.sh |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
41 |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
42 # run SHELL_SCRIPT |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
43 sh ${SHELL_SCRIPT} |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
44 |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
45 # rename log file |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
46 if [ -e trim-trimmed.log ]; then |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
47 cp trim-trimmed.log trim-trimmed.txt |
|
2c663ddb8488
planemo upload commit f0ae5255b6c75f69c85319bba8da742be83f27d2-dirty
mingchen0919
parents:
diff
changeset
|
48 fi |
