comparison computeMatrix.xml @ 0:f1db8b6a8743 draft

planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit e1fd513c18e0d5b53071d99f539ac3509ced01aa-dirty
author bgruening
date Wed, 16 Dec 2015 16:42:28 -0500
parents
children de51aa03c9b9
comparison
equal deleted inserted replaced
-1:000000000000 0:f1db8b6a8743
1 <tool id="deeptools_compute_matrix" name="computeMatrix" version="@WRAPPER_VERSION@.0">
2 <description>preparation step to plot a heatmap or a profile</description>
3 <macros>
4 <token name="@BINARY@">computeMatrix</token>
5 <import>deepTools_macros.xml</import>
6 </macros>
7 <expand macro="requirements" />
8 <command>
9 <![CDATA[
10 #import tempfile
11
12 #for $rf in $regionsFiles:
13 cat "$rf.regionsFile" >> ./temp_input_path;
14 #if str($rf.label.value).strip():
15 echo "\#$rf.label.value" >> ./temp_input_path;
16 #else:
17 echo "\#$rf.regionsFile.name" >> ./temp_input_path;
18 #end if
19 #end for
20
21 @BINARY@
22
23 $mode.mode_select
24 --regionsFileName ./temp_input_path
25 --scoreFileName '$scoreFile'
26 --outFileName '$outFileName'
27
28 @THREADS@
29
30 #if $output.showOutputSettings == "yes"
31 #if $output.saveData:
32 --outFileNameData '$outFileNameData'
33 #end if
34 #if $output.saveMatrix:
35 --outFileNameMatrix '$outFileNameMatrix'
36 #end if
37
38 #if $output.saveSortedRegions:
39 --outFileSortedRegions '$outFileSortedRegions'
40 #end if
41 #end if
42
43 #if $mode.mode_select == "reference-point":
44 --referencePoint $mode.referencePoint
45 $mode.nanAfterEnd
46 --beforeRegionStartLength $mode.beforeRegionStartLength
47 --afterRegionStartLength $mode.afterRegionStartLength
48 #else
49 --regionBodyLength $mode.regionBodyLength
50 --startLabel "$mode.startLabel"
51 --endLabel "$mode.endLabel"
52 #if $mode.regionStartLength.regionStartLength_select == "yes":
53 --beforeRegionStartLength $mode.regionStartLength.beforeRegionStartLength
54 --afterRegionStartLength $mode.regionStartLength.afterRegionStartLength
55 #end if
56 #end if
57
58 #if $advancedOpt.showAdvancedOpt == "yes":
59 --sortRegions '$advancedOpt.sortRegions'
60 --sortUsing '$advancedOpt.sortUsing'
61 --averageTypeBins '$advancedOpt.averageTypeBins'
62 $advancedOpt.keepNAs
63 $advancedOpt.skipZeros
64 --binSize $advancedOpt.binSize
65
66 #if $advancedOpt.minThreshold is not None and str($advancedOpt.minThreshold) != '':
67 --minThreshold $advancedOpt.minThreshold
68 #end if
69 #if $advancedOpt.maxThreshold is not None and str($advancedOpt.maxThreshold) != '':
70 --maxThreshold $advancedOpt.maxThreshold
71 #end if
72 #if $advancedOpt.scale is not None and str($advancedOpt.scale) != '':
73 --scale $advancedOpt.scale
74 #end if
75
76 #end if
77 ]]>
78 </command>
79 <inputs>
80
81 <repeat name="regionsFiles" title="regions to plot" min="1">
82 <param name="regionsFile" format="bed" type="data" label="Regions to plot"
83 help="File, in BED format, containing the regions to plot."/>
84 <param name="label" type="text" size="30" optional="true" value="" label="Label"
85 help="Label to use in the output."/>
86 </repeat>
87
88 <param name="scoreFile" format="bigwig" type="data"
89 label="Score file"
90 help="Should be a bigWig file (containing a score, usually covering
91 the whole genome). You can generate a bigWig file either from a
92 bedGraph or WIG file using UCSC tools or from a BAM file using the
93 deepTool bamCoverage. (-scoreFile)"/>
94
95 <conditional name="mode" >
96 <param name="mode_select" type="select"
97 label="computeMatrix has two main output options"
98 help="In the scale-regions mode, all regions in the BED file are
99 stretched or shrunk to the same length (bp) that is indicated
100 by the user. Reference-point refers to a position within the BED
101 regions (e.g start of region). In the reference-point mode only
102 those genomic positions before (downstream) and/or after (upstream)
103 the reference point will be plotted.">
104 <option value="scale-regions" selected="true">scale-regions</option>
105 <option value="reference-point">reference-point</option>
106 </param>
107
108 <when value="scale-regions" >
109 <param argument="--regionBodyLength" type="integer" value="500"
110 label="Distance in bp to which all regions are going to be fitted" help=""/>
111 <param argument="--startLabel" type="text" value="TSS" size="10"
112 label="Label for the region start"
113 help ="Label shown in the plot for the start of the region.
114 Default is TSS (transcription start site), but could be changed to anything,
115 e.g. &quot;peak start&quot;." />
116 <param argument="--endLabel" type="text" value="TES" size="10"
117 label="Label for the region end"
118 help="Label shown in the plot for the region end. Default is TES (transcription end site)."/>
119 <conditional name="regionStartLength">
120 <param name="regionStartLength_select" type="select" label="Set distance up- and downstream of the given regions">
121 <option value="no" selected="true">no</option>
122 <option value="yes">yes</option>
123 </param>
124 <when value="no" />
125 <when value="yes">
126 <param argument="--beforeRegionStartLength" type="integer" value="1000" min="1"
127 label="Distance upstream of the start site of the regions defined in the region file"
128 help="If the regions are genes, this would be the
129 distance upstream of the transcription start site."/>
130 <param argument="--afterRegionStartLength" type="integer" value="1000" min="1"
131 label="Distance downstream of the end site of the given regions"
132 help="If the regions are genes, this would be the
133 distance downstream of the transcription end site."/>
134 </when>
135 </conditional>
136 </when>
137 <when value="reference-point">
138 <param name="referencePoint" type="select" label="The reference point for the plotting">
139 <option value="TSS" selected="true">beginning of region (e.g. TSS)</option>
140 <option value="TES">end of region (e.g. TES)</option>
141 <option value="center">center of region</option>
142 </param>
143 <param name="nanAfterEnd" type="boolean" truevalue="--nanAfterEnd" falsevalue=""
144 label="Discard any values after the region end"
145 help="This is useful to visualize the region end when not using the
146 scale-regions mode and when the reference-point is set to the TSS. (--nanAfterEnd)"/>
147 <param name="beforeRegionStartLength" type="integer" value="1000" min="1"
148 label="Distance upstream of the start site of the regions defined in the region file"
149 help="If the regions are genes, this would be the distance upstream of the transcription start site. (--beforeRegionStartLength)"/>
150 <param name="afterRegionStartLength" type="integer" value="1000" min="1"
151 label="Distance downstream of the end site of the given regions"
152 help="If the regions are genes, this would be the distance downstream of the transcription end site. (--afterRegionStartLength)"/>
153 </when>
154 </conditional>
155
156 <expand macro="input_graphic_output_settings">
157 <expand macro="input_save_matrix_values" />
158 </expand>
159
160 <conditional name="advancedOpt" >
161 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
162 <option value="no" selected="true">no</option>
163 <option value="yes">yes</option>
164 </param>
165 <when value="no" />
166 <when value="yes">
167 <param name="binSize" type="integer" value="50" min="1"
168 label="Length, in base pairs, of the non-overlapping bin for averaging the score over the regions length"
169 help="(--binSize)"/>
170
171 <expand macro="sortRegions" />
172 <expand macro="sortUsing" />
173
174 <param name="averageTypeBins" type="select"
175 label="Define the type of statistic that should be displayed."
176 help="The value is computed for each bin. (--averageTypeBins)">
177 <option value="mean" selected="true">mean</option>
178 <option value="median">median</option>
179 <option value="min">min</option>
180 <option value="max">max</option>
181 <option value="sum">sum</option>
182 <option value="std">std</option>
183 </param>
184
185 <expand macro="keepNAs" />
186 <expand macro="skipZeros" />
187
188 <param name="minThreshold" type="float" optional="True"
189 label="Minimum threshold"
190 help="Any region containing a value that is equal or less than this numeric
191 value will be skipped. This is useful to skip, for example, genes where the
192 read count is zero for any of the bins. This could be the result of
193 unmappable areas and can bias the overall results. (--minThreshold)"/>
194 <param name="maxThreshold" type="float" optional="True"
195 label="Maximum threshold"
196 help="Any region containing a value that is equal or higher that this
197 numeric value will be skipped. The max threshold is useful to skip those
198 few regions with very high read counts (e.g. major satellites) that may
199 bias the average values. (--maxThreshold)"/>
200 <param name="scale" type="float" optional="True" label="Scaling factor"
201 help="If set, all values are multiplied by this number. (--scale)"/>
202 </when>
203 </conditional>
204 </inputs>
205 <outputs>
206 <data format="deeptools_compute_matrix_archive" name="outFileName" label="${tool.name} on ${on_string}: Matrix" />
207 <expand macro="output_graphic_outputs" />
208 <expand macro="output_save_matrix_values" />
209 </outputs>
210 <!--
211 computeMatrix -S test.bw -R test2.bed -a 100 -b 100 -bs 1
212 -->
213 <tests>
214 <test>
215 <param name="regionsFile" value="computeMatrix1.bed" ftype="bed" />
216 <param name="scoreFile" value="bamCoverage_result4.bw" ftype="bigwig" />
217 <param name="showAdvancedOpt" value="yes" />
218 <param name="mode_select" value="reference-point" />
219 <param name="binSize" value="10" />
220 <param name="sortUsing" value="sum" />
221 <param name="averageTypeBins" value="sum" />
222 <param name="keepNAs" value="True" />
223 <param name="beforeRegionStartLength" value="10" />
224 <param name="afterRegionStartLength" value="10" />
225 <output name="outFileName" file="computeMatrix_result1.gz" ftype="deeptools_compute_matrix_archive" compare="sim_size" />
226 </test>
227 <test>
228 <param name="regionsFile" value="computeMatrix2.bed" ftype="bed" />
229 <param name="scoreFile" value="computeMatrix2.bw" ftype="bigwig" />
230 <param name="showAdvancedOpt" value="yes" />
231 <param name="mode_select" value="reference-point" />
232 <param name="binSize" value="10" />
233 <param name="beforeRegionStartLength" value="10" />
234 <param name="afterRegionStartLength" value="10" />
235 <output name="outFileName" file="computeMatrix_result2.gz" ftype="deeptools_compute_matrix_archive" compare="sim_size" />
236 </test>
237 <test>
238 <param name="regionsFile" value="computeMatrix2.bed" ftype="bed" />
239 <param name="scoreFile" value="computeMatrix2.bw" ftype="bigwig" />
240 <param name="showAdvancedOpt" value="yes" />
241 <param name="mode_select" value="scale-regions" />
242 <param name="endLabel" value="END" />
243 <param name="regionStartLength" value="yes" />
244 <output name="outFileName" file="computeMatrix_result3.gz" ftype="deeptools_compute_matrix_archive" compare="sim_size" />
245 </test>
246 </tests>
247 <help>
248 <![CDATA[
249 **What it does**
250
251 This tool prepares an intermediary file (a gzipped table of values)
252 that contains scores associated with genomic regions that can be used
253 afterwards to plot a heatmap or a profile.
254
255 Genomic regions can really be anything - genes, parts of genes, ChIP-seq
256 peaks, favorite genome regions... as long as you provide a proper file
257 in BED or INTERVAL format. If you would like to compare different groups of regions
258 (i.e. genes from chromosome 2 and 3), you can supply more than 1 BED file, one for each group.
259
260 computeMatrix can also be used to filter and sort
261 regions according to their score by making use of its advanced output options.
262
263
264 .. image:: $PATH_TO_IMAGES/flowChart_computeMatrixetc.png
265 :alt: Relationship between computeMatrix, heatmapper and profiler
266
267
268 You can find more details on the computeMatrix wiki page: https://github.com/fidelram/deepTools/wiki/Visualizations#wiki-computeMatrix
269
270
271 -----
272
273 @REFERENCES@
274 ]]>
275 </help>
276 <expand macro="citations" />
277 </tool>