Mercurial > repos > yhoogstrate > edger_with_design_matrix
comparison edgeR_Design_from_Expression_Matrix.xml @ 1:a4a4c88783ea 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:59:05 -0400 |
parents | |
children | ec951a5017f8 |
comparison
equal
deleted
inserted
replaced
0:acb56603b268 | 1:a4a4c88783ea |
---|---|
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 <macros> | |
6 <import>edgeR_macros.xml</import> | |
7 </macros> | |
8 | |
9 <requirements> | |
10 <requirement type="package" version="1.0.0">design_matrix_creator</requirement> | |
11 </requirements> | |
12 | |
13 <command interpreter="python"> | |
14 design_matrix_creator | |
15 -c $expression_matrix | |
16 | |
17 #set $unique_columns = [] | |
18 #for $factor in $treatments: | |
19 #for $level in $factor.rep_factorLevel: | |
20 #for $val in $level.factorIndex.value: | |
21 #if str($val) not in $unique_columns: | |
22 #set $unique_columns = $unique_columns + [str($val)] | |
23 #end if | |
24 #end for | |
25 #end for | |
26 #end for | |
27 | |
28 #set $unique_columns = " ".join(unique_columns) | |
29 -s $unique_columns | |
30 | |
31 -t | |
32 #for $factor in $treatments: | |
33 #set $factor_str = str($factor.name).encode('base64').replace('\n','') | |
34 | |
35 #for $level in $factor.rep_factorLevel: | |
36 #set $factor_str = $factor_str+":"+str($level.factorLevel).encode('base64').replace('\n','')+":"+",".join([str(x).strip() for x in $level.factorIndex.value]) | |
37 #end for | |
38 | |
39 $factor_str | |
40 #end for | |
41 | |
42 #if $choose_blocking.choice == "true" | |
43 -b | |
44 #for blocking in $choose_blocking.blocking_repeat: | |
45 #set $blocking_str = str($blocking.blocking_name).encode('base64').replace('\n','') | |
46 | |
47 #for $block_iter in $blocking.block: | |
48 #set $block_str = ",".join([str(x).strip() for x in $block_iter.block_index.value]) | |
49 #set $blocking_str = $blocking_str+":"+$block_str | |
50 #end for | |
51 | |
52 $blocking_str | |
53 #end for | |
54 #end if | |
55 | |
56 -o $design_matrix | |
57 </command> | |
58 | |
59 <inputs> | |
60 <param format="tabular" name="expression_matrix" type="data" label="Expression matrix (read counts)" help="You can create a count matrix with the tool" /> | |
61 | |
62 <repeat name="treatments" title="Factor/Condition" min="1"> | |
63 <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!!" /> | |
64 <repeat name="rep_factorLevel" title="Factor level" min="1"> | |
65 <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!!" /> | |
66 <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"> | |
67 <validator type="no_options" message="Please select at least one column." /> | |
68 </param> | |
69 </repeat> | |
70 </repeat> | |
71 | |
72 <conditional name="choose_blocking"> | |
73 <param name="choice" type="select" label="Define blocking (paired or grouped samples)" help="e.g. to remove batch effects" > | |
74 <option value="false">No</option> | |
75 <option value="true">Yes</option> | |
76 </param> | |
77 <when value="false" /> | |
78 <when value="true"> | |
79 <repeat name="blocking_repeat" title="Blocking condition" min="1"> | |
80 <param name="blocking_name" type="text" value="" label="Specify a name for a blocking condition" help="e.g.'Patients' or 'Batches'" /> | |
81 <repeat name="block" title="Block" min="2"> | |
82 <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"> | |
83 <validator type="no_options" message="Please select at least one column." /> | |
84 </param> | |
85 </repeat> | |
86 </repeat> | |
87 </when> | |
88 </conditional> | |
89 </inputs> | |
90 | |
91 <outputs> | |
92 <data format="tabular" name="design_matrix" label="Design matrix" /> | |
93 </outputs> | |
94 | |
95 <tests> | |
96 <test> | |
97 <param name="expression_matrix" value="GSE51403/GSE51403_expression_matrix_full.txt" /> | |
98 | |
99 <!-- <repeat name="treatments"> --> | |
100 <param name="treatments_0|name" value="Treatment" /> | |
101 <!-- <repeat name="rep_factorLevel"> --> | |
102 <param name="treatments_0|rep_factorLevel_0|factorLevel" value="Control" /> | |
103 <param name="treatments_0|rep_factorLevel_0|factorIndex" value="2,3,4,5,6,7,8" /> | |
104 <!-- </repeat> --> | |
105 <!-- <repeat name="rep_factorLevel"> --> | |
106 <param name="treatments_0|rep_factorLevel_1|factorLevel" value="E2" /> | |
107 <param name="treatments_0|rep_factorLevel_1|factorIndex" value="9,10,11,12,13,14,15" /> | |
108 <!-- </repeat> --> | |
109 <!-- </repeat> --> | |
110 | |
111 <conditional name="choose_blocking"> | |
112 <param value="false" /> | |
113 </conditional> | |
114 | |
115 <output name="design_matrix" file="GSE51403/GSE51403_design_matrix_full_depth.txt" /> | |
116 </test> | |
117 </tests> | |
118 | |
119 <help> | |
120 edgeR: Design- from Expression matrix | |
121 ##################################### | |
122 | |
123 Overview | |
124 -------- | |
125 | |
126 Create a design matrix by selecting the desired patients from an | |
127 expression matrix. | |
128 | |
129 Input | |
130 ----- | |
131 | |
132 **References** | |
133 | |
134 The test data is coming from: doi: 10.1093/bioinformatics/btt688. | |
135 http://www.ncbi.nlm.nih.gov/pubmed/24319002 | |
136 | |
137 @CONTACT@ | |
138 </help> | |
139 | |
140 <expand macro="citations" /> | |
141 </tool> |