comparison ruvseq.xml.orig @ 4:6d7a31ff056f draft

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