diff trimmomatic_BACKUP_16925.sh @ 4:642a39a927c9 draft

planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit b30cac62484ba664a19a02a6817752f4f2b140bf
author sanbi-uwc
date Mon, 23 Jan 2017 07:46:47 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/trimmomatic_BACKUP_16925.sh	Mon Jan 23 07:46:47 2017 -0500
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# Shell wrapper to run Trimmomatic jar file as a Galaxy tool
+echo Arguments:
+for i in $@ ; do
+    echo "*" $i
+done
+
+if [ -n "$CONDA_PREFIX" ] ; then
+  # bioconda installs trimmomatic in a share directory
+  # with a jarfile called trimmomatic.jar
+  TRIMMOMATIC_DIR="$CONDA_PREFIX/share/trimmomatic"
+  JARFILE="trimmomatic.jar"
+else
+  JARFILE="trimmomatic-0.36.jar"
+fi
+
+if [ -z "$TRIMMOMATIC_DIR" ] ; then
+  echo "TRIMMOMATIC_DIR variable not set, can't find jar file"
+  exit 1
+fi
+
+java -mx16G -jar $TRIMMOMATIC_DIR/$JARFILE $@ 2>&1 | tee trimmomatic.log
+status=$?
+echo "Exit status: $status"
+# Check for successful completion
+if [ -z "$(tail -1 trimmomatic.log | grep "Completed successfully")" ] ; then
+    echo "Trimmomatic did not finish successfully" >&2
+    exit 1
+fi
+exit $status
+##
+#