diff cutadapt.xml @ 40:aa784cb3810d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cutadapt commit 8bdd212b8708a9d080e87303dd543fb93bc05c2f
author iuc
date Mon, 08 Jul 2024 16:21:21 +0000
parents fe74900d6dc7
children
line wrap: on
line diff
--- a/cutadapt.xml	Fri May 17 13:32:03 2024 +0000
+++ b/cutadapt.xml	Mon Jul 08 16:21:21 2024 +0000
@@ -155,6 +155,13 @@
         --length=-$other_trimming_options.shorten_options.length
     #end if
 #end if
+#if $paired and str($other_trimming_options.shorten_options_r2.shorten_values_r2) == 'True':
+    #if str($other_trimming_options.shorten_options_r2.shorten_end_r2) == '3prime'
+        -L $other_trimming_options.shorten_options_r2.length2
+    #else
+        -L -$other_trimming_options.shorten_options_r2.length2
+    #end if
+#end if
 
 $filter_options.discard_trimmed
 $filter_options.discard_untrimmed
@@ -278,6 +285,7 @@
                 <option value="retain">Retain: the read is trimmed, but the adapter sequence is not removed</option>
                 <option value="mask">Mask: mask adapters with 'N' characters instead of trimming them</option>
                 <option value="lowercase">Lowercase: convert to lowercase</option>
+                <option value="crop">Crop: trim upstream and downstream sequences, i.e. retain adapter sequences only</option>
                 <option value="none">None: leave unchanged</option>
             </param>
             <param argument="--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)." />
@@ -321,6 +329,21 @@
                 <when value="False">
                 </when>
             </conditional>
+            <conditional name="shorten_options_r2">
+                <param name="shorten_values_r2" type="select" label="Separate shortening of R2 reads to a fixed length?" help="For paired-end data, shortening of R2 reads can be handled separately. Ignored for single-end data.">
+                    <option value="True">Separate shortening of R2 reads</option>
+                    <option value="False" selected="true">Treat R2 reads the same as R1 reads</option>
+                </param>
+                <when value="True">
+                    <param argument="-L" name="length2" type="integer" value="0" label="Length" help="Shorten R2 reads to this length. This modification is applied after adapter trimming." />
+                    <param name="shorten_end_r2" type="select" label="End at which to apply the slice">
+                        <option value="3prime">3' ends</option>
+                        <option value="5prime">5' ends</option>
+                    </param>
+                </when>
+                <when value="False">
+                </when>
+            </conditional>
         </section>
         <!-- Filter Options -->
         <section name="filter_options" title="Read Filtering Options">
@@ -886,6 +909,22 @@
                 </repeat>
             </section>
             <section name="adapter_options">
+                <param name="action" value="crop"/>
+            </section>
+            <output name="out1" file="cutadapt_action_crop.out" ftype="fastq"/>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="type" value="single" />
+            <param name="input_1" ftype="fastq" value="cutadapt_small.fastq" />
+            <section name="r1">
+                <repeat name="adapters">
+                    <conditional name="adapter_source">
+                        <param name="adapter_source_list" value="user"/>
+                        <param name="adapter" value="CGTCCGAANTAG"/>
+                    </conditional>
+                </repeat>
+            </section>
+            <section name="adapter_options">
                 <param name="action" value="none"/>
             </section>
             <output name="out1" file="cutadapt_action_none.out" ftype="fastq"/>
@@ -907,7 +946,7 @@
             </section>
             <output name="out1" file="cutadapt_revcomp.out" ftype="fastq"/>
         </test>
-        <!-- Test minimum lenghth paired-reads -->
+        <!-- Test minimum length paired-reads -->
         <test expect_num_outputs="2">
             <param name="type" value="paired" />
             <param name="input_1" ftype="fastq.gz" value="bwa-mem-fastq1_assimetric.fq.gz" />
@@ -986,14 +1025,6 @@
                     </conditional>
                 </repeat>
             </section>
-            <section name="r2">
-                <repeat name="adapters2">
-                    <conditional name="adapter_source2">
-                        <param name="adapter_source_list2" value="user"/>
-                        <param name="adapter2" value="AGATCGGAAGAGC"/>
-                    </conditional>
-                </repeat>
-            </section>
             <section name="filter_options">
                 <param name="pair_filter" value="both"/>
                 <param name="minimum_length" value="10"/>
@@ -1020,14 +1051,6 @@
                     </conditional>
                 </repeat>
             </section>
-            <section name="r2">
-                <repeat name="adapters2">
-                    <conditional name="adapter_source2">
-                        <param name="adapter_source_list2" value="user"/>
-                        <param name="adapter2" value="AGATCGGAAGAGC"/>
-                    </conditional>
-                </repeat>
-            </section>
             <section name="filter_options">
                 <param name="pair_filter" value="both"/>
                 <param name="minimum_length" value="10"/>
@@ -1089,6 +1112,67 @@
             </section>
             <output name="out1" file="cutadapt_shorten_5prime.out" ftype="fastq"/>
         </test>
+        <test expect_num_outputs="2">
+            <param name="type" value="paired" />
+            <param name="input_1" ftype="fastq" value="cutadapt_small.fastq" />
+            <section name="r1">
+                <repeat name="adapters">
+                    <conditional name="adapter_source">
+                        <param name="adapter_source_list" value="user"/>
+                        <param name="adapter" value="AGCCGCTANGACG"/>
+                    </conditional>
+                </repeat>
+            </section>
+            <section name="r2">
+                <repeat name="adapters2">
+                    <conditional name="adapter_source">
+                        <param name="adapter_source_list" value="user"/>
+                        <param name="adapter" value="AGCCGCTANGACG"/>
+                    </conditional>
+                </repeat>
+            </section>
+            <section name="other_trimming_options">
+                <conditional name="shorten_options">
+                    <param name="shorten_values" value="True"/>
+                    <param name="shorten_end" value="3prime"/>
+                    <param name="length" value="10"/>
+                </conditional>
+                <conditional name="shorten_options_r2">
+                    <param name="shorten_values_r2" value="True"/>
+                    <param name="shorten_end_r2" value="5prime"/>
+                    <param name="length2" value="10"/>
+                </conditional>
+            </section>
+            <section name="filter_options">
+                <param name="minimum_length" value="0"/>
+            </section>
+            <output name="out1" file="cutadapt_shorten_3prime.out" ftype="fastq"/>
+            <output name="out2" file="cutadapt_shorten_5prime.out" ftype="fastq"/>
+        </test>
+        <test expect_num_outputs="2">
+            <param name="type" value="paired" />
+            <param name="input_1" ftype="fastq" value="cutadapt_small.fastq" />
+            <section name="r2">
+                <repeat name="adapters2">
+                    <conditional name="adapter_source">
+                        <param name="adapter_source_list" value="user"/>
+                        <param name="adapter" value="AGCCGCTANGACG"/>
+                    </conditional>
+                </repeat>
+            </section>
+            <section name="other_trimming_options">
+                <conditional name="shorten_options_r2">
+                    <param name="shorten_values_r2" value="True"/>
+                    <param name="shorten_end_r2" value="3prime"/>
+                    <param name="length2" value="10"/>
+                </conditional>
+            </section>
+            <section name="filter_options">
+                <param name="minimum_length" value="0"/>
+            </section>
+            <output name="out1" file="cutadapt_small.fastq" ftype="fastq"/>
+            <output name="out2" file="cutadapt_shorten_3prime.out" ftype="fastq"/>
+        </test>
         <!-- Test max expected errors options -->
         <test expect_num_outputs="1">
             <param name="type" value="single" />