comparison cuff_macros.xml @ 5:9a854107dbb2 draft

"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 28b94cfbfdb9
comparison
equal deleted inserted replaced
4:6cbfede05833 5:9a854107dbb2
1 <macros> 1 <macros>
2 <token name="@VERSION@">2.2.1</token> 2 <token name="@VERSION@">2.2.1</token>
3 3
4 <xml name="requirements"> 4 <xml name="requirements">
5 <requirements> 5 <requirements>
6 <requirement type="package" version="2.2.1">cufflinks</requirement> 6 <requirement type="package" version="2.2.1">cufflinks</requirement>
7 <yield /> 7 <yield />
8 </requirements> 8 </requirements>
9 </xml> 9 </xml>
10 10
11 <xml name="condition_inputs"> 11 <xml name="conditions_repeat" token_format="">
12 <!-- DEFAULT : use BAM/SAM files --> 12 <repeat name="conditions" title="Condition" min="2">
13 <conditional name="in_type"> 13 <param name="name" label="Condition name" type="text">
14 <param name="set_in_type" type="select" label="Input data type" 14 <validator type="empty_field" message="You must provide a condition name" />
15 help="CuffNorm supports either CXB (from cuffquant) or SAM/BAM input files. Mixing is not supported. Default: SAM/BAM"> 15 <validator type="expression" message="Commas are not allowed in condition names">value and "," not in value</validator>
16 <option value="BAM">SAM/BAM</option> 16 </param>
17 <option value="CXB">Cuffquant (CXB)</option> 17 <param name="samples" label="Replicates" type="data" format="@FORMAT@" multiple="true"/>
18 <option value="CONDITION_LIST">List of single replicate conditions</option> 18 </repeat>
19 <option value="CONDITION_REPLICATE_LIST">List of multiple replicate conditions</option> 19 </xml>
20 </param>
21 <when value="BAM">
22 <repeat name="conditions" title="Condition" min="2">
23 <param name="name" label="Condition name" type="text"/>
24 <param name="samples" label="Replicates" type="data" format="sam,bam" multiple="true"/>
25 </repeat>
26 </when>
27 <when value="CXB">
28 <repeat name="conditions" title="Condition" min="2">
29 <param name="name" label="Condition name" type="text"/>
30 <param name="samples" label="Replicates" type="data" format="cxb" multiple="true"/>
31 </repeat>
32 </when>
33 <when value="CONDITION_LIST">
34 <param name="conditions" label="List of Conditions" type="data_collection" collection_type="list" />
35 </when>
36 <when value="CONDITION_REPLICATE_LIST">
37 <param name="conditions" label="List of Conditions" type="data_collection" collection_type="list:list" />
38 </when>
39 </conditional>
40 </xml>
41 <token name="@CONDITION_SAMPLES@">
42 #if $in_type.set_in_type in ['BAM', 'CXB']
43 #for $condition in $in_type.conditions:
44 #set samples = ','.join( [ str( $sample ) for $sample in $condition.samples ] )
45 '$samples'
46 #end for
47 #elif $in_type.set_in_type == 'CONDITION_LIST'
48 #for $sample in $in_type.conditions:
49 '$sample'
50 #end for
51 #elif $in_type.set_in_type == 'CONDITION_REPLICATE_LIST'
52 #for $condition_list in $in_type.conditions:
53 #set samples = ','.join( [ str( $sample ) for $sample in $condition_list ] )
54 '$samples'
55 #end for
56 #end if
57 </token>
58 <token name="@CONDITION_LABELS@">
59 #import re
60 #if $in_type.set_in_type in ['BAM', 'CXB']
61 #set labels = '\'' + '\',\''.join( [ str( $condition.name ) for $condition in $in_type.conditions ] ) + '\''
62 #elif $in_type.set_in_type in ['CONDITION_LIST', 'CONDITION_REPLICATE_LIST']
63 #set labels = '\'' + '\',\''.join( map(lambda x: re.sub('[^\w\-_]', '_', x), $in_type.conditions.keys() ) ) + '\''
64 #end if
65 --labels $labels
66 </token>
67 <xml name="cufflinks_gtf_inputs">
68 <param format="gtf" name="inputs" type="data" label="GTF file(s) produced by Cufflinks" help="" multiple="true" />
69 </xml>
70 <token name="@CUFFLINKS_LINK_GTF_INPUTS@"><![CDATA[
71 ## Inputs.
72 #for $i, $input_file in enumerate($inputs):
73 ln -s '${input_file}' input_$i &&
74 #end for
75 ]]></token>
76 <token name="@CUFFLINKS_GTF_INPUTS@">
77 ## Inputs.
78 #for $i, $input_file in enumerate($inputs):
79 'input_$i'
80 #end for
81 </token>
82 <token name="@HAS_MULTIPLE_INPUTS@">getattr(inputs, "__len__", [].__len__)() >= 2</token>
83 20
84 <xml name="citations"> 21 <xml name="condition_inputs">
85 <citations> 22 <!-- DEFAULT : use BAM/SAM files -->
86 <citation type="doi">10.1038/nbt.1621</citation> 23 <conditional name="in_type">
87 <yield/> 24 <param name="set_in_type" type="select" label="Input data type"
88 </citations> 25 help="CuffNorm supports either CXB (from cuffquant) or SAM/BAM input files. Mixing is not supported. Default: SAM/BAM">
89 </xml> 26 <option value="BAM">SAM/BAM</option>
27 <option value="CXB">Cuffquant (CXB)</option>
28 <option value="CONDITION_LIST">List of single replicate conditions</option>
29 <option value="CONDITION_REPLICATE_LIST">List of multiple replicate conditions</option>
30 </param>
31 <when value="BAM">
32 <expand macro="conditions_repeat" format="sam,bam" />
33 </when>
34 <when value="CXB">
35 <expand macro="conditions_repeat" format="cxb" />
36 </when>
37 <when value="CONDITION_LIST">
38 <param name="conditions" label="List of Conditions" type="data_collection" collection_type="list" />
39 </when>
40 <when value="CONDITION_REPLICATE_LIST">
41 <param name="conditions" label="List of Conditions" type="data_collection" collection_type="list:list" />
42 </when>
43 </conditional>
44 </xml>
45 <token name="@CONDITION_SAMPLES@"><![CDATA[
46 #if $in_type.set_in_type in ['BAM', 'CXB']
47 #for $condition in $in_type.conditions:
48 #set samples = ','.join([str($sample) for $sample in $condition.samples])
49 '$samples'
50 #end for
51 #elif $in_type.set_in_type == 'CONDITION_LIST'
52 #for $sample in $in_type.conditions:
53 '$sample'
54 #end for
55 #elif $in_type.set_in_type == 'CONDITION_REPLICATE_LIST'
56 #for $condition_list in $in_type.conditions:
57 #set samples = ','.join([str($sample) for $sample in $condition_list])
58 '$samples'
59 #end for
60 #end if
61 ]]></token>
62 <token name="@CONDITION_LABELS@"><![CDATA[
63 #import re
64 #if $in_type.set_in_type in ['BAM', 'CXB']
65 #set labels = "','".join([str($condition.name) for $condition in $in_type.conditions])
66 #elif $in_type.set_in_type in ['CONDITION_LIST', 'CONDITION_REPLICATE_LIST']
67 #set labels = "','".join([str($condition).replace(',', '_') for $condition in $in_type.conditions.keys()])
68 #end if
69 --labels '$labels'
70 ]]></token>
71 <xml name="cufflinks_gtf_inputs">
72 <param format="gtf" name="inputs" type="data" label="GTF file(s) produced by Cufflinks" help="" multiple="true" />
73 </xml>
74 <token name="@CUFFLINKS_LINK_GTF_INPUTS@"><![CDATA[
75 ## Inputs.
76 #for $i, $input_file in enumerate($inputs):
77 ln -s '${input_file}' input_$i &&
78 #end for
79 ]]></token>
80 <token name="@CUFFLINKS_GTF_INPUTS@"><![CDATA[
81 ## Inputs.
82 #for $i, $input_file in enumerate($inputs):
83 'input_$i'
84 #end for
85 ]]></token>
86 <token name="@HAS_MULTIPLE_INPUTS@">getattr(inputs, "__len__", [].__len__)() >= 2</token>
87
88 <xml name="citations">
89 <citations>
90 <citation type="doi">10.1038/nbt.1621</citation>
91 <yield/>
92 </citations>
93 </xml>
90 94
91 </macros> 95 </macros>