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

Changeset 9:93d58ffe39f1 (2014-10-06)
Previous changeset 8:2d6671b10919 (2012-11-26) Next changeset 10:01d94df2e32a (2015-05-26)
Commit message:
Updated to version 1.6
modified:
README
cutadapt.xml
tool_dependencies.xml
added:
cutadapt_adapters.txt.sample
removed:
fastx_clipper_sequences.txt.sample
b
diff -r 2d6671b10919 -r 93d58ffe39f1 README
--- 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)
b
diff -r 2d6671b10919 -r 93d58ffe39f1 cutadapt.xml
--- a/cutadapt.xml Mon Nov 26 17:37:26 2012 -0500
+++ b/cutadapt.xml Mon Oct 06 14:01:06 2014 -0400
b
b'@@ -1,67 +1,106 @@\n-<tool id="cutadapt" name="Cutadapt" version="1.1.a">\n-\t<description>Remove adapter sequences from Fastq/Fasta</description>\n-\t<requirements>\n-        <requirement type="package" version="1.1">cutadapt</requirement>\n-\t</requirements>\n+<tool id="cutadapt" name="Cutadapt" version="1.6">\n+    <description>Remove adapter sequences from Fastq/Fasta</description>\n+    <requirements>\n+        <requirement type="package" version="1.6">cutadapt</requirement>\n+    </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+    <command>cutadapt\n+        #if $input.extension.startswith( "fastq"):\n+                --format=fastq\n             #if $input.extension == "fastqillumina":\n                 --quality-base=64\n-            #end if\t\n+            #end if\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-\t\t#for $a in $adapters\n-\t\t--adapter=\'${a.adapter_source.adapter}\'\n-\t\t#end for\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+            #end if\n+        #else\n+        --format=$input.extension\n+        #end if\n+        #for $a in $adapters\n+            #if $a.adapter_source.adapter_source_list == \'prebuilt\':\n+                --adapter="${a.adapter_source.adapter.fields.name}"=\'${a.adapter_source.adapter}\'\n+            #else if str($a.adapter_source.adapter_name) != "":\n+                --adapter=\'${a.adapter_source.adapter_name}\'=\'${a.adapter_source.adapter}\'\n+            #else\n+                --adapter=\'${a.adapter_source.adapter}\'\n+            #end if\n+        #end for\n+        #for $aa in $anywhere_adapters\n+            #if $aa.anywhere_adapter_source.anywhere_adapter_source_list == \'prebuilt\':\n+                --anywhere="${aa.anywhere_adapter_source.anywhere_adapter.fields.name}"=\'${aa.anywhere_adapter_source.anywhere_adapter}\'\n+            #else if str($aa.anywhere_adapter_source.anywhere_adapter_name) != "":\n+                --anywhere=\'${aa.anywhere_adapter_source.anywhere_adapter_name}\'=\'${aa.anywhere_adapter_source.anywhere_adapter}\'\n+            #else\n+                --anywhere=\'${aa.anywhere_adapter_source.anywhere_adapter}\'\n+            #end if\n+        #end for\n+        #for $fa in $front_adapters\n+            #if $fa.front_adapter_source.front_adapter_source_list == \'prebuilt\':\n+                --front="${fa.front_adapter_source.front_adapter.fields.name}"=\'${fa.front_adapter_source.front_adapter}\'\n+            #else if str($fa.front_adapter_source.front_adapter_name) != "":\n+                --front=\'${fa.front_adapter_source.front_adapter_name}\'=\'${fa.front_adapter_source.front_adapter}\'\n+            #else\n+                --front=\'${fa.front_adapter_source.front_adapter}\'\n+            #end if\n+        #end for\n+        --error-rate=$error_rate\n+        --times=$count\n+        --overlap=$overlap\n+        $no_indels\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+            $output_filtering_options.discard\n+            $output_filtering_options.discard_untrimmed\n+            $output_filtering_options.no_trim\n+            $output_filtering_options.mask_adapter\n+            #if str($output_filtering_options.min) != \'0\':\n+                --minimum-length=$output_filtering_opti'..b'e="fasta"/>\n+            <param name="adapter_source_list" value="user"/>\n+            <param name="adapter" value="ADAPTER"/>\n+            <param name="anywhere_adapter_source_list" value="user"/>\n+            <param name="anywhere_adapter" value=""/>\n+            <param name="front_adapter_source_list" value="user"/>\n+            <param name="front_adapter" value=""/>\n+            <param name="output_filtering" value="default"/>\n+            <param name="read_modification" value="none"/>\n+            <param name="output_type" value="additional"/>\n+            <param name="rest_file" value="true"/>\n+            <output name="output" file="cutadapt_rest.out"/>\n+            <output name="rest_output" file="cutadapt_rest2.out"/>\n+        </test>\n -->\n-\t</tests>\n+    </tests>\n \n-\t<help>\n+    <help>\n Summary\n -------\n This tool removes adapter sequences from DNA high-throughput\n@@ -270,7 +351,9 @@\n machine is longer than the molecule that is sequenced, such as in\n microRNA data.\n \n-The tool is based on the opensource cutadapt_ tool.\n+The tool is based on the opensource `cutadapt \n+&lt;http://code.google.com/p/cutadapt/>`_ tool. See the `complete cutadapt\n+documentation &lt;https://cutadapt.readthedocs.org/en/latest/index.html>`_ for additional details.\n \n -----\n \n@@ -288,14 +371,14 @@\n your adapter sequence is ``ADAPTER`` (specified via 3\' Adapters parameter).\n If you have these input sequences::\n \n-\tMYSEQUENCEADAPTER\n-\tMYSEQUENCEADAP\n-\tMYSEQUENCEADAPTERSOMETHINGELSE\n+    MYSEQUENCEADAPTER\n+    MYSEQUENCEADAP\n+    MYSEQUENCEADAPTERSOMETHINGELSE\n \n All of them will be trimmed to ``MYSEQUENCE``. If the sequence starts with an\n adapter, like this::\n \n-\tADAPTERSOMETHING\n+    ADAPTERSOMETHING\n \n It will be empty after trimming.\n \n@@ -308,7 +391,7 @@\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+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@@ -331,7 +414,7 @@\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+it are removed.\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 Anywhere Adapter\n@@ -360,7 +443,30 @@\n but trim the third to an empty sequence and trim the fourth not at all.\n \n \n+Format of the info file\n+-----------------------\n+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:\n+\n+1. Read name\n+2. Number of errors\n+3. 0-based start coordinate of the adapter match\n+4. 0-based end coordinate of the adapter match\n+5. Sequence of the read to the left of the adapter match (can be empty)\n+6. Sequence of the read that was matched to the adapter\n+7. Sequence of the read to the right of the adapter match (can be empty)\n+8. Name of the found adapter.\n+\n+The concatenation of the fields 5-7 yields the full read sequence. In column 8, adapters without a name are numbered starting from 1.\n+\n+If no adapter was found, the format is as follows:\n+\n+1. Read name\n+2. The value -1\n+3. The read sequence\n+\n+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.\n+\n .. _cutadapt: http://code.google.com/p/cutadapt/\n-\t</help>\n+    </help>\n \n </tool>\n'
b
diff -r 2d6671b10919 -r 93d58ffe39f1 cutadapt_adapters.txt.sample
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cutadapt_adapters.txt.sample Mon Oct 06 14:01:06 2014 -0400
b
@@ -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)
b
diff -r 2d6671b10919 -r 93d58ffe39f1 fastx_clipper_sequences.txt.sample
--- a/fastx_clipper_sequences.txt.sample Mon Nov 26 17:37:26 2012 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -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)
b
diff -r 2d6671b10919 -r 93d58ffe39f1 tool_dependencies.xml
--- a/tool_dependencies.xml Mon Nov 26 17:37:26 2012 -0500
+++ b/tool_dependencies.xml Mon Oct 06 14:01:06 2014 -0400
b
@@ -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>