Repository 'trimmomatic'
hg clone https://toolshed.g2.bx.psu.edu/repos/pjbriggs/trimmomatic

Changeset 5:f80107cdc406 (2016-12-16)
Previous changeset 4:14d05f2d511d (2016-07-14) Next changeset 6:141bba0e9a77 (2017-02-24)
Commit message:
Updated to 0.36.1: Reimplement to work with bioconda Trimmomatic 0.36 (toolshed version is still supported for now).
modified:
README.rst
tool_dependencies.xml
trimmomatic.xml
added:
trimmomatic_macros.xml
removed:
test-data/trimmomatic_r1_paired_maxinfo.fastq
test-data/trimmomatic_r1_unpaired_maxinfo.fastq
test-data/trimmomatic_r2_paired_maxinfo.fastq
test-data/trimmomatic_r2_unpaired_maxinfo.fastq
trimmomatic.sh
b
diff -r 14d05f2d511d -r f80107cdc406 README.rst
--- a/README.rst Thu Jul 14 09:17:38 2016 -0400
+++ b/README.rst Fri Dec 16 11:31:55 2016 -0500
b
@@ -58,6 +58,8 @@
 ========== ======================================================================
 Version    Changes
 ---------- ----------------------------------------------------------------------
+0.36.1     - Reimplement to work with bioconda Trimmomatic 0.36 (toolshed version
+             is still supported for now).
 0.36.0     - Update to Trimmomatic 0.36.
 0.32.4     - Add support for ``AVGQUAL`` and ``MAXINFO`` operations.
 0.32.3     - Add support for FASTQ R1/R2 pairs using dataset collections (input
b
diff -r 14d05f2d511d -r f80107cdc406 test-data/trimmomatic_r1_paired_maxinfo.fastq
--- a/test-data/trimmomatic_r1_paired_maxinfo.fastq Thu Jul 14 09:17:38 2016 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,40 +0,0 @@
-@MISEQ:1:000000000-A2Y1L:1:1101:19264:2433 1:N:0:NAAGGCGATAGATCGC
-AGATAGCCGAAGATAAAGAGNTCATAACCGTAAAGGCCAGAGACGAGAACCACTCGCAGGCAAGGTTTGCAAGCCTCGCCAAGAATATTATAGACCCGCTTGCCAACGACTGGCATTACATCACCGTAAAGAAGG
-+
-?????BBB@BBBB?BBFFFF#66EAFHHHCEFEDFGHHHHF@DFHACEEF@FDFHHHHEEEHHHF?FGEHFHDEFGHHCEHEFHHHHFFFCFDFFFFBEEEEEEEEEEEB?EEEEEEEEEEEBBEE?CE?:ACCC
-@MISEQ:1:000000000-A2Y1L:1:1101:18667:2435 1:N:0:NAAGGCGATAGATCGC
-ATATATTCATCCGCCATTATNAGAGTCCGATTACTTTAGAACAGTGCCGCGAATCCTTCGTCAACTGTAATCCAAGCGACATTGGTTCGATTAGCACGCATGAGGCACGAGATCTACGCGTATCTCTGG
-+
-?????BBBDDDDADDDE@FF#66CFCFHHBEHHIIIHIIHHFHHGHHHHHHHHHHIHIHIFHHHHHHEGFHIHHIIIHHHHHHHHCFHHHHHHHFFFFFFEEEEFFEFEEBBEEEFFE@E8;EEFFFEF
-@MISEQ:1:000000000-A2Y1L:1:1101:17523:2436 1:N:0:NAAGGCGATAGATCGC
-CATCACTACCGCTCAGGAATNTGACGGCAGTCTTAGCGGCGCTCTAGTGCGGGAGGCCGTATCTTGGAATAAGGTGTCGTCAAATGCAAGGCAGGTAACCCTACACGCCG
-+
-?<,<?BBBBBBBBBBBFFFF#6ACECCEC78CE=CGHEH7CHCHFGHADGHHHCCCHHE<DFHFFFFDFFFFFFDFDFDDEEEEEEEEECAEEEE;?BEEEBEEBCE;C;
-@MISEQ:1:000000000-A2Y1L:1:1101:15489:2437 1:N:0:NAAGGCGATAGATCGC
-GAGCAGTCGGGCTCAGCGCTNTGCAAATTCTAGTTAGAAACTCACAGTTCTGACAAGCCTTAGGTCAGTG
-+
-5====>/<@@@@@@>@CCCE#66>ACEEEEGGGGGGGFFFEFDFFFFF=CDEFFFFEDEFFFFFC=AEBF
-@MISEQ:1:000000000-A2Y1L:1:1101:18851:2442 1:N:0:NAAGGCGATAGATCGC
-GGTATCCCCCGGCAGTGAGGATGGAGCCATGGTCTGCATCATACTCACCGTAGGTGAGAATATCCACGTCCTTCGACTCCTGGGTGCCGTCTATGGTGCCCTCTGTTACCAGGCAGTGACGGAGGACATGG
-+
-??,<?BBBDDDDDDD<FFF@FC;FFFBEFHHHCDDHHGHHHDGHHHFHHEA?EEAEEHDEFHHHHHFECFHHHFHDHEEHHCFH7CEFHDEHHCFHHFHHF=FFFDFDFFFFEEEEDDEFEEE<BBCEBCE
-@MISEQ:1:000000000-A2Y1L:1:1101:15290:2442 1:N:0:NAAGGCGATAGATCGC
-AAAATAATCCTAAAAAATAACCTCTATGCCGCCGAACGCTCCGCCTCTATCTTCGTAAAAACTATCTTCTCCTCCTCACCTCCATAATCAAGCATCAAGCGATCGCCCTCCGCCAACTCACCCCGCAAAATCTTATCCGCTAGCGGATTCTCAATCTCCGTCTGAATGACCCGCC
-+
-?????BBBDDDDDDDDGGGGGGIIIHHFFHHHHHHHHHHEHHEHHHHHIIHHHHHFEHIIIHHIHHIHIHIIIIIHHHHHHHHHHHHHHHHDHHHHHHHHGEDFGGGGGGG;CEGEGCEGGGGG8>GGGGEGGEECEGGGGD8EDGGAEGEEGGCE:CGG8CEEGG???CEE<DG
-@MISEQ:1:000000000-A2Y1L:1:1101:18106:2444 1:N:0:NAAGGCGATAGATCGC
-GTAGTATTCTCATATCACAAGTCCCCAAACTGCATAAGGTGTGGAGTGGAGTGTCTCCCACTGCATTTTGTTGGTTTGGGTTGCATTTTTTGTGGCACAAAATTATCTTTAAACACTCTAAGCTCATATTTGCACATGCAACATGAATT
-+
-55,,5?9BBBBB<<BBFFFFFFFHHFBEFHFHHHFDFCF0A9@>9D9DFG;FHHHHGHHFFFFHHHHECDCEFF>EFEEEE@CDFEFHHGHHHHEHDGHHFHDFHFHHHHFFHHH@FDD??DFFFFDBBEEBEEEEEEEEEEEEEEEEE
-@MISEQ:1:000000000-A2Y1L:1:1101:15892:2446 1:N:0:NAAGGCGATAGATCGC
-CTTCCCCACGGCCCAGACACAAGAGACGACCTCCATAAATCTTTTAGAGGGTGACCGCATCTCCGACGCAAACCAGGACGCCGATACCCTCGTGGTGGTGTTCGACCGTACGGATGGCGC
-+
-?????BBBDBDDDDDDFFFFFFHIHIHHHHHHIHIFGGHFHHHHIIFHIHH?EEGHHHHHH-EGEHHCEHHHHH@FDFFEFF5@EEEFFEFE;AECCE;AEEEEEA?8?AEDDEEDFFDE
-@MISEQ:1:000000000-A2Y1L:1:1101:17903:2450 1:N:0:TAAGGCGATAGATCGC
-GTGCAGGGGGTGTGGTCAATCCACACTGTTGCTGAGGTGATTGGGTCTCCGGGGTCAACTCCA
-+
-=5===<>+5<5<+5=@CC;8CEEEEE;-8ACFDE.7C87CF-A>E>E=FFE**>>5AEDAEED
-@MISEQ:1:000000000-A2Y1L:1:1101:15113:2451 1:N:0:TAAGGCGATAGATCGC
-TCTCAGATGAGCATGCAGCAGCCCAGACTCGCCCCACGCAGTTTGCCAACCACAAG
-+
-=,,<=>>>@@@@@9@@CCEE@EE+++6C8-++CECE+>DCC>@@EFFFFEEEDEE5
b
diff -r 14d05f2d511d -r f80107cdc406 test-data/trimmomatic_r2_paired_maxinfo.fastq
--- a/test-data/trimmomatic_r2_paired_maxinfo.fastq Thu Jul 14 09:17:38 2016 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,40 +0,0 @@
-@MISEQ:1:000000000-A2Y1L:1:1101:19264:2433 2:N:0:NAAGGCGATAGATCGC
-GCCGATATGCAGATGCCGTTGATTGCTGCCAGCATAGCAGCCATTGCCGGCATATCCTTTGTGACTGTGCGCCGACGCAAGAAGGCGGCCCAGATAACCTAGCCCAGAAACG
-+
-??A??ABBDDDDDDDDFFEEEFHIIIIHHIIHIFHIIHHHFHHIIIIIHHHFHHIIIIIIFFFHHIIHGDEHHAAEHHHHFHHHHD=EBBEEEEEFFFFEEEECEFFEEFFF
-@MISEQ:1:000000000-A2Y1L:1:1101:18667:2435 2:N:0:NAAGGCGATAGATCGC
-GATGACATCAGCACAGGTTCCGCTTCCGCTGTCGCAACGACGTGGCTGCCATCGATTATATTCAATTCTGAGTGCTGCCGTAGGGCTAGATGTAAGACTCACGTTCGGCGACCAGATTAGTCGGTAGTGGCATG
-+
-?????BBBDDDDDDDDGFFGGGHHHHIHHHHHHHIHHHHIHBCEEHFFHHHIIHFHHHIIIIIIIHIFBGFGFHHHHIHE@EEEHHFFHHFF?CFHHHHHGGGGGGGGGGGGGGGGGGGECGGG;EE:CEGGG?
-@MISEQ:1:000000000-A2Y1L:1:1101:17523:2436 2:N:0:NAAGGCGATAGATCGC
-GAATATAGAAACGGGAGTATAGTGGTAACC
-+
-??AAABBBDDDDDEDDGGCFGGHHIFFHHH
-@MISEQ:1:000000000-A2Y1L:1:1101:15489:2437 2:N:0:NAAGGCGATAGATCGC
-GTCCACGTGAAATCCCGAGCGTCCCTCTCCCTCCCGAGAACCCGGTCTATATCCCACGATTTTTG
-+
-????9B???AD9?BDDEEDDDDHHHHHFHFHFFHHHHHHHHHEHH>CEGHHFGHHGHH=FHHHHC
-@MISEQ:1:000000000-A2Y1L:1:1101:18851:2442 2:N:0:NAAGGCGATAGATCGC
-TCTCCTCAGTACGGGGGAGGAGGTTCGCTCGGCGGACGTGCGGCCCTACGCCAGACTCTACCACATGGTTCAGCAGGAGCTGGAGCACCGCGCTGTGTCCGGGGACTGGGAATACACCATCAGCCCCGGCGAGGAGTGGCAAGAGA
-+
-A??A?BBBDDDDDDDDGGGGGGHEFHHGEHHHIHEHHHHHDHBEHGFFFEGGDEEDGGGGGEGGEECE?EGCEGEGGGCEEEGGCEEGG4D;;4AGGGGGG8>GGA?EGGGEEGEEGGGCGGEGEGGGGD8<AADECECEGG?CCC
-@MISEQ:1:000000000-A2Y1L:1:1101:15290:2442 2:N:0:NAAGGCGATAGATCGC
-GCGTGGATTTGATTCGGTTTATGGGGCGCGGCCGCTGAGGCGGGTCATTCAGACGGAG
-+
-?????@?BDDDDDDDDFEEEFFHIIHEHHHHDHHHHHEHHHHHH8ADFFFDFFD1D;>
-@MISEQ:1:000000000-A2Y1L:1:1101:18106:2444 2:N:0:NAAGGCGATAGATCGC
-GAGTTACTATTACAGAGTGGAGCTAATGTACTGGCAGTTGACTGCAAAAGAAATGCTCCAATTCATGTTGCATGTGCAAATATGAGCTTAGAGTGTTTAAAGATAATTTTGTGCCACAAAAAATGCAACCCAAACCAACAAAATGCAGTGGGAGACACTCCACTCCACACCT
-+
-?????BBBDDDDDDDDGCFGFGIIIIIHFHIIIIHIHFG=EHHIGIIIIFHIHDGHGHHHIHIH=CGHGGHFHHHFHFGHHFH/ACDFGG?FE?CDFFHHHHHIIHFHHI>CEDGFHHHHHHHHDFHHFHHHFFAFFGGGGGGEDEG>>DACC;?EGG>CEEA>AEACCEE?
-@MISEQ:1:000000000-A2Y1L:1:1101:15892:2446 2:N:0:NAAGGCGATAGATCGC
-GTATTGCTGGCACCATCAGTCACCGTGTAGTGTATTCTATCGATTCCGTCACGCTGGCCCTTGAGCGTGCCCGAATCATACGTTATGGTGGTACCTGATACCGTGGCACTAGTGCCGTCGGTGTCTGCGCCATCCG
-+
-?????BBBDDDDDDDDGGGGGGIIHIIFHHHIHHIFHGHGGHHIHIIDEFFHEF@DFHIIHIIIGHACDCFFHHHIHIIHIHGHHHBGFGEEHHHHFHFFHHDFDCEGGFGGFGGG@DBEEEEGC>CEEGGGGGGE
-@MISEQ:1:000000000-A2Y1L:1:1101:17903:2450 2:N:0:TAAGGCGATAGATCGC
-GGCCAACACTGTGGTCACTATCTCTGGCACTGGTCTGCTACCACATGGAGTTGACACCGGAGACCCAATCACCACAGCAACAGTGTGGATTGACCACACCCCCTGCACCTGTCTCTTATACACATCTGACGCTGCCGACGAGCGA
-+
-55<?????DDDBBDDBFFFFFFCHHIIHHIIIIIIIHGHHIIIIHHGHIIHFHHIIIIHHHCDHIIIHFFHIIIIICFFHIHECGCGEHIH=FHHHHHHHHHHF;FFFFFDDFFFFFFFEFFFFEFEBDFAEEAEE@EEDD>DDD
-@MISEQ:1:000000000-A2Y1L:1:1101:15113:2451 2:N:0:TAAGGCGATAGATCGC
-GAGGGGAGGAGGGGAAGGGAGAGGGGAAGAGAGGAGAGGAGAGGAGGAGGAGAGA
-+
-?????@9@B?B?BBBBEEEFB@@EEHEC?BF-CE@DDEH,5+5C,>@+CE+<?=E
b
diff -r 14d05f2d511d -r f80107cdc406 tool_dependencies.xml
--- a/tool_dependencies.xml Thu Jul 14 09:17:38 2016 -0400
+++ b/tool_dependencies.xml Fri Dec 16 11:31:55 2016 -0500
b
@@ -4,7 +4,7 @@
       <install version="1.0">
  <actions>
    <action type="download_by_url">http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-0.36.zip</action>
-   <action type="move_file">
+   <action type="move_file" rename_to="trimmomatic.jar">
      <source>trimmomatic-0.36.jar</source>
      <destination>$INSTALL_DIR</destination>
    </action>
@@ -13,10 +13,10 @@
             <destination_directory>$INSTALL_DIR/adapters</destination_directory>
           </action>
    <action type="set_environment">
-     <environment_variable name="TRIMMOMATIC_DIR" action="set_to">$INSTALL_DIR</environment_variable>
+     <environment_variable name="TRIMMOMATIC_JAR_PATH" action="set_to">$INSTALL_DIR</environment_variable>
    </action>
    <action type="set_environment">
-     <environment_variable name="TRIMMOMATIC_ADAPTERS_DIR" action="set_to">$INSTALL_DIR/adapters</environment_variable>
+     <environment_variable name="TRIMMOMATIC_ADAPTERS_PATH" action="set_to">$INSTALL_DIR/adapters</environment_variable>
    </action>
  </actions>
       </install>
b
diff -r 14d05f2d511d -r f80107cdc406 trimmomatic.sh
--- a/trimmomatic.sh Thu Jul 14 09:17:38 2016 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# Shell wrapper to run Trimmomatic jar file as a Galaxy tool
-echo Arguments:
-for i in $@ ; do
-    echo "*" $i
-done
-java $@ 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
-##
-#
b
diff -r 14d05f2d511d -r f80107cdc406 trimmomatic.xml
--- a/trimmomatic.xml Thu Jul 14 09:17:38 2016 -0400
+++ b/trimmomatic.xml Fri Dec 16 11:31:55 2016 -0500
[
@@ -1,15 +1,18 @@
-<tool id="trimmomatic" name="Trimmomatic" version="0.36.0">
+<tool id="trimmomatic" name="Trimmomatic" version="0.36.1">
   <description>flexible read trimming tool for Illumina NGS data</description>
+  <macros>
+    <import>trimmomatic_macros.xml</import>
+  </macros>
   <requirements>
     <requirement type="package" version="0.36">trimmomatic</requirement>
   </requirements>
   <stdio>
     <exit_code range="1:" />
   </stdio>
-  <command interpreter="bash"><![CDATA[
-  trimmomatic.sh
-  -mx8G
-  -jar \$TRIMMOMATIC_DIR/trimmomatic-0.36.jar
+  <command><![CDATA[
+  @CONDA_TRIMMOMATIC_JAR_PATH@ &&
+  @CONDA_TRIMMOMATIC_ADAPTERS_PATH@ &&
+  java -mx8G -jar \$TRIMMOMATIC_JAR_PATH/trimmomatic.jar
   #if $paired_end.is_paired_end
     PE -threads \${GALAXY_SLOTS:-6} -phred33
     #set $paired_input_type = $paired_end.paired_input_type_conditional.paired_input_type
@@ -29,7 +32,7 @@
   #end if
   ## ILLUMINACLIP option
   #if $illuminaclip.do_illuminaclip
-    ILLUMINACLIP:\$TRIMMOMATIC_ADAPTERS_DIR/$illuminaclip.adapter_fasta:$illuminaclip.seed_mismatches:$illuminaclip.palindrome_clip_threshold:$illuminaclip.simple_clip_threshold
+    ILLUMINACLIP:\$TRIMMOMATIC_ADAPTERS_PATH/$illuminaclip.adapter_fasta:$illuminaclip.seed_mismatches:$illuminaclip.palindrome_clip_threshold:$illuminaclip.simple_clip_threshold
   #end if
   ## Other operations
   #for $op in $operations
@@ -60,6 +63,8 @@
       MAXINFO:$op.operation.target_length:$op.operation.strictness
     #end if
   #end for
+  2>&1 | tee trimmomatic.log &&
+  if [ -z "\$(tail -1 trimmomatic.log | grep "Completed successfully")" ]; then echo "Trimmomatic did not finish successfully" >&2 ; exit 1 ; fi
   ]]></command>
   <inputs>
     <conditional name="paired_end">
b
diff -r 14d05f2d511d -r f80107cdc406 trimmomatic_macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/trimmomatic_macros.xml Fri Dec 16 11:31:55 2016 -0500
[
@@ -0,0 +1,8 @@
+<macros>
+  <!-- 
+       Set the path for the trimmomatic JAR and data files
+       Based on https://github.com/galaxyproject/tools-iuc/blob/master/tool_collections/snpsift/snpSift_macros.xml#L13
+  -->
+  <token name="@CONDA_TRIMMOMATIC_JAR_PATH@">if [ -z "\$TRIMMOMATIC_JAR_PATH" ]; then export TRIMMOMATIC_JAR_PATH=\$(dirname \$(readlink -e \$(which trimmomatic))); fi</token>
+  <token name="@CONDA_TRIMMOMATIC_ADAPTERS_PATH@">if [ -z "\$TRIMMOMATIC_ADAPTERS_PATH" ]; then export TRIMMOMATIC_ADAPTERS_PATH=\$(dirname \$(readlink -e \$(which trimmomatic)))/adapters; fi</token>
+</macros>