comparison edgeR_Design_from_Expression_Matrix.xml @ 105:f2ac9f6bc542 draft

planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/raw/master/edger_with_design_matrix commit 2700e500a4fb135a20ede7d52221a9d31f1aaa5e-dirty
author yhoogstrate
date Tue, 01 Sep 2015 04:22:35 -0400
parents 450c1c9a2938
children a02794bb9073
comparison
equal deleted inserted replaced
104:cdc045ed52da 105:f2ac9f6bc542
1 <?xml version="1.0" encoding="UTF-8"?>
2 <tool id="design_from_expression_matrix" name="edgeR: Design- from Expression matrix" version="1.0.0.a">
3 <description>Create design- from an expression matrix</description>
4
5 <requirements>
6 <requirement type="package" version="1.0.0">design_matrix_creator</requirement>
7 </requirements>
8
9 <command interpreter="python">
10 design_matrix_creator
11 -c $expression_matrix
12
13 #set $unique_columns = []
14 #for $factor in $treatments:
15 #for $level in $factor.rep_factorLevel:
16 #for $val in $level.factorIndex.value:
17 #if str($val) not in $unique_columns:
18 #set $unique_columns = $unique_columns + [str($val)]
19 #end if
20 #end for
21 #end for
22 #end for
23
24 #set $unique_columns = " ".join(unique_columns)
25 -s $unique_columns
26
27 -t
28 #for $factor in $treatments:
29 #set $factor_str = str($factor.name).encode('base64').replace('\n','')
30
31 #for $level in $factor.rep_factorLevel:
32 #set $factor_str = $factor_str+":"+str($level.factorLevel).encode('base64').replace('\n','')+":"+",".join([str(x).strip() for x in $level.factorIndex.value])
33 #end for
34
35 $factor_str
36 #end for
37
38 #if $choose_blocking.choice == "true"
39 -b
40 #for blocking in $choose_blocking.blocking_repeat:
41 #set $blocking_str = str($blocking.blocking_name).encode('base64').replace('\n','')
42
43 #for $block_iter in $blocking.block:
44 #set $block_str = ",".join([str(x).strip() for x in $block_iter.block_index.value])
45 #set $blocking_str = $blocking_str+":"+$block_str
46 #end for
47
48 $blocking_str
49 #end for
50 #end if
51
52 -o $design_matrix
53 </command>
54
55 <inputs>
56 <param format="tabular" name="expression_matrix" type="data" label="Expression matrix (read counts)" help="You can create a count matrix with the tool" />
57
58 <repeat name="treatments" title="Factor/Condition" min="1">
59 <param name="name" type="text" value="FactorName" label="Specify a name for the factor / condition" help="e.g. 'Tumor vs. Normal', 'Timepoint' or 'DiseaseState'. Field must be non-numerical, preferably only letters!!" />
60 <repeat name="rep_factorLevel" title="Factor level" min="1">
61 <param name="factorLevel" type="text" value="FactorLevel" label="Specify a condition" help="e.g. Tumor or Normal; Treated, untreaded or placebo. Field must be non-numerical, preferably only letters!!" />
62 <param name="factorIndex" numerical="false" use_header_names="true" label="Select columns that are associated with this factor level" type="data_column" data_ref="expression_matrix" multiple="true" size="120" display="checkboxes">
63 <validator type="no_options" message="Please select at least one column." />
64 </param>
65 </repeat>
66 </repeat>
67
68 <conditional name="choose_blocking">
69 <param name="choice" type="select" label="Define blocking (paired or grouped samples)" help="e.g. to remove batch effects" >
70 <option value="false">No</option>
71 <option value="true">Yes</option>
72 </param>
73 <when value="false" />
74 <when value="true">
75 <repeat name="blocking_repeat" title="Blocking condition" min="1">
76 <param name="blocking_name" type="text" value="" label="Specify a name for a blocking condition" help="e.g.'Patients' or 'Batches'" />
77 <repeat name="block" title="Block" min="2">
78 <param name="block_index" label="Select columns that are associated with this factor level" type="data_column" data_ref="expression_matrix" numerical="True" multiple="true" use_header_names="true" size="120" display="checkboxes">
79 <validator type="no_options" message="Please select at least one column." />
80 </param>
81 </repeat>
82 </repeat>
83 </when>
84 </conditional>
85 </inputs>
86
87 <outputs>
88 <data format="tabular" name="design_matrix" label="Design matrix" />
89 </outputs>
90
91
92 <tests>
93 <test>
94 <param name="expression_matrix" value="GSE51403/GSE51403_expression_matrix_full.txt" />
95
96 <!-- <repeat name="treatments"> -->
97 <param name="treatments_0|name" value="Treatment" />
98 <!-- <repeat name="rep_factorLevel"> -->
99 <param name="treatments_0|rep_factorLevel_0|factorLevel" value="Control" />
100 <param name="treatments_0|rep_factorLevel_0|factorIndex" value="2,3,4,5,6,7,8" />
101 <!-- </repeat> -->
102 <!-- <repeat name="rep_factorLevel"> -->
103 <param name="treatments_0|rep_factorLevel_1|factorLevel" value="E2" />
104 <param name="treatments_0|rep_factorLevel_1|factorIndex" value="9,10,11,12,13,14,15" />
105 <!-- </repeat> -->
106 <!-- </repeat> -->
107
108 <conditional name="choose_blocking">
109 <param value="false" />
110 </conditional>
111
112 <output name="design_matrix" file="GSE51403/GSE51403_design_matrix_full_depth.txt" />
113 </test>
114 </tests>
115
116 <help>
117 edgeR: Design- from Expression matrix
118 #####################################
119
120 Overview
121 --------
122
123 Create a design matrix by selecting the desired patients from an
124 expression matrix.
125
126 Input
127 -----
128
129 **References**
130
131 The test data is coming from: doi: 10.1093/bioinformatics/btt688.
132 http://www.ncbi.nlm.nih.gov/pubmed/24319002
133
134 Contact
135 -------
136
137 The tool wrapper has been written by Youri Hoogstrate from the Erasmus
138 Medical Center (Rotterdam, Netherlands) on behalf of the Translational
139 Research IT (TraIT) project:
140
141 http://www.ctmm.nl/en/programmas/infrastructuren/traitprojecttranslationeleresearch
142
143 More tools by the Translational Research IT (TraIT) project can be found
144 in the following toolsheds:
145
146 http://toolshed.dtls.nl/
147
148 http://toolshed.g2.bx.psu.edu
149
150 http://testtoolshed.g2.bx.psu.edu/
151 </help>
152
153 <citations>
154 <citation type="doi">10.1093/bioinformatics/btp616</citation>
155 <citation type="doi">10.1093/bioinformatics/btt688</citation>
156 </citations>
157 </tool>