changeset 16:9a38087e3bfd draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/packages/trimmomatic commit ab36e4731731f12cce0e7d7cc3b50ba6a0bab1ef
author iuc
date Sun, 14 Jan 2024 11:00:33 +0000
parents 32f1f56bd970
children b9aaed85cbd1
files README.rst test-data/trimmomatic_se_out1.err.re_match test-data/trimmomatic_se_out2.err.re_match trimmomatic.xml trimmomatic_macros.xml
diffstat 5 files changed, 98 insertions(+), 115 deletions(-) [+]
line wrap: on
line diff
--- a/README.rst	Thu Mar 02 15:24:24 2023 +0000
+++ b/README.rst	Sun Jan 14 11:00:33 2024 +0000
@@ -12,13 +12,6 @@
 - Bolger, A.M., Lohse, M., & Usadel, B. (2014). Trimmomatic: A flexible trimmer
   for Illumina Sequence Data. Bioinformatics, btu170.
 
-Automated installation
-======================
-
-Installation via the Galaxy Tool Shed will take care of installing the tool wrapper
-and the trimmomatic program and data, and setting the appropriate environment
-variables.
-
 Controlling the available memory
 ================================
 
@@ -32,107 +25,83 @@
 
 This will set the environment variable ``_JAVA_OPTIONS`` to ``-Xmx6G``.
 
-Manual Installation
-===================
-
-There are two files to install:
-
-- ``trimmomatic.xml`` (the Galaxy tool definition)
-- ``trimmomatic.sh`` (the shell script wrapper)
-
-The suggested location is in a ``tools/trimmomatic/`` folder. You will then
-need to modify the ``tools_conf.xml`` file to tell Galaxy to offer the tool
-by adding the line:
-
-    <tool file="trimmomatic/trimmomatic.xml" />
-
-You will also need to install trimmomatic 0.38:
-
-- http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-0.38.zip
-
-The tool wrapper uses the following environment variables in order to find the
-appropriate files:
-
-- ``TRIMMOMATIC_DIR`` should point to the directory holding the
-  ``trimmomatic-0.36.jar`` file
-- ``TRIMMOMATIC_ADAPTERS_DIR`` should point to the directory holding the adapter
-  sequence files (used by the ``ILLUMINACLIP`` option).
-
-If you want to run the functional tests, copy the sample test files under
-sample test files under Galaxy's ``test-data/`` directory. Then:
-
-    ./run_tests.sh -id trimmomatic
-
-You will need to have set the environment variables above.
-
 History
 =======
 
-========== ======================================================================
-Version    Changes
----------- ----------------------------------------------------------------------
-0.39       - Update to Trimmomatic 0.39.
-0.38.1     - Bug fix: add dependency on ``coreutils`` so that ``readlink -e`` is
-             supported across both Linux and MacOS platforms.
-0.38.0     - Update to Trimmomatic 0.38.
-0.36.6     - Added trimlog and log outputs; add support for ``fastqillumina``
-             and ``fastqsolexa`` input types
-0.36.5     - Remove tool_dependencies.xml and always use conda to resolve tool
-             dependencies
-0.36.4     - Add option to provide custom adapter sequences for ILLUMINACLIP
-           - Add options ``minAdapterLength`` and ``keepBothReads`` for ILLUMINACLIP
-             in palindrome mode
-0.36.3     - Fix naming of output collections. Instead of all outputs being called
-             "Trimmomatic on collection NN" these will now be called "Trimmomatic
-             on collection NN: paired" or "Trimmomatic on collection NN: unpaired".
-0.36.2     - Support fastqsanger.gz datatype. If fastqsanger.gz is used as input
-             the output will also be fastqsanger.gz.
-           - Use $_JAVA_OPTIONS to customize memory requirements.
-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
-             can be dataset collection, in which case tool also outputs dataset
-	     collections) and improve order and naming of output files.
-0.32.2     - Use ``GALAXY_SLOTS`` to set the appropriate number of threads to use
-             at runtime (default is 6).
-0.32.1     - Remove ``trimmomatic_adapters.loc.sample`` and hard-code adapter files
-             into the XML wrapper.
-0.32.0     - Add tool_dependencies.xml to install Trimmomatic 0.32 automatically and
-             set the environment.
-           - Update tool versioning to use Trimmomatic version number (i.e. ``0.32``)
-             with tool iteration appended (i.e. ``.1``).
-0.0.4      - Specify '-threads 6' in <command> section.
-0.0.3      - Added MINLEN, LEADING, TRAILING, CROP and HEADCROP options of trimmomatic.
-0.0.2      - Updated ILLUMINACLIP option to use standard adapter sequences (requires
-             the trimmomatic_adapters.loc file; sample version is supplied) plus
-             cosmetic updates to wording and help text for some options.
-0.0.1      - Initial version
-========== ======================================================================
+============== ================================================================
+Version        Changes
+-------------- ----------------------------------------------------------------
+0.39+galaxy1   - Relocated to the ``tools-iuc`` repository
+0.39           - Update to Trimmomatic 0.39.
+0.38.1         - Bug fix: add dependency on ``coreutils`` so that
+                 ``readlink -e`` is supported across both Linux and MacOS
+                 platforms.
+0.38.0         - Update to Trimmomatic 0.38.
+0.36.6         - Added trimlog and log outputs; add support for
+                 ``fastqillumina`` and ``fastqsolexa`` input types
+0.36.5         - Remove tool_dependencies.xml and always use conda to resolve
+                 tool dependencies
+0.36.4         - Add option to provide custom adapter sequences for
+                 ILLUMINACLIP
+               - Add options ``minAdapterLength`` and ``keepBothReads`` for
+                 ILLUMINACLIP in palindrome mode
+0.36.3         - Fix naming of output collections. Instead of all outputs being
+                 called "Trimmomatic on collection NN" these will now be called
+                 "Trimmomatic on collection NN: paired" or "Trimmomatic on
+                 collection NN: unpaired".
+0.36.2         - Support fastqsanger.gz datatype. If fastqsanger.gz is used as
+                 input the output will also be fastqsanger.gz.
+               - Use $_JAVA_OPTIONS to customize memory requirements.
+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 can be dataset collection, in which case tool also
+                 outputs dataset collections) and improve order and naming of
+                 output files.
+0.32.2         - Use ``GALAXY_SLOTS`` to set the appropriate number of threads
+                 to use at runtime (default is 6).
+0.32.1         - Remove ``trimmomatic_adapters.loc.sample`` and hard-code
+                 adapter files into the XML wrapper.
+0.32.0         - Add tool_dependencies.xml to install Trimmomatic 0.32
+                 automatically and set the environment.
+               - Update tool versioning to use Trimmomatic version number (i.e.
+                 ``0.32``) with tool iteration appended (i.e. ``.1``).
+0.0.4          - Specify '-threads 6' in <command> section.
+0.0.3          - Added MINLEN, LEADING, TRAILING, CROP and HEADCROP options of
+                 trimmomatic.
+0.0.2          - Updated ILLUMINACLIP option to use standard adapter sequences
+                 (requires the trimmomatic_adapters.loc file; sample version is
+                 supplied) plus cosmetic updates to wording and help text for
+                 some options.
+0.0.1          - Initial version
+============== ================================================================
 
 
 Credits
 =======
 
-This wrapper has been developed and is maintained by Peter Briggs (@pjbriggs).
+This wrapper was originally developed and maintained by Peter Briggs
+(@pjbriggs).
 Peter van Heusden (@pvanheus) and Marius van den Beek (@mvdbeek) contributed 
 support for gz compressed FastQ files. Charles Girardot (@cgirardot) and
-Jelle Scholtalbers (@scholtalbers) contributed additional options to ILLUMINACLIP.
+Jelle Scholtalbers (@scholtalbers) contributed additional options to
+ILLUMINACLIP.
 Matthias Bernt (@bernt-matthias) added log and trimlog output.
 Nicola Soranzo (@nsoranzo) suggested using coreutils to enable cross-platform
 support across Linux and MacOS.
 Cristóbal Gallardo (@gallardoalba) updated Trimmomatic up to version 0.39.
+Peter Briggs wishes to acknowledge the help from Matthia Bernt
+(@bernt-matthias) with relocating the tool in the IUC tool repository,
+and the IUC for taking on responsibility for the tool.
 
 Developers
 ==========
 
-This tool is developed on the following GitHub repository:
-https://github.com/fls-bioinformatics-core/galaxy-tools/tree/master/trimmomatic
-
-For making the "Galaxy Tool Shed" http://toolshed.g2.bx.psu.edu/ tarball I use
-the ``package_trimmomatic.sh`` script.
-
+The Trimmomatic tool is now maintained as part of the ``tools-iuc`` repository
+on GitHub:
+https://github.com/galaxyproject/tools-iuc/tools/tree/main/trimmomatic
 
 Licence (MIT)
 =============
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/trimmomatic_se_out1.err.re_match	Sun Jan 14 11:00:33 2024 +0000
@@ -0,0 +1,5 @@
+TrimmomaticSE: Started with arguments:
+ -threads [0-9]+ fastq_in\.fastqsanger fastq_out\.fastqsanger SLIDINGWINDOW:4:20 -trimlog trimlog
+Quality encoding detected as phred33
+Input Reads: 10 Surviving: 8 \(80\.00%\) Dropped: 2 \(20\.00%\)
+TrimmomaticSE: Completed successfully
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/trimmomatic_se_out2.err.re_match	Sun Jan 14 11:00:33 2024 +0000
@@ -0,0 +1,4 @@
+TrimmomaticSE: Started with arguments:
+ -threads [0-9]+ fastq_in\.fastqsanger fastq_out\.fastqsanger SLIDINGWINDOW:4:20 -trimlog trimlog -phred33
+Input Reads: 10 Surviving: 8 \(80\.00%\) Dropped: 2 \(20\.00%\)
+TrimmomaticSE: Completed successfully
--- a/trimmomatic.xml	Thu Mar 02 15:24:24 2023 +0000
+++ b/trimmomatic.xml	Sun Jan 14 11:00:33 2024 +0000
@@ -10,7 +10,7 @@
 	See similar fix for snpSift
 	https://github.com/galaxyproject/tools-iuc/commit/b5e2080a7afdea9fa476895693b6115824c6fbb9
     -->
-    <requirement type="package" version="8.25">coreutils</requirement>
+    <requirement type="package" version="9.4">coreutils</requirement>
   </requirements>
   <command detect_errors="aggressive"><![CDATA[
   @CONDA_TRIMMOMATIC_JAR_PATH@ &&
@@ -38,7 +38,7 @@
     SE -threads \${GALAXY_SLOTS:-6} fastq_in.'$fastq_in.extension' fastq_out.'$fastq_in.extension'
   #end if
   ## ILLUMINACLIP option
-  #if $illuminaclip.do_illuminaclip
+  #if $illuminaclip.do_illuminaclip == "yes"
     #if $illuminaclip.adapter_type.standard_or_custom == "custom"
       #if $readtype.single_or_paired in ["pair_of_files","collection"]
         ILLUMINACLIP:$adapter_file_from_text:$illuminaclip.seed_mismatches:$illuminaclip.palindrome_clip_threshold:$illuminaclip.simple_clip_threshold:$illuminaclip.min_adapter_len:$illuminaclip.keep_both_reads
@@ -134,7 +134,10 @@
       </when>
     </conditional>
     <conditional name="illuminaclip">
-      <param name="do_illuminaclip" type="boolean" label="Perform initial ILLUMINACLIP step?" help="Cut adapter and other illumina-specific sequences from the read" truevalue="yes" falsevalue="no" checked="False" />
+      <param name="do_illuminaclip" type="select" label="Perform initial ILLUMINACLIP step?" help="Cut adapter and other illumina-specific sequences from the read">
+	<option value="no" selected="true">no</option>
+	<option value="yes">yes</option>
+      </param>
       <when value="yes">
         <conditional name="adapter_type">
           <param name="standard_or_custom" type="select" label="Select standard adapter sequences or provide custom?">
@@ -252,7 +255,7 @@
     </data>
   </outputs>
   <tests>
-    <test>
+    <test expect_num_outputs="3">
       <!-- Single-end example -->
       <conditional name="readtype">
         <param name="single_or_paired" value="se" />
@@ -263,16 +266,16 @@
       <param name="output_err" value="yes" />
       <output name="fastq_out" file="trimmomatic_se_out1.fastq" />
       <output name="log_file" file="trimmomatic_se_out1.log" />
-      <output name="err_file" file="trimmomatic_se_out1.err" />
+      <output name="err_file" compare="re_match" file="trimmomatic_se_out1.err.re_match" />
     </test>
-    <test>
+    <test expect_num_outputs="1">
       <!-- Single-end example - gzipped -->
       <param name="single_or_paired" value="se" />
       <param name="fastq_in" value="Illumina_SG_R1.fastq.gz" ftype="fastqsanger.gz" />
       <param name="operations_0|operation|name" value="SLIDINGWINDOW" />
       <output name="fastq_out" file="trimmomatic_se_out1.fastq.gz" />
     </test>
-    <test>
+    <test expect_num_outputs="4">
       <!-- Paired-end example - gzipped -->
       <param name="single_or_paired" value="pair_of_files" />
       <param name="fastq_r1_in" value="Illumina_SG_R1.fastq.gz" ftype="fastqsanger.gz" />
@@ -283,7 +286,7 @@
       <output name="fastq_out_r2_paired" file="trimmomatic_pe_r2_paired_out1.fastq.gz" />
       <output name="fastq_out_r2_unpaired" file="trimmomatic_pe_r2_unpaired_out1.fastq.gz" />
     </test>
-    <test>
+    <test expect_num_outputs="4">
       <!-- Paired-end example -->
       <param name="single_or_paired" value="pair_of_files" />
       <param name="fastq_r1_in" value="Illumina_SG_R1.fastq" ftype="fastqsanger" />
@@ -294,7 +297,7 @@
       <output name="fastq_out_r2_paired" file="trimmomatic_pe_r2_paired_out1.fastq" />
       <output name="fastq_out_r2_unpaired" file="trimmomatic_pe_r2_unpaired_out1.fastq" />
     </test>
-    <test>
+    <test expect_num_outputs="4">
       <!-- Paired-end Illumina 1.3-1.7 quality encoding -->
       <param name="single_or_paired" value="pair_of_files" />
       <param name="fastq_r1_in" value="Illumina_SG_R1.fastqillumina" ftype="fastqillumina" />
@@ -305,7 +308,7 @@
       <output name="fastq_out_r2_paired" file="trimmomatic_pe_r2_paired_out1.fastqillumina" />
       <output name="fastq_out_r2_unpaired" file="trimmomatic_pe_r2_unpaired_out1.fastqillumina" />
     </test>
-    <test>
+    <test expect_num_outputs="4">
       <!-- Paired-end Solexa quality encoding -->
       <param name="single_or_paired" value="pair_of_files" />
       <param name="fastq_r1_in" value="Illumina_SG_R1.fastqsolexa" ftype="fastqsolexa" />
@@ -316,7 +319,7 @@
       <output name="fastq_out_r2_paired" file="trimmomatic_pe_r2_paired_out1.fastqsolexa" />
       <output name="fastq_out_r2_unpaired" file="trimmomatic_pe_r2_unpaired_out1.fastqsolexa" />
     </test>
-    <test>
+    <test expect_num_outputs="1">
       <!-- Single-end example (cropping) -->
       <param name="single_or_paired" value="se" />
       <param name="fastq_in" value="Illumina_SG_R1.fastq" ftype="fastqsanger" />
@@ -324,7 +327,7 @@
       <param name="operations_0|operation|crop" value="10" />
       <output name="fastq_out" file="trimmomatic_se_out2.fastq" />
     </test>
-    <test>
+    <test expect_num_outputs="6">
       <!-- Paired-end with dataset collection -->
       <param name="single_or_paired" value="collection" />
       <param name="fastq_pair">
@@ -343,7 +346,7 @@
         <element name="reverse" file="trimmomatic_pe_r2_unpaired_out1.fastq" />
       </output_collection>
     </test>
-    <test>
+    <test expect_num_outputs="6">
       <!-- Paired-end with dataset collection - gzipped -->
       <param name="single_or_paired" value="collection" />
       <param name="fastq_pair">
@@ -362,7 +365,7 @@
         <element name="reverse" file="trimmomatic_pe_r2_unpaired_out1.fastq.gz" />
       </output_collection>
     </test>
-    <test>
+    <test expect_num_outputs="1">
       <!-- Single-end using AVGQUAL -->
       <param name="single_or_paired" value="se" />
       <param name="fastq_in" value="Illumina_SG_R1.fastq" ftype="fastqsanger" />
@@ -370,7 +373,7 @@
       <param name="operations_0|operation|avgqual" value="30" />
       <output name="fastq_out" file="trimmomatic_avgqual.fastq" />
     </test>
-    <test>
+    <test expect_num_outputs="1">
       <!-- Single-end using MAXINFO -->
       <param name="single_or_paired" value="se" />
       <param name="fastq_in" value="Illumina_SG_R1.fastq" ftype="fastqsanger" />
@@ -379,12 +382,12 @@
       <param name="operations_0|operation|strictness" value="0.8" />
       <output name="fastq_out" file="trimmomatic_maxinfo.fastq" />
     </test>
-    <test>
+    <test expect_num_outputs="4">
       <!-- Paired-end ILLUMINACLIP - this does not check valid clipping -->
       <param name="single_or_paired" value="pair_of_files" />
       <param name="fastq_r1_in" value="Illumina_SG_R1.fastq" ftype="fastqsanger" />
       <param name="fastq_r2_in" value="Illumina_SG_R2.fastq" ftype="fastqsanger" />
-      <param name="do_illuminaclip" value="true"/>
+      <param name="do_illuminaclip" value="yes"/>
       <param name="adapter_fasta" value="TruSeq2-PE.fa"/>
       <param name="operations_0|operation|name" value="SLIDINGWINDOW" />
       <output name="fastq_out_r1_paired" file="trimmomatic_pe_r1_paired_out1_clip.fastq" />
@@ -392,12 +395,12 @@
       <output name="fastq_out_r2_paired" file="trimmomatic_pe_r2_paired_out1.fastq" />
       <output name="fastq_out_r2_unpaired" file="trimmomatic_pe_r2_unpaired_out1_clip.fastq" />
     </test>
-    <test>
+    <test expect_num_outputs="4">
       <!-- Paired-end ILLUMINACLIP providing 'custom' adapters - this does not check valid clipping -->
       <param name="single_or_paired" value="pair_of_files" />
       <param name="fastq_r1_in" value="Illumina_SG_R1.fastq" ftype="fastqsanger" />
       <param name="fastq_r2_in" value="Illumina_SG_R2.fastq" ftype="fastqsanger" />
-      <param name="do_illuminaclip" value="true"/>
+      <param name="do_illuminaclip" value="yes"/>
       <param name="standard_or_custom" value="custom"/>
       <param name="adapter_text"
              value=">PrefixPE/1&#10;AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT&#10;>PrefixPE/2&#10;CAAGCAGAAGACGGCATACGAGATCGGTCTCGGCATTCCTGCTGAACCGCTCTTCCGATCT&#10;>PCR_Primer1&#10;AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT&#10;>PCR_Primer1_rc&#10;AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT&#10;>PCR_Primer2&#10;CAAGCAGAAGACGGCATACGAGATCGGTCTCGGCATTCCTGCTGAACCGCTCTTCCGATCT&#10;>PCR_Primer2_rc&#10;AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTCGTATGCCGTCTTCTGCTTG&#10;>FlowCell1&#10;TTTTTTTTTTAATGATACGGCGACCACCGAGATCTACAC&#10;>FlowCell2&#10;TTTTTTTTTTCAAGCAGAAGACGGCATACGA&#10;"/>
@@ -408,7 +411,7 @@
       <output name="fastq_out_r2_paired" file="trimmomatic_pe_r2_paired_out1.fastq" />
       <output name="fastq_out_r2_unpaired" file="trimmomatic_pe_r2_unpaired_out1_clip.fastq" />
     </test>
-    <test>
+    <test expect_num_outputs="3">
       <!-- Quality score test -->
       <conditional name="readtype">
         <param name="single_or_paired" value="se" />
@@ -420,7 +423,7 @@
       <param name="quality_score" value="-phred33"/>
       <output name="fastq_out" file="trimmomatic_se_out1.fastq" />
       <output name="log_file" file="trimmomatic_se_out1.log" />
-      <output name="err_file" file="trimmomatic_se_out2.err" />
+      <output name="err_file" compare="re_match" file="trimmomatic_se_out2.err.re_match" />
     </test>
   </tests>
   <help><![CDATA[
@@ -499,9 +502,11 @@
 
 **Credits**
 
-This Galaxy tool has been developed within the Bioinformatics Core Facility at the
-University of Manchester, with contributions from Peter van Heusden, Marius
-van den Beek, Jelle Scholtalbers, Charles Girardot, Matthias Bernt and Cristóbal Gallardo.
+This Galaxy tool was originally developed within the Bioinformatics Core
+Facility at the University of Manchester, with contributions from Peter van
+Heusden, Marius van den Beek, Jelle Scholtalbers, Charles Girardot, Matthias
+Bernt and Cristóbal Gallardo. It is now maintained as part of the IUC tool
+collection.
 
 It runs the Trimmomatic program which has been developed
 within Bjorn Usadel's group at RWTH Aachen university.
--- a/trimmomatic_macros.xml	Thu Mar 02 15:24:24 2023 +0000
+++ b/trimmomatic_macros.xml	Sun Jan 14 11:00:33 2024 +0000
@@ -6,5 +6,5 @@
   <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>
   <token name="@TOOL_VERSION@">0.39</token>
-  <token name="@VERSION_SUFFIX@">0</token>
+  <token name="@VERSION_SUFFIX@">1</token>
 </macros>