changeset 4:63a75db03ecc draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit be5c8af076296a53959fc3ed2b82d92dc7607eeb
author iuc
date Mon, 23 Apr 2018 09:42:15 -0400
parents 43f7c6cfc023
children afc13b55ead3
files make.group.xml test-data/make_group_collection.groups
diffstat 2 files changed, 40 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/make.group.xml	Fri Apr 06 04:13:02 2018 -0400
+++ b/make.group.xml	Mon Apr 23 09:42:15 2018 -0400
@@ -9,15 +9,18 @@
     <command><![CDATA[
 @SHELL_OPTIONS@
 
+#import re
+
 #set fastas = ''
 #set groups = ''
 #set count = 0
 
 #if $method.how == 'collection':
     #for $i in $method.fasta_collection:
-        ln -s '$i' fasta_${i.element_identifier}.dat &&
-        #set fastas+='fasta_'+$i.element_identifier+'.dat-'
-        #set groups+=$i.element_identifier+'-'
+        #set $identifier=re.sub('[^\w_]', '_', str($i.element_identifier))
+        ln -s '$i' 'fasta_${identifier}.dat' &&
+        #set fastas+='fasta_'+$identifier+'.dat-'
+        #set groups+=$identifier+'-'
     #end for
 #else
     #for $i in $method.inputs:
@@ -43,7 +46,8 @@
                 <option value="manually"> Manually specify fasta files and group names</option>
             </param>
             <when value="collection">
-                <param name="fasta_collection" type="data_collection" collection_type="list" format="fasta" label="Collection with fasta files to group" help="group names will be named after the collection element names"/>
+                <param name="fasta_collection" type="data_collection" collection_type="list" format="fasta" label="Collection with fasta files to group"
+                    help="group names will be derived from the dataset names of the collection elements, please make sure these are meaningful names"/>
             </when>
             <when value="manually">
                 <repeat name="inputs" title="Additional">
@@ -85,6 +89,18 @@
            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
+        <test> <!-- test with spaces or hyphens in element identifier -->
+            <param name="how" value="collection"/>
+            <param name="fasta_collection">
+               <collection type="list">
+                   <element name="test group" ftype="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.align_head" />
+                   <element name="test-group2" ftype="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.align_head" />
+              </collection>
+           </param>
+           <output name="output" file="make_group_collection.groups"/>
+           <param name="savelog" value="true"/>
+            <expand macro="logfile-test"/>
+        </test>
     </tests>
     <help><![CDATA[
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/make_group_collection.groups	Mon Apr 23 09:42:15 2018 -0400
@@ -0,0 +1,20 @@
+M00967_43_000000000-A3JHG_1_1101_19936_3208	test_group
+M00967_43_000000000-A3JHG_1_1101_15923_3823	test_group
+M00967_43_000000000-A3JHG_1_1101_14010_4122	test_group
+M00967_43_000000000-A3JHG_1_1101_13293_4703	test_group
+M00967_43_000000000-A3JHG_1_1101_24357_4866	test_group
+M00967_43_000000000-A3JHG_1_1101_23552_5194	test_group
+M00967_43_000000000-A3JHG_1_1101_7326_5417	test_group
+M00967_43_000000000-A3JHG_1_1101_11148_6457	test_group
+M00967_43_000000000-A3JHG_1_1101_7079_6722	test_group
+M00967_43_000000000-A3JHG_1_1101_8607_6805	test_group
+M00967_43_000000000-A3JHG_1_1101_19936_3208	test_group2
+M00967_43_000000000-A3JHG_1_1101_15923_3823	test_group2
+M00967_43_000000000-A3JHG_1_1101_14010_4122	test_group2
+M00967_43_000000000-A3JHG_1_1101_13293_4703	test_group2
+M00967_43_000000000-A3JHG_1_1101_24357_4866	test_group2
+M00967_43_000000000-A3JHG_1_1101_23552_5194	test_group2
+M00967_43_000000000-A3JHG_1_1101_7326_5417	test_group2
+M00967_43_000000000-A3JHG_1_1101_11148_6457	test_group2
+M00967_43_000000000-A3JHG_1_1101_7079_6722	test_group2
+M00967_43_000000000-A3JHG_1_1101_8607_6805	test_group2