Mercurial > repos > pjbriggs > pal_finder
diff pal_finder_wrapper.sh @ 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 |
line wrap: on
line diff
--- 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