changeset 1:771ebe02636f draft

Uploaded version 0.02.04.2: fix bug that causes tool to fail when prefix includes spaces; add explicit dependency on Perl 5.16.3.
author pjbriggs
date Mon, 23 Mar 2015 07:01:37 -0400
parents 3f908e7fff4f
children b6ccc7dd7b02
files README.rst pal_finder_wrapper.sh pal_finder_wrapper.xml tool_dependencies.xml
diffstat 4 files changed, 32 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/README.rst	Thu Dec 11 09:23:24 2014 -0500
+++ b/README.rst	Mon Mar 23 07:01:37 2015 -0400
@@ -54,6 +54,8 @@
 ========== ======================================================================
 Version    Changes
 ---------- ----------------------------------------------------------------------
+0.02.04.2  - Fix bug that causes tool to fail when prefix includes spaces;
+             add explicit dependency on Perl 5.16.3.
 0.02.04.1  - Add option to run Graeme Fox's ``pal_finder_filter.pl`` script to
              filter and sort the pal_finder output (Illumina input data only).
              Update version number to reflect the pal_finder version.
--- a/pal_finder_wrapper.sh	Thu Dec 11 09:23:24 2014 -0500
+++ b/pal_finder_wrapper.sh	Mon Mar 23 07:01:37 2015 -0400
@@ -44,6 +44,7 @@
 #  * PRIMER3_CORE_EXE: name of the primer3_core program, which should include the
 #    full path if it's not on the Galaxy user's PATH (defaults to primer3_core)
 #
+echo "### $(basename $0) ###"
 echo $*
 #
 # Initialise locations of scripts, data and executables
@@ -128,7 +129,8 @@
     case "$1" in
 	--primer-prefix)
 	    shift
-	    PRIMER_PREFIX=$1
+	    # Convert spaces to underscores in prefix
+	    PRIMER_PREFIX=$(echo $1 | tr " " "_")
 	    ;;
 	--2merMinReps)
 	    shift
@@ -242,6 +244,7 @@
 mkdir Output
 #
 # Copy in the default config.txt file
+echo "### Creating config.txt file for pal_finder run ###"
 /bin/cp $PALFINDER_DATA_DIR/config.txt .
 #
 # Update the config.txt file with new values
@@ -296,7 +299,9 @@
 set_config_value PRIMER_PAIR_MAX_DIFF_TM "$PRIMER_PAIR_MAX_DIFF_TM" config.txt
 #
 # Run pal_finder
+echo "### Running pal_finder ###"
 perl $PALFINDER_SCRIPT_DIR/pal_finder_v0.02.04.pl config.txt 2>&1 | tee pal_finder.log
+echo "### pal_finder finised ###"
 #
 # Check that log ends with "Done!!" message
 if [ -z "$(tail -n 1 pal_finder.log | grep Done!!)" ] ; then
@@ -306,6 +311,7 @@
 #
 # Run the pal_finder_filter.pl script from Graeme Fox
 if [ ! -z "$FILTERED_MICROSATS" ] ; then
+    echo "### Running filtering script ###"
     perl $PALFINDER_FILTER_PL Output/PAL_summary.txt 2>&1
     if [ $? -ne 0 ] ; then
 	echo ERROR pal_finder_filter.pl exited with non-zero status >&2
@@ -317,6 +323,7 @@
 fi
 #
 # Clean up
+echo "### Handling output files ###"
 if [ -f Output/microsat_summary.txt ] ; then
     /bin/mv Output/microsat_summary.txt $MICROSAT_SUMMARY
 fi
@@ -324,7 +331,6 @@
     /bin/mv Output/PAL_summary.txt $PAL_SUMMARY
 fi
 if [ ! -z "$FILTERED_MICROSATS" ] && [ -f pal_finder_filter_output.txt ] ; then
-    echo Moving pal_finder_filter_output.txt to $FILTERED_MICROSATS
     /bin/mv pal_finder_filter_output.txt $FILTERED_MICROSATS
 fi
 if [ ! -z "$OUTPUT_CONFIG_FILE" ] && [ -f config.txt ] ; then
--- a/pal_finder_wrapper.xml	Thu Dec 11 09:23:24 2014 -0500
+++ b/pal_finder_wrapper.xml	Mon Mar 23 07:01:37 2015 -0400
@@ -1,4 +1,4 @@
-<tool id="microsat_pal_finder" name="pal_finder" version="0.02.04.1">
+<tool id="microsat_pal_finder" name="pal_finder" version="0.02.04.2">
   <description>Find microsatellite repeat elements sequencing reads and design PCR primers to amplify them</description>
   <command interpreter="bash">pal_finder_wrapper.sh
   #if str( $platform.platform_type ) == "illumina"
@@ -13,7 +13,7 @@
   #if $keep_config_file
     --output_config_file $output_config_file
   #end if
-  --primer-prefix $primer_prefix
+  --primer-prefix "$primer_prefix"
   --2merMinReps $min_2mer_repeats
   --3merMinReps $min_3mer_repeats
   --4merMinReps $min_4mer_repeats
@@ -37,6 +37,7 @@
   #end if
   </command>
   <requirements>
+    <requirement type="package" version="5.16.3">perl</requirement>
     <requirement type="package" version="0.02.04">pal_finder</requirement>
     <requirement type="package" version="2.0.0">primer3_core</requirement>
   </requirements>
--- a/tool_dependencies.xml	Thu Dec 11 09:23:24 2014 -0500
+++ b/tool_dependencies.xml	Mon Mar 23 07:01:37 2015 -0400
@@ -29,6 +29,25 @@
       </install>
       <readme>pal_finder also needs Perl</readme>
     </package>
+    <package name="perl" version="5.16.3">
+      <install version="1.0">
+        <actions>
+          <!-- install perl -->
+          <action type="download_by_url">http://www.cpan.org/src/5.0/perl-5.16.3.tar.gz</action>
+          <action type="shell_command">./Configure -des -Dprefix=$INSTALL_DIR -Dstartperl='#!/usr/bin/env perl'</action>
+          <action type="make_install" />
+          <action type="set_environment">
+            <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
+          </action>
+        </actions>
+      </install>
+      <readme>
+        Perl 5 is a highly capable, feature-rich programming language with over 25 years of
+	development:
+
+        http://www.perl.org/
+      </readme>
+    </package>
     <package name="primer3_core" version="2.0.0">
       <install version="1.0">
 	<actions>