comparison edgeR_Concatenate_Expression_Matrices.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="concatenate_expression_matrices" name="edgeR: Concatenate Expression Matrices" version="1.0.0">
3 <description>Create a full expression matrix by selecting the desired columns from specific count tables</description>
4
5 <macros>
6 <import>edgeR_macros.xml</import>
7 </macros>
8
9 <command>
10 #set $j = 0
11 #set $paste = []
12
13 #if $add_geneids.choice == "true":
14 #set $filename = str($j)+".txt"
15 #set paste = paste + [$filename]
16
17 cut -f $add_geneids.column_geneids.value "$add_geneids.sample_geneids" > $filename ;
18 #set $j += 1
19 #end if
20
21 #for $sample in $samples:
22 ##echo "$sample.column_index"
23 ##echo "$sample.column_index.value"
24
25 #set $column_str = ",".join([str(x).strip() for x in $sample.column_index.value])
26 #set $filename = str($j)+".txt"
27 #set paste = paste + [$filename]
28
29 cut -f "$column_str" "$sample.sample" > $filename ;
30 #set $j += 1
31 #end for
32
33 #if $add_lengths.choice == "true":
34 #set $filename = str($j)+".txt"
35 #set paste = paste + [$filename]
36
37 cut -f $add_lengths.column_lengths.value "$add_lengths.sample_lengths" > $filename ;
38 #set $j += 1
39 #end if
40
41 #set $paste_str = " ".join([str(x).strip() for x in $paste])
42
43 paste $paste_str > $expression_matrix
44 </command>
45
46 <inputs>
47 <conditional name="add_geneids">
48 <param name="choice" type="select" label="Add a gene-IDs column at the end of the file" help="Highly recommended to select!" >
49 <option value="false">No</option>
50 <option value="true" selected="true">Yes</option>
51 </param>
52 <when value="false" />
53 <when value="true">
54 <param name="sample_geneids" type="data" format="tabular" label="Select Read-count dataset that contains a column for GeneIDs" help="from featureCounts/DEXSeq-count/HTSeq-count, etc." />
55 <param name="column_geneids" numerical="false" use_header_names="true" label="Select GeneID column" type="data_column" data_ref="sample_geneids" multiple="false">
56 <validator type="no_options" message="Please select at least one column." />
57 </param>
58 </when>
59 </conditional>
60
61 <repeat name="samples" title="Expression Table" help="E.g. a earlier concatenated table, or a HT-seq, featureCounts or DESeq-count result.">
62 <param name="sample" type="data" format="tabular" label="Read-count dataset that belongs to a pair" help="from featureCounts/DEXSeq-count/HTSeq-count, etc." />
63 <!-- select columns -->
64 <param name="column_index" numerical="false" use_header_names="true" label="Select columns that are associated with this factor level" type="data_column" data_ref="sample" multiple="true" size="120" display="checkboxes">
65 <validator type="no_options" message="Please select at least one column." />
66 </param>
67 </repeat>
68
69 <conditional name="add_lengths">
70 <param name="choice" type="select" label="Add a gene-lengths column at the end of the file" help="Optional, only usefull if RPKM/FPKM calculation is desired." >
71 <option value="false">No</option>
72 <option value="true">Yes</option>
73 </param>
74 <when value="false" />
75 <when value="true">
76 <param name="sample_lengths" type="data" format="tabular" label="Read-count dataset that belongs to a pair" help="from featureCounts/DEXSeq-count/HTSeq-count, etc." />
77 <param name="column_lengths" numerical="false" use_header_names="true" label="Select columns that are associated with this factor level" type="data_column" data_ref="sample_lengths" multiple="false" size="120">
78 <validator type="no_options" message="Please select at least one column." />
79 </param>
80 </when>
81 </conditional>
82
83 <param name="remove_comment_lines" type="boolean" label="Automatically remove 'comment' lines starting with a '#'" truevale="true" falsevalue="false" selected="true" help="Some tools (incl. featureCounts) include comment lines that are not neccesairy for downstream analyis. By enabling this function, these lines will be removed." />
84
85 </inputs>
86
87 <outputs>
88 <data format="tabular" name="expression_matrix" label="Expression matrix" />
89 </outputs>
90
91 <tests>
92 <test>
93 <conditional name="add_geneids">
94 <param name="choice" value="true" />
95 <param name="sample_geneids" value="GSE51403/GSE51403_expression_matrix_GeneLengths.txt" />
96 <param name="column_geneids" value="1" />
97 </conditional>
98
99 <param name="samples_0|sample" value="GSE51403/GSE51403_expression_matrix_Control_1.txt" />
100 <param name="samples_0|column_index" value="2" />
101
102 <conditional name="add_lengths">
103 <param name="choice" value="false" />
104 </conditional>
105
106 <param name="remove_comment_lines" value="false" />
107
108 <output name="expression_matrix" file="GSE51403/GSE51403_expression_matrix_Control_1.txt" />
109 </test>
110 <test>
111 <conditional name="add_geneids">
112 <param name="choice" value="true" />
113 <param name="sample_geneids" value="GSE51403/GSE51403_expression_matrix_GeneLengths.txt" />
114 <param name="column_geneids" value="1" />
115 </conditional>
116
117 <!-- <repeat name="samples"> -->
118 <param name="samples_0|sample" value="GSE51403/GSE51403_expression_matrix_Control_1.txt" />
119 <param name="samples_0|column_index" value="2" />
120 <!-- </repeat> -->
121
122 <!-- <repeat name="samples"> -->
123 <param name="samples_1|sample" value="GSE51403/GSE51403_expression_matrix_Control_2.txt" />
124 <param name="samples_1|column_index" value="2" />
125 <!-- </repeat> -->
126
127 <!-- <repeat name="samples"> -->
128 <param name="samples_2|sample" value="GSE51403/GSE51403_expression_matrix_Control_3.txt" />
129 <param name="samples_2|column_index" value="2" />
130 <!-- </repeat> -->
131
132 <!-- <repeat name="samples"> -->
133 <param name="samples_3|sample" value="GSE51403/GSE51403_expression_matrix_Control_4.txt" />
134 <param name="samples_3|column_index" value="2" />
135 <!-- </repeat> -->
136
137 <!-- <repeat name="samples"> -->
138 <param name="samples_4|sample" value="GSE51403/GSE51403_expression_matrix_Control_5.txt" />
139 <param name="samples_4|column_index" value="2" />
140 <!-- </repeat> -->
141
142 <!-- <repeat name="samples"> -->
143 <param name="samples_5|sample" value="GSE51403/GSE51403_expression_matrix_Control_6.txt" />
144 <param name="samples_5|column_index" value="2" />
145 <!-- </repeat> -->
146
147 <!-- <repeat name="samples"> -->
148 <param name="samples_6|sample" value="GSE51403/GSE51403_expression_matrix_Control_7.txt" />
149 <param name="samples_6|column_index" value="2" />
150 <!-- </repeat> -->
151
152 <!-- <repeat name="samples"> -->
153 <param name="samples_7|sample" value="GSE51403/GSE51403_expression_matrix_E2.txt" />
154 <param name="samples_7|column_index" value="2,3,4,5,6,7,8" />
155 <!-- </repeat> -->
156
157 <conditional name="add_lengths">
158 <param name="choice" value="true" />
159 <param name="sample_lengths" value="GSE51403/GSE51403_expression_matrix_GeneLengths.txt" />
160 <param name="column_lengths" value="2" />
161 </conditional>
162
163 <param name="remove_comment_lines" value="false" />
164
165 <output name="expression_matrix" file="GSE51403/GSE51403_expression_matrix_full.txt" />
166 </test>
167 </tests>
168
169 <help>
170 edgeR: Concatenate Expression Matrices
171 #######################################
172
173 Overview
174 --------
175
176 Create subsets from or combined expression matrices.
177
178 **Notes**
179
180 Make sure the tables have an identical number of columns compared to the number of headers.
181 If you export tables using R, make sure you set: col.names=NA. Otherwise column may be swapped during concatenation.
182
183 Input
184 -----
185
186 @CONTACT@
187 </help>
188
189 <expand macro="citations" />
190 </tool>