comparison cuff_macros.xml @ 0:cef77c81d60c draft

Uploaded
author devteam
date Wed, 26 Nov 2014 14:02:38 -0500
parents
children 8fb10700729b
comparison
equal deleted inserted replaced
-1:000000000000 0:cef77c81d60c
1 <macros>
2 <token name="@VERSION@">2.2.1</token>
3 <xml name="requirements">
4 <requirements>
5 <requirement type="package" version="2.2.1">cufflinks</requirement>
6 <yield />
7 </requirements>
8 </xml>
9 <xml name="stdio">
10 <stdio>
11 <exit_code range="1:" />
12 <exit_code range=":-1" />
13 <regex match="Error:" />
14 <regex match="Exception:" />
15 </stdio>
16 </xml>
17 <xml name="condition_inputs">
18 <!-- DEFAULT : use BAM/SAM files -->
19 <conditional name="in_type">
20 <param name="set_in_type" type="select" label="Input data type"
21 help="CuffNorm supports either CXB (from cuffquant) or SAM/BAM input files. Mixing is not supported. Default: SAM/BAM">
22 <option value="BAM">SAM/BAM</option>
23 <option value="CXB">Cuffquant (CXB)</option>
24 <option value="CONDITION_LIST">List of single replicate conditions</option>
25 <option value="CONDITION_REPLICATE_LIST">List of multiple replicate conditions</option>
26 </param>
27 <when value="BAM">
28 <repeat name="conditions" title="Condition" min="2">
29 <param name="name" title="Condition name" type="text" label="Name"/>
30 <param name="samples" label="Replicates" type="data" format="sam,bam" multiple="true"/>
31 </repeat>
32 </when>
33 <when value="CXB">
34 <repeat name="conditions" title="Condition" min="2">
35 <param name="name" title="Condition name" type="text" label="Name"/>
36 <param name="samples" label="Replicates" type="data" format="cxb" multiple="true"/>
37 </repeat>
38 </when>
39 <when value="CONDITION_LIST">
40 <param name="conditions" title="List of Conditions" type="data_collection" collection_type="list" />
41 </when>
42 <when value="CONDITION_REPLICATE_LIST">
43 <param name="conditions" title="List of Conditions" type="data_collection" collection_type="list:list" />
44 </when>
45 </conditional>
46 </xml>
47 <token name="@CONDITION_SAMPLES@">
48 #if $in_type.set_in_type in ['BAM', 'CXB']
49 #for $condition in $in_type.conditions:
50 #set samples = ','.join( [ str( $sample ) for $sample in $condition.samples ] )
51 $samples
52 #end for
53 #elif $in_type.set_in_type == 'CONDITION_LIST'
54 #for $sample in $in_type.conditions:
55 $sample
56 #end for
57 #elif $in_type.set_in_type == 'CONDITION_REPLICATE_LIST'
58 #for $condition_list in $in_type.conditions:
59 #set samples = ','.join( [ str( $sample ) for $sample in $condition_list ] )
60 $samples
61 #end for
62 #end if
63 </token>
64 <token name="@CONDITION_LABELS@">
65 #import re
66 #if $in_type.set_in_type in ['BAM', 'CXB']
67 #set labels = '\'' + '\',\''.join( [ str( $condition.name ) for $condition in $in_type.conditions ] ) + '\''
68 #elif $in_type.set_in_type in ['CONDITION_LIST', 'CONDITION_REPLICATE_LIST']
69 #set labels = '\'' + '\',\''.join( map(lambda x: re.sub('[^\w\-_]', '_', x), $in_type.conditions.keys() ) ) + '\''
70 #end if
71 --labels $labels
72 </token>
73 <xml name="cufflinks_gtf_inputs">
74 <param format="gtf" name="inputs" type="data" label="GTF file(s) produced by Cufflinks" help="" multiple="true" />
75 <repeat name="additional_inputs" title="Additional GTF Inputs (Lists)">
76 <param format="gtf" name="additional_inputs" type="data_collection" label="GTF file(s) produced by Cufflinks" help="" />
77 </repeat>
78 </xml>
79 <token name="@CUFFLINKS_GTF_INPUTS@">
80 ## Inputs.
81 #for $input_file in $inputs:
82 "${input_file}"
83 #end for
84 #for $additional_input in $additional_inputs:
85 #for $input_file in $additional_input.additional_inputs:
86 "${input_file}"
87 #end for
88 #end for
89 </token>
90 <token name="@HAS_MULTIPLE_INPUTS@">getattr(inputs, "__len__", [].__len__)() >= 2</token>
91 </macros>