comparison ruvseq.xml @ 0:61dffb20b6f9 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ruvseq commit b95582cea8320d5488056a9576474f79cec53be8
author iuc
date Wed, 05 Sep 2018 15:54:16 -0400
parents
children c24765926774
comparison
equal deleted inserted replaced
-1:000000000000 0:61dffb20b6f9
1 <tool id="ruvseq" name="Remove Unwanted Variation" version="1.12.0">
2 <description>from RNA-seq data</description>
3 <requirements>
4 <requirement type="package" version="1.12.0">bioconductor-ruvseq</requirement>
5 <requirement type="package" version="1.18.1">bioconductor-deseq2</requirement>
6 <requirement type="package" version="1.6.0">bioconductor-tximport</requirement>
7 <requirement type="package" version="1.30.0">bioconductor-genomicfeatures</requirement>
8 <requirement type="package" version="0.6.5">r-ggrepel</requirement>
9 </requirements>
10 <stdio>
11 <regex match="Execution halted"
12 source="both"
13 level="fatal"
14 description="Execution halted." />
15 <regex match="Error in"
16 source="both"
17 level="fatal"
18 description="An undefined error occurred, please check your input carefully and contact your administrator." />
19 <regex match="Fatal error"
20 source="both"
21 level="fatal"
22 description="An undefined error occurred, please check your input carefully and contact your administrator." />
23 </stdio>
24 <version_command><![CDATA[
25 echo $(R --version | grep version | grep -v GNU)", RUVSeq version" $(R --vanilla --slave -e "library(RUVSeq); cat(sessionInfo()\$otherPkgs\$RUVSeq\$Version)" 2> /dev/null | grep -v -i "WARNING: ")
26 ]]></version_command>
27 <command><![CDATA[
28 #if $tximport.tximport_selector == 'tximport':
29 #if $tximport.mapping_format.mapping_format_selector == 'gtf':
30 ln -s '$tximport.mapping_format.gtf_file' mapping.gtf &&
31 #else:
32 ln -s '$tximport.mapping_format.tabular_file' mapping.txt &&
33 #end if
34 #end if
35
36 Rscript '${__tool_directory__}/ruvseq.R'
37 #if $pdf:
38 -p '$plots'
39 #end if
40
41 --sample_json '$sampleTable'
42
43 $header
44
45 --min_k $min_k
46 --max_k $max_k
47
48 #if $tximport.tximport_selector == 'tximport':
49 --txtype $tximport.txtype
50 #if $tximport.mapping_format.mapping_format_selector == 'gtf':
51 --tx2gene mapping.gtf
52 #else:
53 --tx2gene mapping.txt
54 #end if
55 #end if
56 ]]></command>
57 <configfiles>
58 <configfile name="sampleTable">
59 #import json
60 #set sample_table = []
61 #for $level in $rep_factorLevel:
62 #for $file in $level.countsFile:
63 #silent $sample_table.append({"path": str($file), "label": str($file.element_identifier), "condition": str($level.factorLevel)})
64 #end for
65 #end for
66 #echo json.dumps($sample_table)
67 </configfile>
68 </configfiles>
69 <inputs>
70 <repeat name="rep_factorLevel" title="Factor level" min="2" default="2">
71 <param name="factorLevel" type="text" value="FactorLevel" label="Specify a factor level, typical values could be 'tumor', 'normal', 'treated' or 'control'"
72 help="Only letters, numbers and underscores will be retained in this field">
73 <sanitizer>
74 <valid initial="string.letters,string.digits"><add value="_" /></valid>
75 </sanitizer>
76 </param>
77 <param name="countsFile" type="data" format="tabular" multiple="true" label="Counts file(s)"/>
78 </repeat>
79 <param name="min_k" type="integer" value="1" min="1" label="Try to find at least this many factors of unwanted variation" />
80 <param name="max_k" type="integer" value="1" min="1" label="Try to find at most this many factors of unwanted variation" />
81 <param name="min_mean_count" type="integer" value="5" min="0" label="Ignore genes with fewer than this many counts on average" />
82 <param name="header" type="boolean" truevalue="-H" falsevalue="" checked="true" label="Files have header?" help="If this option is set to Yes, the tool will assume that the count files have column headers in the first row. Default: Yes" />
83
84 <conditional name="tximport">
85 <param name="tximport_selector" type="select" label="Choice of Input data">
86 <option value="count" selected="True">Count data (e.g. from HTSeq-count, featureCounts or StringTie)</option>
87 <option value="tximport">TPM values (e.g. from kallisto, sailfish or salmon)</option>
88 </param>
89 <when value="tximport">
90 <param name="txtype" type="select" label="Program used to generate TPMs">
91 <option value="kallisto">kallisto</option>
92 <option value="sailfish">Sailfish</option>
93 <option value="salmon">Salmon</option>
94 </param>
95 <conditional name="mapping_format">
96 <param name="mapping_format_selector" type="select" label="Gene mapping format">
97 <option value="gtf" selected="True">GTF</option>
98 <option value="tabular">Transcript-ID and Gene-ID mapping file</option>
99 </param>
100 <when value="gtf">
101 <param name="gtf_file" type="data" format="gtf,gff3" label="GTF/GFF3 file with Transcript - Gene mapping"/>
102 </when>
103 <when value="tabular">
104 <param name="tabular_file" type="data" format="tabular" label="Tabular file with Transcript - Gene mapping"/>
105 </when>
106 </conditional>
107 </when>
108 <when value="count" />
109 </conditional>
110 <param name="pdf" type="boolean" truevalue="1" falsevalue="0" checked="true"
111 label="Visualising the analysis results"
112 help="output an additional PDF files" />
113 </inputs>
114 <outputs>
115 <collection name="unwanted_variation" type="list" label="RUVSeq covariate files on ${on_string}">
116 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.tabular" format="tabular" directory="." visible="false"/>
117 </collection>
118 <data format="pdf" name="plots" label="RUVSeq diagonstic plots on ${on_string}">
119 <filter>pdf == True</filter>
120 </data>
121 </outputs>
122 <tests>
123 <!--Ensure counts files with header works -->
124 <test>
125 <repeat name="rep_factorLevel">
126 <param name="factorLevel" value="Treated"/>
127 <param name="countsFile" value="GSM461179_treat_single.counts,GSM461180_treat_paired.counts,GSM461181_treat_paired.counts"/>
128 </repeat>
129 <repeat name="rep_factorLevel">
130 <param name="factorLevel" value="Untreated"/>
131 <param name="countsFile" value="GSM461176_untreat_single.counts,GSM461177_untreat_paired.counts,GSM461178_untreat_paired.counts,GSM461182_untreat_single.counts"/>
132 </repeat>
133 <param name="pdf" value="true"/>
134 <output name="plots" file="ruvseq_diag.pdf" ftype="pdf" compare="sim_size"/>
135 <output_collection name="unwanted_variation" type="list">
136 <element name="batch_effects_control_method_k1">
137 <assert_contents>
138 <has_text_matching expression="identifier\tcondition\tW_1"/>
139 <has_text_matching expression="GSM461179.*\tTreated\t-0.49.*"/>
140 </assert_contents>
141 </element>
142 <element name="batch_effects_replicate_method_k1">
143 <assert_contents>
144 <has_text_matching expression="identifier\tcondition\tW_1"/>
145 <has_text_matching expression="GSM461179.*\tTreated\t-0.25.*"/>
146 </assert_contents>
147 </element>
148 <element name="batch_effects_residual_method_k1">
149 <assert_contents>
150 <has_text_matching expression="identifier\tcondition\tW_1"/>
151 <has_text_matching expression="GSM461179.*\tTreated\t-0.60.*"/>
152 </assert_contents>
153 </element>
154 </output_collection>
155 </test>
156 <!--Ensure counts files without header works -->
157 <test>
158 <repeat name="rep_factorLevel">
159 <param name="factorLevel" value="Treated"/>
160 <param name="countsFile" value="GSM461179_treat_single.counts.noheader,GSM461180_treat_paired.counts.noheader,GSM461181_treat_paired.counts.noheader"/>
161 </repeat>
162 <repeat name="rep_factorLevel">
163 <param name="factorLevel" value="Untreated"/>
164 <param name="countsFile" value="GSM461176_untreat_single.counts.noheader,GSM461177_untreat_paired.counts.noheader,GSM461178_untreat_paired.counts.noheader,GSM461182_untreat_single.counts.noheader"/>
165 </repeat>
166 <param name="pdf" value="true"/>
167 <param name="header" value="false"/>
168 <output name="plots" file="ruvseq_diag.pdf" ftype="pdf" compare="sim_size"/>
169 <output_collection name="unwanted_variation" type="list">
170 <element name="batch_effects_control_method_k1">
171 <assert_contents>
172 <has_text_matching expression="identifier\tcondition\tW_1"/>
173 <has_text_matching expression="GSM461179.*\tTreated\t-0.49.*"/>
174 </assert_contents>
175 </element>
176 <element name="batch_effects_replicate_method_k1">
177 <assert_contents>
178 <has_text_matching expression="identifier\tcondition\tW_1"/>
179 <has_text_matching expression="GSM461179.*\tTreated\t-0.25.*"/>
180 </assert_contents>
181 </element>
182 <element name="batch_effects_residual_method_k1">
183 <assert_contents>
184 <has_text_matching expression="identifier\tcondition\tW_1"/>
185 <has_text_matching expression="GSM461179.*\tTreated\t-0.60.*"/>
186 </assert_contents>
187 </element>
188 </output_collection>
189 </test>
190 <!--Ensure sailfish files work -->
191 <test>
192 <repeat name="rep_factorLevel">
193 <param name="factorLevel" value="Treated"/>
194 <param name="countsFile" value="sailfish/sailfish_quant.sf1.tab,sailfish/sailfish_quant.sf2.tab,sailfish/sailfish_quant.sf3.tab"/>
195 </repeat>
196 <repeat name="rep_factorLevel">
197 <param name="factorLevel" value="Untreated"/>
198 <param name="countsFile" value="sailfish/sailfish_quant.sf4.tab,sailfish/sailfish_quant.sf5.tab,sailfish/sailfish_quant.sf6.tab"/>
199 </repeat>
200 <param name="pdf" value="true"/>
201 <param name="tximport_selector" value="tximport"/>
202 <param name="txtype" value="sailfish"/>
203 <param name="mapping_format_selector" value="tabular"/>
204 <param name="tabular_file" value="tx2gene.tab"/>
205 <output name="plots" file="ruvseq_diag_sailfish.pdf" ftype="pdf" compare="sim_size"/>
206 <output_collection name="unwanted_variation" type="list">
207 <element name="batch_effects_control_method_k1">
208 <assert_contents>
209 <has_text_matching expression="identifier\tcondition\tW_1"/>
210 <has_text_matching expression="sailfish_quant.sf1.tab\tTreated\t-0.28.*"/>
211 </assert_contents>
212 </element>
213 <element name="batch_effects_replicate_method_k1">
214 <assert_contents>
215 <has_text_matching expression="identifier\tcondition\tW_1"/>
216 <has_text_matching expression="sailfish_quant.sf1.tab\tTreated\t-0.44.*"/>
217 </assert_contents>
218 </element>
219 <element name="batch_effects_residual_method_k1">
220 <assert_contents>
221 <has_text_matching expression="identifier\tcondition\tW_1"/>
222 <has_text_matching expression="sailfish_quant.sf1.tab\tTreated\t-0.22.*"/>
223 </assert_contents>
224 </element>
225 </output_collection>
226 </test>
227 </tests>
228 <help><![CDATA[
229 .. class:: infomark
230
231 **What it does**
232
233 RUVSeq normalizes RNA-seq data using factor analysis of control genes or samples. RUVSeq has been designed for detecting unwanted variation using replicate sample information. The current RUVSeq Galaxy tool only implements estimating unwanted variation for primary factors.
234 RUVSeq implements 3 different methods for the estimation of unwanted variation:
235
236 RUVg estimates the factors of unwanted variation using control genes
237
238 RUVs estimates the factors of unwanted variation using replicate samples
239
240 RUVr estimating the factors of unwanted variation using residuals.
241
242 This tool runs all RUV methods and outputs diagnostic plots and tables with covariates that
243 may be used for differential expression analsys.
244
245 -----
246
247 **Inputs**
248
249 **Count Files**
250
251 RUVSeq_ takes count tables generated from **featureCounts**, **HTSeq-count** or **StringTie** as input. Count tables must be generated for each sample individually. One header row is assumed, but files with no header (e.g from HTSeq) can be input with the *Files have header?* option set to No.
252
253 RUVSeq_ can also take transcript-level counts from quantification tools such as, **kallisto**, **Salmon** and **Sailfish**, and this Galaxy wrapper incorporates the Bioconductor tximport_ package to process the transcript counts for DESeq2.
254
255 **Salmon or Sailfish Files**
256
257 Salmon or Sailfish ``quant.sf`` files can be imported by setting type to *Salmon* or *Sailfish* respectively above. Note: for previous version of Salmon or Sailfish, in which the quant.sf files start with comment lines you will need to remove the comment lines before inputting here. An example of the format is shown below.
258
259 Example:
260
261 ============ ========== =============== =========== ===========
262 Name Length EffectiveLength TPM NumReads
263 ------------ ---------- --------------- ----------- -----------
264 NR_001526 164 20.4518 0 0
265 NR_001526_1 164 20.4518 0 0
266 NR_001526_2 164 20.4518 0 0
267 NM_130786 1764 1956.04 2.47415 109.165
268 NR_015380 2129 2139.53 1.77331 85.5821
269 NM_001198818 9360 7796.58 2.38616e-07 4.19648e-05
270 NM_001198819 9527 7964.62 0 0
271 NM_001198820 9410 7855.78 0 0
272 NM_014576 9267 7714.88 0.0481114 8.37255
273 ============ ========== =============== =========== ===========
274
275 **kallisto Files**
276
277 kallisto ``abundance.tsv`` files can be imported by setting type to *kallisto* above. An example of the format is shown below.
278
279 Example:
280
281 ============ ========== =============== =========== ===========
282 target_id length eff_length est_counts tpm
283 ------------ ---------- --------------- ----------- -----------
284 NR_001526 164 20.4518 0 0
285 NR_001526_1 164 20.4518 0 0
286 NR_001526_2 164 20.4518 0 0
287 NM_130786 1764 1956.04 109.165 2.47415
288 NR_015380 2129 2139.53 85.5821 1.77331
289 NM_001198818 9360 7796.58 4.19648e-05 2.38616e-07
290 NM_001198819 9527 7964.62 0 0
291 NM_001198820 9410 7855.78 0 0
292 NM_014576 9267 7714.88 8.37255 0.0481114
293 ============ ========== =============== =========== ===========
294
295 -----
296
297 **Output**
298
299 RUVSeq_ generates a tabular file for each method and each k of variation as well as a summary PDF.
300
301 .. _RUVSeq: http://master.bioconductor.org/packages/release/bioc/html/RUVSeq.html
302 .. _tximport: https://bioconductor.org/packages/devel/bioc/vignettes/tximport/inst/doc/tximport.html
303 ]]></help>
304 <citations>
305 <citation type="doi">10.1038/nbt.2931</citation>
306 </citations>
307 </tool>