changeset 9:93d58ffe39f1 draft

Updated to version 1.6
author lparsons
date Mon, 06 Oct 2014 14:01:06 -0400
parents 2d6671b10919
children 01d94df2e32a
files README cutadapt.xml cutadapt_adapters.txt.sample fastx_clipper_sequences.txt.sample tool_dependencies.xml
diffstat 5 files changed, 363 insertions(+), 255 deletions(-) [+]
line wrap: on
line diff
--- a/README	Mon Nov 26 17:37:26 2012 -0500
+++ b/README	Mon Oct 06 14:01:06 2014 -0400
@@ -1,8 +1,8 @@
 Galaxy tool definition for cutadapt (http://code.google.com/p/cutadapt/)
 
 
-Installation  - Tool Shed
----------------------------
+Installation - Tool Shed
+------------------------
 
 The recommended way to install cutadapt as a tool in Galaxy is to the use the
 Galaxy Tool Shed (http://wiki.galaxyproject.org/Tool%20Shed).
@@ -14,29 +14,42 @@
 Installation - Manual
 ---------------------
 
-1 - Install the cutadapt package and make sure it is in path for Galaxy
-2 - Copy cutadapt.xml to $GALAXY_HOME/tools/cutadapt
-3 - Add the tool to the $GALAXY_HOME/tool_conf.xml tool-registry file
+1. Install the cutadapt package and make sure it is in path for Galaxy
+
+2. Copy cutadapt.xml to $GALAXY_HOME/tools/cutadapt
+
+3. Add the tool to the $GALAXY_HOME/tool_conf.xml tool-registry file
 
-Optional steps to setup and run Galaxy functional tests
+    **Optional steps to setup and run Galaxy functional tests**
+
+4. Copy test-data/* to $GALAXY_HOME/test-data/
 
-4 - Copy test-data/* to $GALAXY_HOME/test-data/
-5 - Set GALAXY_TEST_TOOL_CONF environment variable to a tool_conf.xml file that
+5. Set GALAXY_TEST_TOOL_CONF environment variable to a tool_conf.xml file that
     contains the tools you want to test. (e.g. 'tool_conf.xml')
-6 - $GALAXY_HOME/run_functional_tests.sh -id cutadapt 
+
+6. $GALAXY_HOME/run_functional_tests.sh -id cutadapt
     See the Galaxy Wiki for more information: http://wiki.g2.bx.psu.edu/
 
 
 Configuration of Adapters
 -------------------------
 
-A list of predefined adapters may be specified in the fastx_clipper_sequences.txt
+A list of predefined adapters may be specified in the cutadapt_adapters.txt
 file which resides in the tool-data directory underneath the Galaxy root.  A sample
 file is provided.
 
 
-Limitations
------------
+Limitations of the Galaxy wrapper
+---------------------------------
+
+Reading adapters from a fasta file is not supported
+Colorspace data support is not implemented
+Only one "Strip suffix" is suppored
 
-Colorspace data support is not implemented
-Name adapters support is not implemented
+
+Galaxy Wrapper Development
+--------------------------
+
+Author: Lance Parsons <lparsons@princeton.edu>
+
+Repository: [https://bitbucket.org/lance_parsons/cutadapt\_galaxy\_wrapper](https://bitbucket.org/lance_parsons/cutadapt_galaxy_wrapper)
--- a/cutadapt.xml	Mon Nov 26 17:37:26 2012 -0500
+++ b/cutadapt.xml	Mon Oct 06 14:01:06 2014 -0400
@@ -1,67 +1,106 @@
-<tool id="cutadapt" name="Cutadapt" version="1.1.a">
-	<description>Remove adapter sequences from Fastq/Fasta</description>
-	<requirements>
-        <requirement type="package" version="1.1">cutadapt</requirement>
-	</requirements>
+<tool id="cutadapt" name="Cutadapt" version="1.6">
+    <description>Remove adapter sequences from Fastq/Fasta</description>
+    <requirements>
+        <requirement type="package" version="1.6">cutadapt</requirement>
+    </requirements>
     <version_command>cutadapt --version</version_command>
 
-	<command>cutadapt
-		#if $input.extension.startswith( "fastq"):
-		    --format=fastq
+    <command>cutadapt
+        #if $input.extension.startswith( "fastq"):
+                --format=fastq
             #if $input.extension == "fastqillumina":
                 --quality-base=64
-            #end if	
+            #end if
             #if $input.extension == "fastqsolexa":
                 --quality-base=64
-            #end if	
-		#else
-		--format=$input.extension
-		#end if 
-		#for $a in $adapters
-		--adapter='${a.adapter_source.adapter}'
-		#end for
-		#for $aa in $anywhere_adapters
-		--anywhere='${aa.anywhere_adapter_source.anywhere_adapter}'
-		#end for
-		#for $fa in $front_adapters
-		--front='${fa.front_adapter_source.front_adapter}'
-		#end for
-		--error-rate=$error_rate
-		--times=$count
-		--overlap=$overlap
+            #end if
+        #else
+        --format=$input.extension
+        #end if
+        #for $a in $adapters
+            #if $a.adapter_source.adapter_source_list == 'prebuilt':
+                --adapter="${a.adapter_source.adapter.fields.name}"='${a.adapter_source.adapter}'
+            #else if str($a.adapter_source.adapter_name) != "":
+                --adapter='${a.adapter_source.adapter_name}'='${a.adapter_source.adapter}'
+            #else
+                --adapter='${a.adapter_source.adapter}'
+            #end if
+        #end for
+        #for $aa in $anywhere_adapters
+            #if $aa.anywhere_adapter_source.anywhere_adapter_source_list == 'prebuilt':
+                --anywhere="${aa.anywhere_adapter_source.anywhere_adapter.fields.name}"='${aa.anywhere_adapter_source.anywhere_adapter}'
+            #else if str($aa.anywhere_adapter_source.anywhere_adapter_name) != "":
+                --anywhere='${aa.anywhere_adapter_source.anywhere_adapter_name}'='${aa.anywhere_adapter_source.anywhere_adapter}'
+            #else
+                --anywhere='${aa.anywhere_adapter_source.anywhere_adapter}'
+            #end if
+        #end for
+        #for $fa in $front_adapters
+            #if $fa.front_adapter_source.front_adapter_source_list == 'prebuilt':
+                --front="${fa.front_adapter_source.front_adapter.fields.name}"='${fa.front_adapter_source.front_adapter}'
+            #else if str($fa.front_adapter_source.front_adapter_name) != "":
+                --front='${fa.front_adapter_source.front_adapter_name}'='${fa.front_adapter_source.front_adapter}'
+            #else
+                --front='${fa.front_adapter_source.front_adapter}'
+            #end if
+        #end for
+        --error-rate=$error_rate
+        --times=$count
+        --overlap=$overlap
+        $no_indels
         $match_read_wildcards
-        $no_match_adapters_wildcards
 
         #if str( $output_filtering_options.output_filtering) == "filter":
-		    $output_filtering_options.discard
-		    #if str($output_filtering_options.min) != '0':
-		        --minimum-length=$output_filtering_options.min
-		    #end if
-		    #if str($output_filtering_options.max) != '0':
-		        --maximum-length=$output_filtering_options.max
-		    #end if
+            $output_filtering_options.discard
+            $output_filtering_options.discard_untrimmed
+            $output_filtering_options.no_trim
+            $output_filtering_options.mask_adapter
+            #if str($output_filtering_options.min) != '0':
+                --minimum-length=$output_filtering_options.min
+            #end if
+            #if str($output_filtering_options.max) != '0':
+                --maximum-length=$output_filtering_options.max
+            #end if
+        #end if
+
+        --output='$output'
+
+        #if $paired_end.paired_end_boolean:
+            --paired-output='$paired_output'
         #end if
 
-		--output='$output' 
-		#if str( $output_params.output_type ) == "additional":
-			#if $output_params.rest_file:
-			    --rest-file=$rest_output
-			#end if
-			#if $output_params.wildcard_file:
-			    --wildcard-file=$wild_output
-			#end if
-			#if $output_params.too_short_file:
-			    --too-short-output=$too_short_output
-			#end if
-			#if $output_params.untrimmed_file:
-			    --untrimmed-output=$untrimmed_output
-			#end if
-		#end if
+        #if str( $output_params.output_type ) == "additional":
+            #if $output_params.rest_file:
+                --rest-file=$rest_output
+            #end if
+            #if $output_params.wildcard_file:
+                --wildcard-file=$wild_output
+            #end if
+            #if $output_params.too_short_file:
+                --too-short-output=$too_short_output
+            #end if
+            #if $output_params.too_long_file:
+                --too-long-output=$too_long_output
+            #end if
+            #if $output_params.untrimmed_file:
+                --untrimmed-output=$untrimmed_output
+                #if $paired_end.paired_end_boolean:
+                    --untrimmed-paired-output=$untrimmed_paired_output
+                #end if
+            #end if
+            #if $output_params.info_file:
+                --info-file=$info_file
+            #end if
 
-		#if str( $read_modification_params.read_modification) == "modify":
- 		    #if str($read_modification_params.quality_cutoff) != '0':
-		       --quality-cutoff=$read_modification_params.quality_cutoff
-		    #end if
+        #end if
+
+        #if str( $read_modification_params.read_modification) == "modify":
+            #if str($read_modification_params.quality_cutoff) != '0':
+               --quality-cutoff=$read_modification_params.quality_cutoff
+            #end if
+            #if str($read_modification_params.cut) != '0':
+               --cut=$read_modification_params.cut
+            #end if
             #if $read_modification_params.prefix != '':
                 --prefix="$read_modification_params.prefix"
             #end if
@@ -74,82 +113,95 @@
             $read_modification_params.zero_cap
         #end if
 
-		'$input'
-		> $report
-	</command>
-	<inputs>
-		<param format="fastqsanger, fastqillumina, fastqsolexa, fasta" name="input" type="data" optional="false" label="Fastq file to trim" length="100"/>
+        '$input'
+
+        #if $paired_end.paired_end_boolean:
+            '$input2'
+        #end if
 
-		<repeat name="adapters" title="3' Adapters" help="Sequence of an adapter that was ligated to the 3' end.  The adapter itself and anything that follows is trimmed.">
-			<conditional name="adapter_source">
-				<param name="adapter_source_list" type="select" label="Source" >
-					<option value="prebuilt" selected="true">Standard (select from the list below)</option>
-					<option value="user">Enter custom sequence</option>
-				</param>
-
-				<when value="user">
-					<param name="adapter" size="30" label="Enter custom 3' adapter sequence" type="text" value="AATTGGCC" />
-				</when>
+        > $report
+    </command>
+    <inputs>
+        <param format="fastq, fastqsanger, fastqillumina, fastqsolexa, fasta" name="input" type="data" optional="false" label="Fastq file to trim" length="100"/>
+        <conditional name="paired_end">
+            <param name="paired_end_boolean" type="boolean" value="false" label="Track Paired Reads" help="This option will keep a second file synchronized if you use one of the filtering options that discards reads. It will NOT trim adapters off of the second read. You must run Cutadapt a second time on the output of the first run to trim adapters from both reads (see Cutadapt documentation for details)." />
+            <when value="true">
+                <param format="fastq, fastqsanger, fastqillumina, fastqsolexa, fasta" name="input2" type="data" optional="false" label="Paired fastq file (NOT trimmed)" length="100"/>
+            </when>
+        </conditional>
 
-				<when value="prebuilt">
-					<param name="adapter" type="select" label="Choose 3' adapter">
-						<options from_file="fastx_clipper_sequences.txt">
-							<column name="name" index="1"/>
-							<column name="value" index="0"/>
-						</options>
-					</param> 
-				</when>
-			</conditional>
-		</repeat>
+        <repeat name="adapters" title="3' Adapters" help="Sequence of an adapter that was ligated to the 3' end.  The adapter itself and anything that follows is trimmed.">
+            <conditional name="adapter_source">
+                <param name="adapter_source_list" type="select" label="Source" >
+                    <option value="prebuilt" selected="true">Standard (select from the list below)</option>
+                    <option value="user">Enter custom sequence</option>
+                </param>
 
-		<repeat name="anywhere_adapters" title="5' or 3' (Anywhere) Adapters" help="Sequence of an adapter that was ligated to the 5' or 3' end.  If the adapter is found within the read or overlapping the 3' end of the read, the behavior is the same as for the -a option. If the adapter overlaps the 5' end (beginning of the read), the initial portion of the read matching the adapter is trimmed, but anything that follows is kept. If multiple -a or -b options are given, only the best matching adapter is trimmed.">
-			<conditional name="anywhere_adapter_source">
-				<param name="anywhere_adapter_source_list" type="select" label="Source">
-					<option value="prebuilt" selected="true">Standard (select from the list below)</option>
-					<option value="user">Enter custom sequence</option>
-				</param>
+                <when value="user">
+                    <param name="adapter_name" size="30" label="Enter custom 3' adapter name (Optional)" type="text" value="" />
+                    <param name="adapter" size="30" label="Enter custom 3' adapter sequence" type="text" value="AATTGGCC" />
+                </when>
+
+                <when value="prebuilt">
+                    <param name="adapter" type="select" label="Choose 3' adapter">
+                        <options from_file="cutadapt_adapters.txt">
+                            <column name="name" index="1"/>
+                            <column name="value" index="0"/>
+                        </options>
+                    </param>
+                </when>
+            </conditional>
+        </repeat>
 
-				<when value="user">
-					<param name="anywhere_adapter" size="30" label="Enter custom 5' or 3' adapter sequence" type="text" value="AATTGGCC" />
-				</when>
-				<when value="prebuilt">
-					<param name="anywhere_adapter" type="select" label="Choose 5' or 3' adapter">
-						<options from_file="fastx_clipper_sequences.txt">
-							<column name="name" index="1"/>
-							<column name="value" index="0"/>
-						</options>
-					</param> 
-				</when>
-			</conditional>
-		</repeat>
+        <repeat name="anywhere_adapters" title="5' or 3' (Anywhere) Adapters" help="Sequence of an adapter that was ligated to the 5' or 3' end.  If the adapter is found within the read or overlapping the 3' end of the read, the behavior is the same as for the -a option. If the adapter overlaps the 5' end (beginning of the read), the initial portion of the read matching the adapter is trimmed, but anything that follows is kept. If multiple -a or -b options are given, only the best matching adapter is trimmed.">
+            <conditional name="anywhere_adapter_source">
+                <param name="anywhere_adapter_source_list" type="select" label="Source">
+                    <option value="prebuilt" selected="true">Standard (select from the list below)</option>
+                    <option value="user">Enter custom sequence</option>
+                </param>
 
-		<repeat name="front_adapters" title="5' (Front) Adapters" help="Sequence of an adapter that was ligated to the 5' end.  If the adapter sequence starts with the character '^', the adapter is 'anchored'. An anchored adapter must appear in its entirety at the 5' end of the read (it is a prefix of the read). A non-anchored adapter may appear partially at the 5' end, or it may occur within the read. If it is found within a read, the sequence preceding the adapter is also trimmed. In all cases the adapter itself is trimmed.">
-			<conditional name="front_adapter_source">
-				<param name="front_adapter_source_list" type="select" label="Source">
-					<option value="prebuilt" selected="true">Standard (select from the list below)</option>
-					<option value="user">Enter custom sequence</option>
-				</param>
+                <when value="user">
+                    <param name="anywhere_adapter_name" size="30" label="Enter custom 5' or 3' adapter name (Optional)" type="text" value="" />
+                    <param name="anywhere_adapter" size="30" label="Enter custom 5' or 3' adapter sequence" type="text" value="AATTGGCC" />
+                </when>
+                <when value="prebuilt">
+                    <param name="anywhere_adapter" type="select" label="Choose 5' or 3' adapter">
+                        <options from_file="cutadapt_adapters.txt">
+                            <column name="name" index="1"/>
+                            <column name="value" index="0"/>
+                        </options>
+                    </param>
+                </when>
+            </conditional>
+        </repeat>
 
-				<when value="user">
-					<param name="front_adapter" size="30" label="Enter custom 5' adapter sequence" type="text" value="AATTGGCC" />
-				</when>
-				<when value="prebuilt">
-					<param name="front_adapter" type="select" label="Choose 5' adapter">
-						<options from_file="fastx_clipper_sequences.txt">
-							<column name="name" index="1"/>
-							<column name="value" index="0"/>
-						</options>
-					</param> 
-				</when>
-			</conditional>
-		</repeat>
+        <repeat name="front_adapters" title="5' (Front) Adapters" help="Sequence of an adapter that was ligated to the 5' end.  If the adapter sequence starts with the character '^', the adapter is 'anchored'. An anchored adapter must appear in its entirety at the 5' end of the read (it is a prefix of the read). A non-anchored adapter may appear partially at the 5' end, or it may occur within the read. If it is found within a read, the sequence preceding the adapter is also trimmed. In all cases the adapter itself is trimmed.">
+            <conditional name="front_adapter_source">
+                <param name="front_adapter_source_list" type="select" label="Source">
+                    <option value="prebuilt" selected="true">Standard (select from the list below)</option>
+                    <option value="user">Enter custom sequence</option>
+                </param>
 
-		<param name="error_rate" type="float" min="0" max="1" value="0.1" label="Maximum error rate" help="Maximum allowed error rate (no. of errors divided by the length of the matching region)." />
-		<param name="count" type="integer" min="1" value="1" label="Match times" help="Try to remove adapters at most COUNT times. Useful when an adapter gets appended multiple times." />
-		<param name="overlap" type="integer" min="1" value="3" label="Minimum overlap length" help="Minimum overlap length. If the overlap between the adapter and the sequence is shorter than LENGTH, the read is not modified. This reduces the number of bases trimmed purely due to short random adapter matches." />
+                <when value="user">
+                    <param name="front_adapter_name" size="30" label="Enter custom 5' adapter name (Optional)" type="text" value="" />
+                    <param name="front_adapter" size="30" label="Enter custom 5' adapter sequence" type="text" value="AATTGGCC" />
+                </when>
+                <when value="prebuilt">
+                    <param name="front_adapter" type="select" label="Choose 5' adapter">
+                        <options from_file="cutadapt_adapters.txt">
+                            <column name="name" index="1"/>
+                            <column name="value" index="0"/>
+                        </options>
+                    </param>
+                </when>
+            </conditional>
+        </repeat>
 
-		<param name="match_read_wildcards" type="boolean" value="false" truevalue="--match-read-wildcards" falsevalue="" label="Match Read Wildcards" help="Allow 'N's in the read as matches to the adapter." />
-		<param name="no_match_adapters_wildcards" type="boolean" value="false" truevalue="--no-match-adapter-wildcards" falsevalue="" label="Do Not Match Adapter Wildcards" help="Do not treat 'N' in the adapter sequence as wildcards. This is needed when you want to search for literal 'N' characters." />
+        <param name="error_rate" type="float" min="0" max="1" value="0.1" label="Maximum error rate" help="Maximum allowed error rate (no. of errors divided by the length of the matching region)." />
+        <param name="no_indels" type="boolean" value="false" truevalue="--no-indels" falsevalue="" label="Do not allow indels (Use ONLY with anchored 5' (front) adapters)." help="Do not allow indels in the alignments. That is, allow only mismatches. This option is currently only supported for anchored 5' adapters ('^ADAPTER') (default: both mismatches and indels are allowed)." />
+        <param name="count" type="integer" min="1" value="1" label="Match times" help="Try to remove adapters at most COUNT times. Useful when an adapter gets appended multiple times." />
+        <param name="overlap" type="integer" min="1" value="3" label="Minimum overlap length" help="Minimum overlap length. If the overlap between the adapter and the sequence is shorter than LENGTH, the read is not modified. This reduces the number of bases trimmed purely due to short random adapter matches." />
+        <param name="match_read_wildcards" type="boolean" value="false" truevalue="--match-read-wildcards" falsevalue="" label="Match Read Wildcards" help="Allow 'N's in the read as matches to the adapter." />
 
         <conditional name="output_filtering_options">
             <param name="output_filtering" type="select" label="Output filtering options" help="Options for filtering processed reads by those that contain the adapter or by minimum or maximum length">
@@ -158,25 +210,30 @@
             </param>
             <when value="default" />
             <when value="filter">
-        		<param name="discard" type="boolean" value="false" truevalue="--discard" falsevalue="" label="Discard Trimmed Reads" help="Discard reads that contain the adapter instead of trimming them. Use the 'Minimum overlap length' option in order to avoid throwing away too many randomly matching reads!" />
-        		<param name="min" type="integer" min="0" optional="true" value="0" label="Minimum length" help="Discard trimmed reads that are shorter than LENGTH.  Reads that are too short even before adapter removal are also discarded. In colorspace, an initial primer is not counted. Value of 0 means no minimum length." />
-        		<param name="max" type="integer" min="0" optional="true" value="0" label="Maximum length" help="Discard trimmed reads that are longer than LENGTH.  Reads that are too long even before adapter removal are also discarded. In colorspace, an initial primer is not counted. Value of 0 means no maximum length." />
+                <param name="discard" type="boolean" value="false" truevalue="--discard" falsevalue="" label="Discard Trimmed Reads" help="Discard reads that contain the adapter instead of trimming them. Use the 'Minimum overlap length' option in order to avoid throwing away too many randomly matching reads!" />
+                <param name="discard_untrimmed" type="boolean" value="false" truevalue="--discard-untrimmed" falsevalue="" label="Discard Untrimmed Reads" help="Discard reads that do not contain the adapter." />
+                <param name="min" type="integer" min="0" optional="true" value="0" label="Minimum length" help="Discard trimmed reads that are shorter than LENGTH.  Reads that are too short even before adapter removal are also discarded. In colorspace, an initial primer is not counted. Value of 0 means no minimum length." />
+                <param name="max" type="integer" min="0" optional="true" value="0" label="Maximum length" help="Discard trimmed reads that are longer than LENGTH.  Reads that are too long even before adapter removal are also discarded. In colorspace, an initial primer is not counted. Value of 0 means no maximum length." />
+                <param name="no_trim" type="boolean" value="false" truevalue="--no-trim" falsevalue="" label="Do not trim adapters" help="Match and redirect reads to output/untrimmed-output as usual, but don't remove the adapters (default: trim the adapters)." />
+                <param name="mask_adapter" type="boolean" value="false" truevalue="--mask-adapter" falsevalue="" label="Mask Adapters" help="Mask adapter bases with 'N' instead of trimming them (default: trim adapters)." />
             </when>
         </conditional>
 
-	    <conditional name="output_params">
-			<param name="output_type" type="select" label="Additional output options" help="By default all reads will be put in the same file.  However, reads with adapters matching in the middle, unmatched reads, and too-short reads can be saved in separate files.">
-				<option value="default">Default</option>
-				<option value="additional">Additional output files</option>
-			</param>
-			<when value="default" />
-			<when value="additional">
-				<param name="rest_file" type="boolean" value="false" label="Rest of Read" help="When the adapter matches in the middle of a read, write the rest (after the adapter) into a file."/>
-				<param name="wildcard_file" type="boolean" value="false" label="Wildcard File" help="When the adapter has wildcard bases ('N's) write adapter bases matching wildcard positions to file."/>
-				<param name="too_short_file" type="boolean" value="false" label="Too Short Reads" help="Write reads that are too short (according to minimum length specified) to a file. (default: discard reads)"/>
-				<param name="untrimmed_file" type="boolean" value="false" label="Untrimmed Reads" help="Write reads that do not contain the adapter to a separate file, instead of writing them to the regular output file.  (default: output to same file as trimmed)"/>
-			</when>
-		</conditional>
+        <conditional name="output_params">
+            <param name="output_type" type="select" label="Additional output options" help="By default all reads will be put in the same file.  However, reads with adapters matching in the middle, unmatched reads, and too-short reads can be saved in separate files.">
+                <option value="default">Default</option>
+                <option value="additional">Additional output files</option>
+            </param>
+            <when value="default" />
+            <when value="additional">
+                <param name="info_file" type="boolean" value="false" label="Info File" help="Write information about each read and its adapter matches to a file."/>
+                <param name="rest_file" type="boolean" value="false" label="Rest of Read" help="When the adapter matches in the middle of a read, write the rest (after the adapter) into a file."/>
+                <param name="wildcard_file" type="boolean" value="false" label="Wildcard File" help="When the adapter has wildcard bases ('N's) write adapter bases matching wildcard positions to file."/>
+                <param name="too_short_file" type="boolean" value="false" label="Too Short Reads" help="Write reads that are too short (according to minimum length specified) to a file. (default: discard reads)"/>
+                <param name="too_long_file" type="boolean" value="false" label="Too Long Reads" help="Write reads that are too long (according to maximum length specified) to a file. (default: discard reads)"/>
+                <param name="untrimmed_file" type="boolean" value="false" label="Untrimmed Reads" help="Write reads that do not contain the adapter to a separate file, instead of writing them to the regular output file.  (default: output to same file as trimmed)"/>
+            </when>
+        </conditional>
 
         <conditional name="read_modification_params">
             <param name="read_modification" type="select" label="Additional modifications to reads" help="Various options to trim reads based on quality, modify read names and quality scores">
@@ -185,84 +242,108 @@
             </param>
             <when value="none" />
             <when value="modify">
+                <param name="cut" type="integer" optional="true" value="0" label="Cut bases from reads before adapter trimming" help="Remove bases from the beginning or end of each read before trimming adapters. If positive, the bases are removed from the beginning of each read. If negative, the bases are removed from the end of each read." />
                 <param name="quality_cutoff" type="integer" min="0" optional="true" value="0" label="Quality cutoff" help="Trim low-quality ends from reads before adapter removal. The algorithm is the same as the one used by BWA (Subtract CUTOFF from all qualities; compute partial sums from all indices to the end of the sequence; cut sequence at the index at which the sum is minimal). Value of 0 means no quality trimming." />
                 <param name="prefix" label="Prefix" type="text" help="Add this prefix to read names" />
                 <param name="suffix" label="Suffix" type="text" help="Add this suffix to read names" />
+                <param name="strip_suffix" label="Strip suffix" type="text" help="Remove this suffix from read names if present." />
                 <param name="length_tag" label="Length Tag" type="text" help="Search for TAG followed by a decimal number in the name of the read (description/comment field of the FASTA or FASTQ file). Replace the decimal number with the correct length of the trimmed read. For example, use --length-tag 'length=' to search for fields like 'length=123'." />
                 <param name="zero_cap" type="boolean" value="false" label="Change negative quality values to zero (0)" truevalue="--zero-cap" falsevalue="" help="Workaround to avoid segmentation faults in BWA" />
             </when>
         </conditional>
-	</inputs>
+    </inputs>
 
-	<outputs>
-		<data format="txt" name="report" label="${tool.name} on ${on_string} (Report)" />
-		<data format="input" name="output" metadata_source="input"/>
-		<data format="input" name="rest_output" metadata_source="input" label="${tool.name} on ${on_string} (Rest of Reads)" >
-			<filter>(output_params['output_type'] == "additional")</filter>
-			<filter>(output_params['rest_file'] is True)</filter>
-		</data>
-		<data format="txt" name="wild_output" metadata_source="input" label="${tool.name} on ${on_string} (Wildcard File)" >
-			<filter>(output_params['output_type'] == "additional")</filter>
-			<filter>(output_params['wild_file'] is True)</filter>
-		</data>
-		<data format="input" name="too_short_output" metadata_source="input" label="${tool.name} on ${on_string} (Too Short Reads)" >
-			<filter>(output_params['output_type'] == "additional")</filter>
-			<filter>(output_params['too_short_file'] is True)</filter>
-		</data>
-		<data format="input" name="untrimmed_output" metadata_source="input" label="${tool.name} on ${on_string} (Untrimmed Reads)" >
-			<filter>(output_params['output_type'] == "additional")</filter>
-			<filter>(output_params['untrimmed_file'] is True)</filter>
-		</data>
-	</outputs>
+    <outputs>
+        <data format="txt" name="report" label="${tool.name} on ${on_string} (Report)" />
+        <data format="input" name="output" metadata_source="input" label="${tool.name} on ${on_string} (Reads)"/>
+        <data format="input" name="paired_output" metadata_source="input" label="${tool.name} on ${on_string} (Paired Reads)" >
+            <filter>(paired_end['paired_end_boolean'] is True)</filter>
+        </data>
+        <data format="input" name="rest_output" metadata_source="input" label="${tool.name} on ${on_string} (Rest of Reads)" >
+            <filter>(output_params['output_type'] == "additional")</filter>
+            <filter>(output_params['rest_file'] is True)</filter>
+        </data>
+        <data format="txt" name="wild_output" metadata_source="input" label="${tool.name} on ${on_string} (Wildcard File)" >
+            <filter>(output_params['output_type'] == "additional")</filter>
+            <filter>(output_params['wildcard_file'] is True)</filter>
+        </data>
+        <data format="input" name="too_short_output" metadata_source="input" label="${tool.name} on ${on_string} (Too Short Reads)" >
+            <filter>(output_params['output_type'] == "additional")</filter>
+            <filter>(output_params['too_short_file'] is True)</filter>
+        </data>
+        <data format="input" name="too_long_output" metadata_source="input" label="${tool.name} on ${on_string} (Too Long Reads)" >
+            <filter>(output_params['output_type'] == "additional")</filter>
+            <filter>(output_params['too_long_file'] is True)</filter>
+        </data>
+        <data format="input" name="untrimmed_output" metadata_source="input" label="${tool.name} on ${on_string} (Untrimmed Reads)" >
+            <filter>(output_params['output_type'] == "additional")</filter>
+            <filter>(output_params['untrimmed_file'] is True)</filter>
+        </data>
+        <data format="input" name="untrimmed_paired_output" metadata_source="input" label="${tool.name} on ${on_string} (Untrimmed Paired Reads)" >
+            <filter>(paired_end['paired_end_boolean'] is True)</filter>
+            <filter>(output_params['output_type'] == "additional")</filter>
+            <filter>(output_params['untrimmed_file'] is True)</filter>
+        </data>
+        <data format="txt" name="info_file" metadata_source="input" label="${tool.name} on ${on_string} (Info File)" >
+            <filter>(output_params['output_type'] == "additional")</filter>
+            <filter>(output_params['info_file'] is True)</filter>
+        </data>
+    </outputs>
+
+    <stdio>
+        <exit_code range="1"   level="fatal"   description="IOError, FormatError, or Interrupt" />
+        <exit_code range="2"   level="fatal"   description="Invalid options specified" />
+        <exit_code range="3:"   level="fatal"   description="Unknown error" />
+    </stdio>
 
-	<tests>
-		<test>
-			<param name="input" value="cutadapt_small.fastq" ftype="fastqsanger"/>
-			<param name="adapter_source_list" value="user"/>
-			<param name="adapter" value=""/>
-			<param name="anywhere_adapter_source_list" value="user"/>
-			<param name="anywhere_adapter" value="TTAGACATATCTCCGTCG"/>
-			<param name="front_adapter_source_list" value="user"/>
-			<param name="front_adapter" value=""/>
-			<param name="output_filtering" value="default"/>
-			<param name="read_modification" value="none"/>
-			<param name="output_type" value="default"/>
-			<output name="output" file="cutadapt_small.out"/>
-		</test>
+    <tests>
+        <test>
+            <param name="input" value="cutadapt_small.fastq" ftype="fastqsanger"/>
+            <param name="adapter_source_list" value="user"/>
+            <param name="adapter" value=""/>
+            <param name="anywhere_adapter_source_list" value="user"/>
+            <param name="anywhere_adapter" value="TTAGACATATCTCCGTCG"/>
+            <param name="front_adapter_source_list" value="user"/>
+            <param name="front_adapter" value=""/>
+            <param name="output_filtering" value="default"/>
+            <param name="read_modification" value="none"/>
+            <param name="output_type" value="default"/>
+            <output name="output" file="cutadapt_small.out"/>
+        </test>
 <!-- Unable to get tests to function with conditional parameters
-		<test>
-			<param name="input" value="cutadapt_small.fastq" ftype="fastqsanger"/>
-			<param name="adapter_source_list" value="user"/>
-			<param name="adapter" value="TTAGACATATCTCCGTCG"/>
-			<param name="anywhere_adapter_source_list" value="user"/>
-			<param name="anywhere_adapter" value=""/>
-			<param name="front_adapter_source_list" value="user"/>
-			<param name="front_adapter" value=""/>
-			<param name="output_filtering" value="filter"/>
-			<param name="discard" value="true"/>
-			<param name="read_modification" value="none"/>
-			<param name="output_type" value="default"/>
-			<output name="output" file="cutadapt_discard.out"/>
-		</test>
-		<test>
-			<param name="input" value="cutadapt_rest.fa" ftype="fasta"/>
-			<param name="adapter_source_list" value="user"/>
-			<param name="adapter" value="ADAPTER"/>
-			<param name="anywhere_adapter_source_list" value="user"/>
-			<param name="anywhere_adapter" value=""/>
-			<param name="front_adapter_source_list" value="user"/>
-			<param name="front_adapter" value=""/>
-			<param name="output_filtering" value="default"/>
-			<param name="read_modification" value="none"/>
-			<param name="output_type" value="additional"/>
-			<param name="rest_file" value="true"/>
-			<output name="output" file="cutadapt_rest.out"/>
-			<output name="rest_output" file="cutadapt_rest2.out"/>
-		</test>
+        <test>
+            <param name="input" value="cutadapt_small.fastq" ftype="fastqsanger"/>
+            <param name="adapter_source_list" value="user"/>
+            <param name="adapter" value="TTAGACATATCTCCGTCG"/>
+            <param name="anywhere_adapter_source_list" value="user"/>
+            <param name="anywhere_adapter" value=""/>
+            <param name="front_adapter_source_list" value="user"/>
+            <param name="front_adapter" value=""/>
+            <param name="output_filtering" value="filter"/>
+            <param name="discard" value="true"/>
+            <param name="read_modification" value="none"/>
+            <param name="output_type" value="default"/>
+            <output name="output" file="cutadapt_discard.out"/>
+        </test>
+        <test>
+            <param name="input" value="cutadapt_rest.fa" ftype="fasta"/>
+            <param name="adapter_source_list" value="user"/>
+            <param name="adapter" value="ADAPTER"/>
+            <param name="anywhere_adapter_source_list" value="user"/>
+            <param name="anywhere_adapter" value=""/>
+            <param name="front_adapter_source_list" value="user"/>
+            <param name="front_adapter" value=""/>
+            <param name="output_filtering" value="default"/>
+            <param name="read_modification" value="none"/>
+            <param name="output_type" value="additional"/>
+            <param name="rest_file" value="true"/>
+            <output name="output" file="cutadapt_rest.out"/>
+            <output name="rest_output" file="cutadapt_rest2.out"/>
+        </test>
 -->
-	</tests>
+    </tests>
 
-	<help>
+    <help>
 Summary
 -------
 This tool removes adapter sequences from DNA high-throughput
@@ -270,7 +351,9 @@
 machine is longer than the molecule that is sequenced, such as in
 microRNA data.
 
-The tool is based on the opensource cutadapt_ tool.
+The tool is based on the opensource `cutadapt 
+&lt;http://code.google.com/p/cutadapt/>`_ tool. See the `complete cutadapt
+documentation &lt;https://cutadapt.readthedocs.org/en/latest/index.html>`_ for additional details.
 
 -----
 
@@ -288,14 +371,14 @@
 your adapter sequence is ``ADAPTER`` (specified via 3' Adapters parameter).
 If you have these input sequences::
 
-	MYSEQUENCEADAPTER
-	MYSEQUENCEADAP
-	MYSEQUENCEADAPTERSOMETHINGELSE
+    MYSEQUENCEADAPTER
+    MYSEQUENCEADAP
+    MYSEQUENCEADAPTERSOMETHINGELSE
 
 All of them will be trimmed to ``MYSEQUENCE``. If the sequence starts with an
 adapter, like this::
 
-	ADAPTERSOMETHING
+    ADAPTERSOMETHING
 
 It will be empty after trimming.
 
@@ -308,7 +391,7 @@
 ---------------------
 
 If you specify a 5' (Front) adapter, the adapter may overlap the beginning of the read or
-occur anywhere whithin it. If it appears withing the read, the sequence that precedes it 
+occur anywhere whithin it. If it appears withing the read, the sequence that precedes it
 will also be trimmed in addition to the adapter. For example when the adapter sequence is
 ``ADAPTER``::
 
@@ -331,7 +414,7 @@
 The assumption is enforced by the alignment algorithm, which only finds the adapter
 when its starting position is within the read. In other words, the 5' base of
 the adapter must appear within the read. The adapter and all bases following
-it are remved.
+it are removed.
 
 If, on the other hand, your adapter can also be ligated to the 5' end (on
 purpose or by accident), you should tell cutadapt so by using the Anywhere Adapter
@@ -360,7 +443,30 @@
 but trim the third to an empty sequence and trim the fourth not at all.
 
 
+Format of the info file
+-----------------------
+The info file contains information about the found adapters. The output is a tab-separated text file. Each line corresponds to one read of the input file. The fields are:
+
+1. Read name
+2. Number of errors
+3. 0-based start coordinate of the adapter match
+4. 0-based end coordinate of the adapter match
+5. Sequence of the read to the left of the adapter match (can be empty)
+6. Sequence of the read that was matched to the adapter
+7. Sequence of the read to the right of the adapter match (can be empty)
+8. Name of the found adapter.
+
+The concatenation of the fields 5-7 yields the full read sequence. In column 8, adapters without a name are numbered starting from 1.
+
+If no adapter was found, the format is as follows:
+
+1. Read name
+2. The value -1
+3. The read sequence
+
+When parsing that file, be aware that additional columns may be added in the future. Note also that some fields can be empty, resulting in consecutive tabs within a line. Also, in the current version, when the *Match times* option is set to a value other than 1 (the default value), multiple lines are written to the info file for each read.
+
 .. _cutadapt: http://code.google.com/p/cutadapt/
-	</help>
+    </help>
 
 </tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cutadapt_adapters.txt.sample	Mon Oct 06 14:01:06 2014 -0400
@@ -0,0 +1,14 @@
+#
+# Adapter/Linker sequences for FASTX-Clipper tool.
+# Also used by cutadapt tool
+#
+# Format:
+#    Adapter Sequence <TAB> Descriptive name
+#
+# Example:
+#     AAATTTGATAAGATA	Our-Adapter
+#
+# Some adapters can be found here:
+# http://seqanswers.com/forums/showthread.php?t=198
+
+TGTAGGCC	Dummy-Adapter (do not use me)
--- a/fastx_clipper_sequences.txt.sample	Mon Nov 26 17:37:26 2012 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-#
-# Adapter/Linker sequences for FASTX-Clipper tool.
-# Also used by cutadapt tool
-#
-# Format:
-#    Adapter Sequence <TAB> Descriptive name
-#
-# Example:
-#     AAATTTGATAAGATA	Our-Adapter
-#
-# Some adapters can be found here:
-# http://seqanswers.com/forums/showthread.php?t=198
-
-TGTAGGCC	Dummy-Adapter (don't use me)
--- a/tool_dependencies.xml	Mon Nov 26 17:37:26 2012 -0500
+++ b/tool_dependencies.xml	Mon Oct 06 14:01:06 2014 -0400
@@ -1,17 +1,6 @@
-<?xml version="1.0"?>
-<tool_dependency>
-    <package name="cutadapt" version="1.1">
-        <install version="1.0">
-            <actions>
-                <action type="download_by_url">http://pypi.python.org/packages/source/c/cutadapt/cutadapt-1.1.tar.gz</action>
-                <action type="shell_command">python setup.py install --home $INSTALL_DIR --install-scripts $INSTALL_DIR/bin</action>
-                <action type="set_environment">
-                    <environment_variable name="PYTHONPATH" action="append_to">$INSTALL_DIR/lib/python</environment_variable>
-                    <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
-                </action>
-            </actions>
-        </install>
-        <readme>
-        </readme>
-    </package>
-</tool_dependency>
+<?xml version="1.0"?>
+<tool_dependency>
+    <package name="cutadapt" version="1.6">
+        <repository changeset_revision="bbfb88b7c496" name="package_cutadapt_1_6" owner="lparsons" toolshed="https://toolshed.g2.bx.psu.edu" />
+    </package>
+</tool_dependency>