Repository 'cutadapt'
hg clone https://toolshed.g2.bx.psu.edu/repos/lparsons/cutadapt

Changeset 8:2d6671b10919 (2012-11-26)
Previous changeset 7:1dda185ea2d0 (2011-12-22) Next changeset 9:93d58ffe39f1 (2014-10-06)
Commit message:
Updated to support cutadapt version 1.1 (also include automatic dependency installation)
modified:
README
cutadapt.xml
added:
tool_dependencies.xml
removed:
.hgtags
b
diff -r 1dda185ea2d0 -r 2d6671b10919 .hgtags
--- a/.hgtags Thu Dec 22 11:46:33 2011 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,2 +0,0 @@
-8b064ea1672296c6c224cb4af5e36cb685d88993 0.1
-1dada50cca8ae5ee163254f3981b0c1ec4becb64 v0.9.5.a
b
diff -r 1dda185ea2d0 -r 2d6671b10919 README
--- a/README Thu Dec 22 11:46:33 2011 -0500
+++ b/README Mon Nov 26 17:37:26 2012 -0500
b
@@ -1,7 +1,18 @@
 Galaxy tool definition for cutadapt (http://code.google.com/p/cutadapt/)
 
-Installation
-------------
+
+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).
+
+This will allow cutadapt to be installed automatically and keep track of older
+versions of cutadapt and the tool wrapper.
+
+
+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
@@ -16,9 +27,16 @@
     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
+file which resides in the tool-data directory underneath the Galaxy root.  A sample
+file is provided.
+
+
 Limitations
 -----------
 
 Colorspace data support is not implemented
-Prefix and Suffix to read names not implemented
-Length-tag addition to read name not implemented
+Name adapters support is not implemented
b
diff -r 1dda185ea2d0 -r 2d6671b10919 cutadapt.xml
--- a/cutadapt.xml Thu Dec 22 11:46:33 2011 -0500
+++ b/cutadapt.xml Mon Nov 26 17:37:26 2012 -0500
b
b'@@ -1,12 +1,19 @@\n-<tool id="cutadapt" name="Cutadapt" version="0.9.5.a">\n+<tool id="cutadapt" name="Cutadapt" version="1.1.a">\n \t<description>Remove adapter sequences from Fastq/Fasta</description>\n \t<requirements>\n-\t\t<requirement type="python-module">cutadapt</requirement>\n+        <requirement type="package" version="1.1">cutadapt</requirement>\n \t</requirements>\n+    <version_command>cutadapt --version</version_command>\n \n \t<command>cutadapt\n \t\t#if $input.extension.startswith( "fastq"):\n-\t\t--format=fastq\n+\t\t    --format=fastq\n+            #if $input.extension == "fastqillumina":\n+                --quality-base=64\n+            #end if\t\n+            #if $input.extension == "fastqsolexa":\n+                --quality-base=64\n+            #end if\t\n \t\t#else\n \t\t--format=$input.extension\n \t\t#end if \n@@ -16,38 +23,64 @@\n \t\t#for $aa in $anywhere_adapters\n \t\t--anywhere=\'${aa.anywhere_adapter_source.anywhere_adapter}\'\n \t\t#end for\n+\t\t#for $fa in $front_adapters\n+\t\t--front=\'${fa.front_adapter_source.front_adapter}\'\n+\t\t#end for\n \t\t--error-rate=$error_rate\n \t\t--times=$count\n \t\t--overlap=$overlap\n-\t\t#if str($min) != \'0\':\n-\t\t--minimum-length=$min\n-\t\t#end if\n-\t\t#if str($max) != \'0\':\n-\t\t--maximum-length=$max\n-\t\t#end if\n-\t\t#if str($quality_cutoff) != \'0\':\n-\t\t--quality-cutoff=$quality_cutoff\n-\t\t#end if\n-\t\t$discard\n+        $match_read_wildcards\n+        $no_match_adapters_wildcards\n+\n+        #if str( $output_filtering_options.output_filtering) == "filter":\n+\t\t    $output_filtering_options.discard\n+\t\t    #if str($output_filtering_options.min) != \'0\':\n+\t\t        --minimum-length=$output_filtering_options.min\n+\t\t    #end if\n+\t\t    #if str($output_filtering_options.max) != \'0\':\n+\t\t        --maximum-length=$output_filtering_options.max\n+\t\t    #end if\n+        #end if\n+\n \t\t--output=\'$output\' \n \t\t#if str( $output_params.output_type ) == "additional":\n \t\t\t#if $output_params.rest_file:\n-\t\t\t--rest-file=$rest_output\n+\t\t\t    --rest-file=$rest_output\n+\t\t\t#end if\n+\t\t\t#if $output_params.wildcard_file:\n+\t\t\t    --wildcard-file=$wild_output\n \t\t\t#end if\n \t\t\t#if $output_params.too_short_file:\n-\t\t\t--too-short-output=$too_short_output\n+\t\t\t    --too-short-output=$too_short_output\n \t\t\t#end if\n \t\t\t#if $output_params.untrimmed_file:\n-\t\t\t--untrimmed-output=$untrimmed_output\n+\t\t\t    --untrimmed-output=$untrimmed_output\n \t\t\t#end if\n \t\t#end if\n+\n+\t\t#if str( $read_modification_params.read_modification) == "modify":\n+ \t\t    #if str($read_modification_params.quality_cutoff) != \'0\':\n+\t\t       --quality-cutoff=$read_modification_params.quality_cutoff\n+\t\t    #end if\n+            #if $read_modification_params.prefix != \'\':\n+                --prefix="$read_modification_params.prefix"\n+            #end if\n+            #if $read_modification_params.suffix != \'\':\n+                --suffix="$read_modification_params.suffix"\n+            #end if\n+            #if $read_modification_params.length_tag != \'\':\n+                --length-tag="$read_modification_params.length_tag"\n+            #end if\n+            $read_modification_params.zero_cap\n+        #end if\n+\n \t\t\'$input\'\n \t\t> $report\n \t</command>\n \t<inputs>\n-\t\t<param format="fastqsanger, fasta" name="input" type="data" optional="false" label="Fastq file to trim" length="100"/>\n+\t\t<param format="fastqsanger, fastqillumina, fastqsolexa, fasta" name="input" type="data" optional="false" label="Fastq file to trim" length="100"/>\n \n-\t\t<repeat name="adapters" title="3\' Adapters">\n+\t\t<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.">\n \t\t\t<conditional name="adapter_source">\n \t\t\t\t<param name="adapter_source_list" type="select" label="Source" >\n \t\t\t\t\t<option value="prebuilt" selected="true">Standard (select from the list below)</option>\n@@ -55,11 +88,11 @@\n \t\t\t\t</param>\n \n \t\t\t\t<when value="user">\n-\t\t\t\t\t<param name="adapter" size="30" label="Enter custom 3\' adapter sequence" type="text" value="AATTGGCC" help="Sequence of an adapter that'..b'ADAP\n \tMYSEQUENCEADAPTERSOMETHINGELSE\n \n-All of them will be trimmed to "MYSEQUENCE". If the sequence starts with an\n-adapter, like this:\n-\n-::\n+All of them will be trimmed to ``MYSEQUENCE``. If the sequence starts with an\n+adapter, like this::\n \n \tADAPTERSOMETHING\n \n It will be empty after trimming.\n \n When the allowed error rate is sufficiently high, errors in\n-the adapter sequence are allowed. For example, ADABTER (1 mismatch), ADAPTR (1 deletion),\n-and ADAPPTER (1 insertion) will all be recognized if the error rate is set to 0.15.\n+the adapter sequence are allowed. For example, ``ADABTER`` (1 mismatch), ``ADAPTR`` (1 deletion),\n+and ``ADAPPTER`` (1 insertion) will all be recognized if the error rate is set to 0.15.\n \n \n-**Allowing adapters anywhere**\n+Anchoring 5\' adapters\n+---------------------\n+\n+If you specify a 5\' (Front) adapter, the adapter may overlap the beginning of the read or\n+occur anywhere whithin it. If it appears withing the read, the sequence that precedes it \n+will also be trimmed in addition to the adapter. For example when the adapter sequence is\n+``ADAPTER``::\n+\n+    HELLOADAPTERTHERE\n+    APTERTHERE\n \n-Cutadapt assumes that any adapter specified via the *3` Adapters* parameter\n-was ligated to the 3\' end of the sequence. This is the correct assumption for\n+will both be trimmed to ``THERE``. To avoid this, you can prefix the adapter with the character\n+``^``. This will restrict the search, forcing the adapter to be a prefix of the read. With\n+the adapter sequence set to ``^ADAPTER``, only reads like this will be trimmed::\n+\n+    ADAPTERHELLO\n+\n+\n+Allowing adapters anywhere\n+--------------------------\n+\n+Cutadapt assumes that any adapter specified via the 3\' Adapter parameter\n+was ligated to the 3\\\' end of the sequence. This is the correct assumption for\n at least the SOLiD and Illumina small RNA protocols and probably others.\n+The assumption is enforced by the alignment algorithm, which only finds the adapter\n+when its starting position is within the read. In other words, the 5\' base of\n+the adapter must appear within the read. The adapter and all bases following\n+it are remved.\n \n If, on the other hand, your adapter can also be ligated to the 5\' end (on\n-purpose or by accident), you should tell cutadapt so by using the *5\' or 3\' (Anywhere)\n-Adapters* parameter. It will then use a different alignment algorithm and\n-correctly trim adapters that appear in the beginning of a read. An adapter\n-specified this way will also be found if it appears only partially in the\n-beginning of a read. For example, these sequences\n+purpose or by accident), you should tell cutadapt so by using the Anywhere Adapter\n+parameter. It will then use a slightly different alignment algorithm\n+(so-called semiglobal alignment), which allows any type of overlap between the\n+adapter and the sequence. In particular, the adapter may appear only partially\n+in the beginning of the read, like this::\n \n-::\n+    PTERMYSEQUENCE\n \n-\tADAPTERMYSEQUENCE\n-\tPTERMYSEQUENCE\n+The decision which part of the read to remove is made as follows: If there is at\n+least one base before the found adapter, then the adapter is considered to be\n+a 3\' adapter and the adapter itself and everything following it is removed.\n+Otherwise, the adapter is considered to be a 5\' adapter and it is removed from\n+the read.\n \n-will be trimmed to "MYSEQUENCE". Note that the regular algorithm would trim\n-the first read to an empty sequence.\n+Here are some examples, which may make this clearer (left: read, right: trimmed\n+read)::\n \n-This parameter currently does not work with color space data.\n+    MYSEQUENCEADAPTER -> MYSEQUENCE (3\' adapter)\n+    MADAPTER -> M (3\' adapter)\n+    ADAPTERMYSEQUENCE -> MYSEQUENCE (5\' adapter)\n+    PTERMYSEQUENCE -> MYSEQUENCE (5\' adapter)\n+\n+The regular algorithm (3\' Adapter) would trim the first two examples in the same way,\n+but trim the third to an empty sequence and trim the fourth not at all.\n \n \n .. _cutadapt: http://code.google.com/p/cutadapt/\n'
b
diff -r 1dda185ea2d0 -r 2d6671b10919 tool_dependencies.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml Mon Nov 26 17:37:26 2012 -0500
b
@@ -0,0 +1,17 @@
+<?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>