changeset 6:e06d41f3ed3e draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tool_collections/galaxy_sequence_utils/fastq_manipulation commit a5766d27dcddd1891766476a913d0eae1ec7a3c9
author iuc
date Sun, 23 Nov 2025 17:50:28 +0000
parents e30352e889fe
children
files fastq_manipulation.xml macros.xml
diffstat 2 files changed, 276 insertions(+), 97 deletions(-) [+]
line wrap: on
line diff
--- a/fastq_manipulation.xml	Fri Oct 04 10:34:44 2024 +0000
+++ b/fastq_manipulation.xml	Sun Nov 23 17:50:28 2025 +0000
@@ -20,13 +20,8 @@
 #import binascii
 import binascii
 import re
-import six
 
-if six.PY2:
-    from string import maketrans
-else:
-    maketrans = str.maketrans
-
+maketrans = str.maketrans
 
 ##does read match
 def match_read(fastq_read):
@@ -253,162 +248,346 @@
         <!-- match all and do nothing -->
         <test>
             <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="identifier" />
-            <param name="manipulation_selector" value="translate" />
-            <param name="from" value="" />
-            <param name="to" value="" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="identifier" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="translate" />
+                        <param name="from" value="" />
+                        <param name="to" value="" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match None and do nothing -->
         <test>
             <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value="STRINGDOESNOTEXIST" />
-            <param name="manipulation_type_selector" value="identifier" />
-            <param name="manipulation_selector" value="translate" />
-            <param name="from" value="" />
-            <param name="to" value="" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value="STRINGDOESNOTEXIST" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="identifier" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="translate" />
+                        <param name="from" value="" />
+                        <param name="to" value="" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match all and remove -->
         <test>
             <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="miscellaneous" />
-            <param name="manipulation_selector" value="remove" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="miscellaneous" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="remove" />
+                    </conditional>    
+                </conditional>
+            </repeat>
             <output name="output_file" file="empty_file.dat" ftype="fastqsanger" />
         </test>
         <!-- match None and remove -->
         <test>
             <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value="STRINGDOESNOTEXIST" />
-            <param name="manipulation_type_selector" value="miscellaneous" />
-            <param name="manipulation_selector" value="remove" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value="STRINGDOESNOTEXIST" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="miscellaneous" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="remove" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match all and trim to 4 inner-most bases -->
         <test>
             <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="trim" />
-            <param name="base_offset_type" value="offsets_absolute"/>
-            <param name="left_column_offset" value="45"/>
-            <param name="right_column_offset" value="45"/>
-            <param name="keep_zero_length" value="true" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="trim" />
+                        <conditional name="offset_type">
+                            <param name="base_offset_type" value="offsets_absolute"/>
+                            <param name="left_column_offset" value="45"/>
+                            <param name="right_column_offset" value="45"/>
+                        </conditional>
+                        <param name="keep_zero_length" value="true" />
+                    </conditional>                        
+                </conditional>
+            </repeat>
             <output name="output_file" file="fastq_trimmer_out1.fastqsanger" ftype="fastqsanger" />
         </test>
         <test>
             <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="trim" />
-            <param name="base_offset_type" value="offsets_percent"/>
-            <param name="left_column_offset" value="47.87"/>
-            <param name="right_column_offset" value="47.87"/>
-            <param name="keep_zero_length" value="true" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="trim" />
+                        <conditional name="offset_type">
+                            <param name="base_offset_type" value="offsets_percent"/>
+                            <param name="left_column_offset" value="47.87"/>
+                            <param name="right_column_offset" value="47.87"/>
+                        </conditional>
+                        <param name="keep_zero_length" value="true" />
+                    </conditional>                    
+                </conditional>
+            </repeat>
             <output name="output_file" file="fastq_trimmer_out1.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match all and rev comp -->
         <test>
             <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="rev_comp" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="rev_comp" />
+                    </conditional>        
+                </conditional>
+            </repeat>
             <output name="output_file" file="sanger_full_range_rev_comp.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match all and rev comp, with ambiguous DNA -->
         <test>
             <param name="input_file" value="misc_dna_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="rev_comp" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="rev_comp" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="misc_dna_as_sanger_rev_comp_1.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match all and rev comp, with ambiguous RNA -->
         <test>
             <param name="input_file" value="misc_rna_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="rev_comp" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="rev_comp" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="misc_rna_as_sanger_rev_comp_1.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match first seq and rev comp -->
         <test>
             <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value="FAKE0001" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="rev_comp" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value="FAKE0001" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="rev_comp" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="sanger_full_range_rev_comp_1_seq.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match first seq and rev comp: i.e. undo above -->
         <test>
             <param name="input_file" value="sanger_full_range_rev_comp_1_seq.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value="FAKE0001" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="rev_comp" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value="FAKE0001" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="rev_comp" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match all and DNA to RNA -->
         <test>
             <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="dna_to_rna" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="dna_to_rna" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="sanger_full_range_as_rna.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match all and RNA to DNA-->
         <test>
             <param name="input_file" value="sanger_full_range_as_rna.fastqsanger" ftype="fastqsanger" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="rna_to_dna" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="rna_to_dna" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
         </test>
         <!-- match all and RNA to DNA (gz compressed) -->
         <test>
             <param name="input_file" value="sanger_full_range_as_rna.fastqsanger.gz" ftype="fastqsanger.gz" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="rna_to_dna" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="rna_to_dna" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger.gz" decompress="true" />
         </test>
         <!-- match all and RNA to DNA (bz2 compressed) -->
         <test>
             <param name="input_file" value="sanger_full_range_as_rna.fastqsanger.bz2" ftype="fastqsanger.bz2" />
-            <param name="match_type_selector" value="identifier" />
-            <param name="match_selector" value="regex" />
-            <param name="match_by" value=".*" />
-            <param name="manipulation_type_selector" value="sequence" />
-            <param name="manipulation_selector" value="rna_to_dna" />
+            <repeat name="match_blocks">
+                <conditional name="match_type">
+                    <param name="match_type_selector" value="identifier" />
+                    <conditional name="match">
+                        <param name="match_selector" value="regex" />
+                        <param name="match_by" value=".*" />
+                    </conditional>
+                </conditional>
+            </repeat>
+            <repeat name="manipulate_blocks">
+                <conditional name="manipulation_type">
+                    <param name="manipulation_type_selector" value="sequence" />
+                    <conditional name="manipulation">
+                        <param name="manipulation_selector" value="rna_to_dna" />
+                    </conditional>
+                </conditional>
+            </repeat>
             <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger.bz2" decompress="true" />
         </test>
     </tests>
--- a/macros.xml	Fri Oct 04 10:34:44 2024 +0000
+++ b/macros.xml	Sun Nov 23 17:50:28 2025 +0000
@@ -1,11 +1,11 @@
 <macros>
-    <token name="@TOOL_VERSION@">1.1.5</token>
-    <token name="@VERSION_SUFFIX@">2</token>
-    <token name="@PROFILE@">23.1</token>
+    <token name="@TOOL_VERSION@">1.2</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@PROFILE@">24.2</token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">galaxy_sequence_utils</requirement>
             <yield/>
         </requirements>
-    </xml>>
+    </xml>
 </macros>