annotate trimmomatic_LOCAL_16925.sh @ 5:069b6b601fad draft default tip

planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 779c2af9e413bd7098662231d07e6b857161f48d
author sanbi-uwc
date Mon, 23 Jan 2017 07:53:06 -0500
parents 642a39a927c9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
1 #!/bin/sh
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
2 #
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
3 # Shell wrapper to run Trimmomatic jar file as a Galaxy tool
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
4 echo Arguments:
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
5 for i in $@ ; do
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
6 echo "*" $i
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
7 done
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
8
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
9 if [ -n "$CONDA_PREFIX" ] ; then
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
10 # bioconda installs trimmomatic in a share directory
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
11 # with a jarfile called trimmomatic.jar
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
12 TRIMMOMATIC_DIR="$CONDA_PREFIX/share/trimmomatic"
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
13 JARFILE="trimmomatic.jar"
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
14 else
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
15 JARFILE="trimmomatic-0.36.jar"
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
16 fi
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
17
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
18 if [ -z "$TRIMMOMATIC_DIR" ] ; then
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
19 echo "TRIMMOMATIC_DIR variable not set, can't find jar file"
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
20 exit 1
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
21 fi
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
22
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
23 java -mx16G -jar $TRIMMOMATIC_DIR/$JARFILE $@ 2>&1 | tee trimmomatic.log
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
24 status=$?
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
25 echo "Exit status: $status"
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
26 # Check for successful completion
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
27 if [ -z "$(tail -1 trimmomatic.log | grep "Completed successfully")" ] ; then
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
28 echo "Trimmomatic did not finish successfully" >&2
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
29 exit 1
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
30 fi
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
31 exit $status
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
32 ##
642a39a927c9 planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
sanbi-uwc
parents:
diff changeset
33 #