comparison edgeR_Concatenate_Expression_Matrices.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="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 <command>
6 #set $j = 0
7 #set $paste = []
8
9 #if $add_geneids.choice == "true":
10 #set $filename = str($j)+".txt"
11 #set paste = paste + [$filename]
12
13 cut -f $add_geneids.column_geneids.value "$add_geneids.sample_geneids" > $filename ;
14 #set $j += 1
15 #end if
16
17 #for $sample in $samples:
18 ##echo "$sample.column_index"
19 ##echo "$sample.column_index.value"
20
21 #set $column_str = ",".join([str(x).strip() for x in $sample.column_index.value])
22 #set $filename = str($j)+".txt"
23 #set paste = paste + [$filename]
24
25 cut -f "$column_str" "$sample.sample" > $filename ;
26 #set $j += 1
27 #end for
28
29 #if $add_lengths.choice == "true":
30 #set $filename = str($j)+".txt"
31 #set paste = paste + [$filename]
32
33 cut -f $add_lengths.column_lengths.value "$add_lengths.sample_lengths" > $filename ;
34 #set $j += 1
35 #end if
36
37 #set $paste_str = " ".join([str(x).strip() for x in $paste])
38
39 paste $paste_str > $expression_matrix
40 </command>
41
42 <inputs>
43 <conditional name="add_geneids">
44 <param name="choice" type="select" label="Add a gene-IDs column at the end of the file" help="Highly recommended to select!" >
45 <option value="false">No</option>
46 <option value="true" selected="true">Yes</option>
47 </param>
48 <when value="false" />
49 <when value="true">
50 <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." />
51 <param name="column_geneids" numerical="false" use_header_names="true" label="Select GeneID column" type="data_column" data_ref="sample_geneids" multiple="false">
52 <validator type="no_options" message="Please select at least one column." />
53 </param>
54 </when>
55 </conditional>
56
57 <repeat name="samples" title="Expression Table" help="E.g. a earlier concatenated table, or a HT-seq, featureCounts or DESeq-count result.">
58 <param name="sample" type="data" format="tabular" label="Read-count dataset that belongs to a pair" help="from featureCounts/DEXSeq-count/HTSeq-count, etc." />
59 <!-- select columns -->
60 <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">
61 <validator type="no_options" message="Please select at least one column." />
62 </param>
63 </repeat>
64
65 <conditional name="add_lengths">
66 <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." >
67 <option value="false">No</option>
68 <option value="true">Yes</option>
69 </param>
70 <when value="false" />
71 <when value="true">
72 <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." />
73 <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">
74 <validator type="no_options" message="Please select at least one column." />
75 </param>
76 </when>
77 </conditional>
78
79 <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." />
80
81 </inputs>
82
83 <outputs>
84 <data format="tabular" name="expression_matrix" label="Expression matrix" />
85 </outputs>
86
87 <tests>
88 <test>
89 <conditional name="add_geneids">
90 <param name="choice" value="true" />
91 <param name="sample_geneids" value="GSE51403/GSE51403_expression_matrix_GeneLengths.txt" />
92 <param name="column_geneids" value="1" />
93 </conditional>
94
95 <param name="samples_0|sample" value="GSE51403/GSE51403_expression_matrix_Control_1.txt" />
96 <param name="samples_0|column_index" value="2" />
97
98 <conditional name="add_lengths">
99 <param name="choice" value="false" />
100 </conditional>
101
102 <param name="remove_comment_lines" value="false" />
103
104 <output name="expression_matrix" file="GSE51403/GSE51403_expression_matrix_Control_1.txt" />
105 </test>
106 <test>
107 <conditional name="add_geneids">
108 <param name="choice" value="true" />
109 <param name="sample_geneids" value="GSE51403/GSE51403_expression_matrix_GeneLengths.txt" />
110 <param name="column_geneids" value="1" />
111 </conditional>
112
113 <!-- <repeat name="samples"> -->
114 <param name="samples_0|sample" value="GSE51403/GSE51403_expression_matrix_Control_1.txt" />
115 <param name="samples_0|column_index" value="2" />
116 <!-- </repeat> -->
117
118 <!-- <repeat name="samples"> -->
119 <param name="samples_1|sample" value="GSE51403/GSE51403_expression_matrix_Control_2.txt" />
120 <param name="samples_1|column_index" value="2" />
121 <!-- </repeat> -->
122
123 <!-- <repeat name="samples"> -->
124 <param name="samples_2|sample" value="GSE51403/GSE51403_expression_matrix_Control_3.txt" />
125 <param name="samples_2|column_index" value="2" />
126 <!-- </repeat> -->
127
128 <!-- <repeat name="samples"> -->
129 <param name="samples_3|sample" value="GSE51403/GSE51403_expression_matrix_Control_4.txt" />
130 <param name="samples_3|column_index" value="2" />
131 <!-- </repeat> -->
132
133 <!-- <repeat name="samples"> -->
134 <param name="samples_4|sample" value="GSE51403/GSE51403_expression_matrix_Control_5.txt" />
135 <param name="samples_4|column_index" value="2" />
136 <!-- </repeat> -->
137
138 <!-- <repeat name="samples"> -->
139 <param name="samples_5|sample" value="GSE51403/GSE51403_expression_matrix_Control_6.txt" />
140 <param name="samples_5|column_index" value="2" />
141 <!-- </repeat> -->
142
143 <!-- <repeat name="samples"> -->
144 <param name="samples_6|sample" value="GSE51403/GSE51403_expression_matrix_Control_7.txt" />
145 <param name="samples_6|column_index" value="2" />
146 <!-- </repeat> -->
147
148 <!-- <repeat name="samples"> -->
149 <param name="samples_7|sample" value="GSE51403/GSE51403_expression_matrix_E2.txt" />
150 <param name="samples_7|column_index" value="2,3,4,5,6,7,8" />
151 <!-- </repeat> -->
152
153 <conditional name="add_lengths">
154 <param name="choice" value="true" />
155 <param name="sample_lengths" value="GSE51403/GSE51403_expression_matrix_GeneLengths.txt" />
156 <param name="column_lengths" value="2" />
157 </conditional>
158
159 <param name="remove_comment_lines" value="false" />
160
161 <output name="expression_matrix" file="GSE51403/GSE51403_expression_matrix_full.txt" />
162 </test>
163 </tests>
164
165 <help>
166 edgeR: Concatenate Expression Matrices
167 #######################################
168
169 Overview
170 --------
171
172 Create subsets from or combined expression matrices.
173
174 **Notes**
175
176 Make sure the tables have an identical number of columns compared to the number of headers.
177 If you export tables using R, make sure you set: col.names=NA. Otherwise column may be swapped during concatenation.
178
179 Input
180 -----
181
182
183 Contact
184 -------
185
186 The tool wrapper has been written by Youri Hoogstrate from the Erasmus
187 Medical Center (Rotterdam, Netherlands) on behalf of the Translational
188 Research IT (TraIT) project:
189
190 http://www.ctmm.nl/en/programmas/infrastructuren/traitprojecttranslationeleresearch
191
192 More tools by the Translational Research IT (TraIT) project can be found
193 in the following toolsheds:
194
195 http://toolshed.dtls.nl/
196
197 http://toolshed.g2.bx.psu.edu
198
199 http://testtoolshed.g2.bx.psu.edu/
200 </help>
201
202 <citations>
203 <citation type="doi">10.1093/bioinformatics/btp616</citation>
204 <citation type="doi">10.1093/bioinformatics/btt688</citation>
205 </citations>
206 </tool>