annotate run_planemo_tests.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 d8975856862e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
1 #!/bin/bash
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
2 #
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
3 # Install dependencies and set up environment for
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
4 # trimmomatic tool, then run tests using planemo
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
5 #
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
6 # Note that any arguments supplied to the script are
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
7 # passed directly to the "planemo test..." invocation
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
8 #
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
9 # e.g. --install_galaxy (to get planemo to create a
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
10 # Galaxy instance to run tests)
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
11 #
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
12 # --galaxy_root DIR (to run tests using existing
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
13 # Galaxy instance)
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
14 #
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
15 # List of dependencies
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
16 TOOL_DEPENDENCIES="trimmomatic/0.36"
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
17 # Where to find them
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
18 TOOL_DEPENDENCIES_DIR=$(pwd)/test.tool_dependencies.trimmomatic
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
19 if [ ! -d $TOOL_DEPENDENCIES_DIR ] ; then
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
20 echo WARNING $TOOL_DEPENDENCIES_DIR not found >&2
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
21 echo Creating tool dependencies dir
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
22 mkdir -p $TOOL_DEPENDENCIES_DIR
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
23 echo Installing tool dependencies
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
24 $(dirname $0)/install_tool_deps.sh $TOOL_DEPENDENCIES_DIR
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
25 fi
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
26 # Load dependencies
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
27 for dep in $TOOL_DEPENDENCIES ; do
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
28 env_file=$TOOL_DEPENDENCIES_DIR/$dep/env.sh
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
29 if [ -e $env_file ] ; then
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
30 . $env_file
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
31 else
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
32 echo ERROR no env.sh file found for $dep >&2
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
33 exit 1
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
34 fi
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
35 done
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
36 # Run the planemo tests
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
37 planemo test $@ $(dirname $0)/trimmomatic.xml
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
38 ##
d8975856862e planemo upload for repository https://github.com/SANBI-SA/galaxy-tools/tree/master/tools/trimmomatic commit 59bf1dad1e71026bff0431a020335c51ce1fd153
sanbi-uwc
parents:
diff changeset
39 #