changeset 5:9a854107dbb2 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/cufflinks/cuffnorm commit 6b66cbbde16c35593fe95066ea2b91623bf35140"
author iuc
date Fri, 03 Jul 2020 11:44:40 -0400
parents 6cbfede05833
children
files cuff_macros.xml cuffnorm_wrapper.xml
diffstat 2 files changed, 93 insertions(+), 95 deletions(-) [+]
line wrap: on
line diff
--- a/cuff_macros.xml	Tue Jun 16 13:01:30 2020 -0400
+++ b/cuff_macros.xml	Fri Jul 03 11:44:40 2020 -0400
@@ -1,91 +1,95 @@
 <macros>
-  <token name="@VERSION@">2.2.1</token>
+    <token name="@VERSION@">2.2.1</token>
+
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="2.2.1">cufflinks</requirement>
+            <yield />
+        </requirements>
+    </xml>
 
-  <xml name="requirements">
-    <requirements>
-      <requirement type="package" version="2.2.1">cufflinks</requirement>
-      <yield />
-    </requirements>
-  </xml>
+    <xml name="conditions_repeat" token_format="">
+        <repeat name="conditions" title="Condition" min="2">
+            <param name="name" label="Condition name" type="text">
+                <validator type="empty_field" message="You must provide a condition name" />
+                <validator type="expression" message="Commas are not allowed in condition names">value and "," not in value</validator>
+            </param>
+            <param name="samples" label="Replicates" type="data" format="@FORMAT@" multiple="true"/>
+        </repeat>
+    </xml>
 
-  <xml name="condition_inputs">
-    <!-- DEFAULT : use BAM/SAM files -->
-    <conditional name="in_type">
-        <param name="set_in_type" type="select" label="Input data type"
-            help="CuffNorm supports either CXB (from cuffquant) or SAM/BAM input files. Mixing is not supported. Default: SAM/BAM">
-            <option value="BAM">SAM/BAM</option>
-            <option value="CXB">Cuffquant (CXB)</option>
-            <option value="CONDITION_LIST">List of single replicate conditions</option>
-            <option value="CONDITION_REPLICATE_LIST">List of multiple replicate conditions</option>
-        </param>
-        <when value="BAM">
-            <repeat name="conditions" title="Condition" min="2">
-                <param name="name" label="Condition name" type="text"/>
-                <param name="samples" label="Replicates" type="data" format="sam,bam" multiple="true"/>
-            </repeat>
-        </when>
-        <when value="CXB">
-            <repeat name="conditions" title="Condition" min="2">
-                <param name="name" label="Condition name" type="text"/>
-                <param name="samples" label="Replicates" type="data" format="cxb" multiple="true"/>
-            </repeat>
-        </when>
-        <when value="CONDITION_LIST">
-            <param name="conditions" label="List of Conditions" type="data_collection" collection_type="list" />
-        </when>
-        <when value="CONDITION_REPLICATE_LIST">
-            <param name="conditions" label="List of Conditions" type="data_collection" collection_type="list:list" />
-        </when>
-    </conditional>
-  </xml>
-  <token name="@CONDITION_SAMPLES@">
-            #if $in_type.set_in_type in ['BAM', 'CXB']
-                #for $condition in $in_type.conditions:
-                    #set samples = ','.join( [ str( $sample ) for $sample in $condition.samples ] )
-                    '$samples'
-                #end for
-            #elif $in_type.set_in_type == 'CONDITION_LIST'
-                #for $sample in $in_type.conditions:
-                    '$sample'
-                #end for
-            #elif $in_type.set_in_type == 'CONDITION_REPLICATE_LIST'
-                #for $condition_list in $in_type.conditions:
-                    #set samples = ','.join( [ str( $sample ) for $sample in $condition_list ] )
-                    '$samples'
-                #end for
-            #end if
-  </token>
-  <token name="@CONDITION_LABELS@">
-            #import re
-            #if $in_type.set_in_type in ['BAM', 'CXB']
-                #set labels = '\'' + '\',\''.join( [ str( $condition.name ) for $condition in $in_type.conditions ] ) + '\''
-            #elif $in_type.set_in_type in ['CONDITION_LIST', 'CONDITION_REPLICATE_LIST']
-                #set labels = '\'' + '\',\''.join( map(lambda x: re.sub('[^\w\-_]', '_', x), $in_type.conditions.keys() ) ) + '\''
-            #end if
-            --labels $labels
-  </token>
-  <xml name="cufflinks_gtf_inputs">
-    <param format="gtf" name="inputs" type="data" label="GTF file(s) produced by Cufflinks" help="" multiple="true" />
-  </xml>
-  <token name="@CUFFLINKS_LINK_GTF_INPUTS@"><![CDATA[
-            ## Inputs.
-            #for $i, $input_file in enumerate($inputs):
-                ln -s '${input_file}' input_$i &&
-            #end for
-  ]]></token>
-  <token name="@CUFFLINKS_GTF_INPUTS@">
-            ## Inputs.
-            #for $i, $input_file in enumerate($inputs):
-                'input_$i'
-            #end for
-  </token>
-  <token name="@HAS_MULTIPLE_INPUTS@">getattr(inputs, "__len__", [].__len__)() >= 2</token>
+    <xml name="condition_inputs">
+        <!-- DEFAULT : use BAM/SAM files -->
+        <conditional name="in_type">
+            <param name="set_in_type" type="select" label="Input data type"
+                help="CuffNorm supports either CXB (from cuffquant) or SAM/BAM input files. Mixing is not supported. Default: SAM/BAM">
+                <option value="BAM">SAM/BAM</option>
+                <option value="CXB">Cuffquant (CXB)</option>
+                <option value="CONDITION_LIST">List of single replicate conditions</option>
+                <option value="CONDITION_REPLICATE_LIST">List of multiple replicate conditions</option>
+            </param>
+            <when value="BAM">
+                <expand macro="conditions_repeat" format="sam,bam" />
+            </when>
+            <when value="CXB">
+                <expand macro="conditions_repeat" format="cxb" />
+            </when>
+            <when value="CONDITION_LIST">
+                <param name="conditions" label="List of Conditions" type="data_collection" collection_type="list" />
+            </when>
+            <when value="CONDITION_REPLICATE_LIST">
+                <param name="conditions" label="List of Conditions" type="data_collection" collection_type="list:list" />
+            </when>
+        </conditional>
+    </xml>
+    <token name="@CONDITION_SAMPLES@"><![CDATA[
+#if $in_type.set_in_type in ['BAM', 'CXB']
+    #for $condition in $in_type.conditions:
+        #set samples = ','.join([str($sample) for $sample in $condition.samples])
+        '$samples'
+    #end for
+#elif $in_type.set_in_type == 'CONDITION_LIST'
+    #for $sample in $in_type.conditions:
+        '$sample'
+    #end for
+#elif $in_type.set_in_type == 'CONDITION_REPLICATE_LIST'
+    #for $condition_list in $in_type.conditions:
+        #set samples = ','.join([str($sample) for $sample in $condition_list])
+        '$samples'
+    #end for
+#end if
+    ]]></token>
+    <token name="@CONDITION_LABELS@"><![CDATA[
+#import re
+#if $in_type.set_in_type in ['BAM', 'CXB']
+    #set labels = "','".join([str($condition.name) for $condition in $in_type.conditions])
+#elif $in_type.set_in_type in ['CONDITION_LIST', 'CONDITION_REPLICATE_LIST']
+    #set labels = "','".join([str($condition).replace(',', '_') for $condition in $in_type.conditions.keys()])
+#end if
+--labels '$labels'
+    ]]></token>
+    <xml name="cufflinks_gtf_inputs">
+        <param format="gtf" name="inputs" type="data" label="GTF file(s) produced by Cufflinks" help="" multiple="true" />
+    </xml>
+    <token name="@CUFFLINKS_LINK_GTF_INPUTS@"><![CDATA[
+## Inputs.
+#for $i, $input_file in enumerate($inputs):
+    ln -s '${input_file}' input_$i &&
+#end for
+    ]]></token>
+    <token name="@CUFFLINKS_GTF_INPUTS@"><![CDATA[
+## Inputs.
+#for $i, $input_file in enumerate($inputs):
+    'input_$i'
+#end for
+    ]]></token>
+    <token name="@HAS_MULTIPLE_INPUTS@">getattr(inputs, "__len__", [].__len__)() >= 2</token>
 
-  <xml name="citations">
-    <citations>
-        <citation type="doi">10.1038/nbt.1621</citation>
-        <yield/>
-    </citations>
-  </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1038/nbt.1621</citation>
+            <yield/>
+        </citations>
+    </xml>
 
 </macros>
--- a/cuffnorm_wrapper.xml	Tue Jun 16 13:01:30 2020 -0400
+++ b/cuffnorm_wrapper.xml	Fri Jul 03 11:44:40 2020 -0400
@@ -1,4 +1,4 @@
-<tool id="cuffnorm" name="Cuffnorm" version="@VERSION@.2">
+<tool id="cuffnorm" name="Cuffnorm" version="@VERSION@.3">
     <description>Create normalized expression levels</description>
     <macros>
       <import>cuff_macros.xml</import>
@@ -210,7 +210,7 @@
 
 **Input format**
 
-Cuffdiff takes Cufflinks or Cuffcompare GTF files as input along with two SAM files containing the fragment alignments for two or more samples.
+Cuffnorm takes Cufflinks or Cuffcompare GTF files as input along with two SAM files containing the fragment alignments for two or more samples.
 
 ------
 
@@ -223,15 +223,9 @@
     
 -------
 
-**Settings**
-
-All of the options have a default value. You can change any of them. Most of the options in Cuffdiff have been implemented here.
+**Parameter list**
 
-------
-
-**Cuffdiff parameter list**
-
-This is a list of implemented Cuffdiff options::
+This is a list of implemented Cuffnorm options::
 
   --library-norm-method          Library Normalization method : Geometric (default), classic-fpkm, quartile
   --library-type                 ff-firststrand,ff-secondstrand,ff-unstranded,fr-firstrand,fr-secondstrand,fr-unstranded,transfrags