changeset 3:10447a4b0cc3 draft

planemo upload for repository https://github.com/qiime2/galaxy-tools/tree/main/tools/suite_qiime2_core__tools commit db44258c63cb7e98d605a94464066fc8a5ef75ac
author q2d2
date Thu, 01 Feb 2024 21:22:08 +0000
parents 18c6b2b6740f
children 9dbdf05beaa9
files qiime2_core__tools__import.xml test-data/YY/YY_S49_R1_001.fastq.gz test-data/YY/YY_S49_R2_001.fastq.gz
diffstat 3 files changed, 76 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/qiime2_core__tools__import.xml	Thu Jun 08 19:53:28 2023 +0000
+++ b/qiime2_core__tools__import.xml	Thu Feb 01 21:22:08 2024 +0000
@@ -10,7 +10,7 @@
 for:
     qiime2 (version: 2023.5.1)
 -->
-<tool name="qiime2 tools import" id="qiime2_core__tools__import" version="2023.5.0+dist.h193f7cc9.2" profile="22.05" license="BSD-3-Clause">
+<tool name="qiime2 tools import" id="qiime2_core__tools__import" version="2023.5.0+dist.h193f7cc9.3" profile="22.05" license="BSD-3-Clause">
     <description>Import data into a QIIME 2 artifact</description>
     <requirements>
         <container type="docker">quay.io/qiime2/core:2023.5</container>
@@ -20,6 +20,7 @@
         <configfile name="inputs">&lt;%
 # This is an exercise in cheating the Cheetah
 import json
+from collections.abc import MutableMapping
 
 def expand_collection(collection):
     # All of this work is just to extract the
@@ -28,7 +29,7 @@
             for d in collection]
 
 def stringify(obj):
-    if type(obj) is dict:
+    if isinstance(obj, MutableMapping):
         new = {}
         for key, value in obj.items():
             if (key.startswith('__') and key.endswith('__')
@@ -357,7 +358,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FrictionlessCSVFileFormat. See the documentation below for more information. Elements must match regex: .+\.csv"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FrictionlessCSVFileFormat. See the documentation below for more information. Elements must match regex: .+\.csv"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -938,7 +939,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -969,7 +970,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1000,7 +1001,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1055,7 +1056,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1094,7 +1095,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1146,7 +1147,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1177,7 +1178,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1232,7 +1233,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1312,7 +1313,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1343,7 +1344,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1374,7 +1375,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1429,7 +1430,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1468,7 +1469,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1521,7 +1522,7 @@
                                     <option value="individual">Associate individual files</option>
                                 </param>
                                 <when value="collection">
-                                    <param name="elements" type="data_collection" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
+                                    <param name="elements" type="data_collection" collection_type="list" help="This data should be formatted as a FastqGzFormat. See the documentation below for more information. Elements must match regex: .+_.+_L[0-9][0-9][0-9]_R[12]_001\.fastq\.gz"/>
                                     <conditional name="__q2galaxy__GUI__cond__add_ext__">
                                         <param name="__q2galaxy__GUI__select__ext_pick__" type="select" label="Append an extension?" help="This is needed if your element identifiers lack one.">
                                             <option value="no">No, use element identifiers as is</option>
@@ -1657,6 +1658,64 @@
     <outputs>
         <data name="imported_data" format="qza" from_work_dir="imported_data.qza"/>
     </outputs>
+    <tests>
+        <test>
+            <conditional name="import_root">
+                <param name="type" value="SampleData__ob__PairedEndSequencesWithQuality__cb__"/>
+                <conditional name="__q2galaxy__GUI__cond__format__">
+                    <param name="format" value="CasavaOneEightLanelessPerSampleDirFmt"/>
+                    <section name="import_sequences">
+                    <conditional name="__q2galaxy__GUI__cond__sequences__">
+                        <param name="__q2galaxy__GUI__select__picker__" value="collection"/>
+                        <param name="elements">
+                            <collection type="list">
+                                <element name="YY_S49_R1_001.fastq.gz" ftype="fastqsanger.gz" value="YY/YY_S49_R1_001.fastq.gz" />
+                                <element name="YY_S49_R2_001.fastq.gz" ftype="fastqsanger.gz" value="YY/YY_S49_R2_001.fastq.gz" />
+                            </collection>
+                        </param>
+                        <conditional name="__q2galaxy__GUI__cond__add_ext__">
+                            <param name="__q2galaxy__GUI__select__ext_pick__" value="yes"/>
+                            <param name="ext" label="fastq.gz"/>
+                        </conditional>
+                    </conditional>
+                </section>
+                </conditional>
+            </conditional>
+            <output name="imported_data">
+                <assert_contents>
+                    <has_size min="1"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+            <conditional name="import_root">
+                <param name="type" value="SampleData__ob__PairedEndSequencesWithQuality__cb__"/>
+                <conditional name="__q2galaxy__GUI__cond__format__">
+                    <param name="format" value="CasavaOneEightSingleLanePerSampleDirFmt"/>
+                    <section name="import_sequences">
+                    <conditional name="__q2galaxy__GUI__cond__sequences__">
+                        <param name="__q2galaxy__GUI__select__picker__" value="collection"/>
+                        <param name="elements">
+                            <collection type="list">
+                                <element name="YY_S49_L001_R1_001.fastq.gz" ftype="fastqsanger.gz" value="YY/YY_S49_R1_001.fastq.gz" />
+                                <element name="YY_S49_L001_R2_001.fastq.gz" ftype="fastqsanger.gz" value="YY/YY_S49_R2_001.fastq.gz" />
+                            </collection>
+                        </param>
+                        <conditional name="__q2galaxy__GUI__cond__add_ext__">
+                            <param name="__q2galaxy__GUI__select__ext_pick__" value="yes"/>
+                            <param name="ext" label="fastq.gz"/>
+                        </conditional>
+                    </conditional>
+                </section>
+                </conditional>
+            </conditional>
+            <output name="imported_data">
+                <assert_contents>
+                    <has_size min="1"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
     <help>
 QIIME 2: tools import
 =====================
Binary file test-data/YY/YY_S49_R1_001.fastq.gz has changed
Binary file test-data/YY/YY_S49_R2_001.fastq.gz has changed