10
|
1 <tool id="deeptools_computeMatrix" name="computeMatrix" version="1.0.2">
|
0
|
2 <description>summarizes and prepares an intermediary file containing scores associated with genomic regions that can be used afterwards to plot a heatmap or a profile</description>
|
|
3 <expand macro="requirements" />
|
10
|
4 <expand macro="stdio" />
|
0
|
5 <macros>
|
|
6 <import>deepTools_macros.xml</import>
|
|
7 </macros>
|
|
8 <command>
|
|
9 #import tempfile
|
|
10
|
|
11 #set $temp_input_handle = tempfile.NamedTemporaryFile()
|
|
12 #set $temp_input_path = $temp_input_handle.name
|
|
13 #silent $temp_input_handle.close()
|
|
14
|
|
15 #for $rf in $regionsFiles:
|
|
16 cat "$rf.regionsFile" >> $temp_input_path;
|
|
17 #if str($rf.label.value).strip():
|
|
18 echo "\#$rf.label.value" >> $temp_input_path;
|
|
19 #else:
|
|
20 echo "\#$rf.regionsFile.name" >> $temp_input_path;
|
|
21 #end if
|
|
22 #end for
|
|
23
|
|
24
|
|
25 computeMatrix
|
|
26
|
|
27 $mode.mode_select
|
|
28 --regionsFileName '$temp_input_path'
|
|
29 --scoreFileName '$scoreFile'
|
|
30 --outFileName '$outFileName'
|
|
31
|
|
32 @THREADS@
|
|
33
|
|
34 #if $output.showOutputSettings == "yes"
|
|
35 #if $output.saveData:
|
|
36 --outFileNameData '$outFileNameData'
|
|
37 #end if
|
|
38 #if $output.saveMatrix:
|
|
39 --outFileNameMatrix '$outFileNameMatrix'
|
|
40 #end if
|
|
41
|
|
42 #if $output.saveSortedRegions:
|
|
43 --outFileSortedRegions '$outFileSortedRegions'
|
|
44 #end if
|
|
45 #end if
|
|
46
|
|
47 #if $mode.mode_select == "reference-point":
|
|
48 --referencePoint $mode.referencePoint
|
|
49 $mode.nanAfterEnd
|
|
50 --beforeRegionStartLength $mode.beforeRegionStartLength
|
|
51 --afterRegionStartLength $mode.afterRegionStartLength
|
|
52 #else
|
|
53 --regionBodyLength $mode.regionBodyLength
|
|
54 --startLabel $mode.startLabel
|
|
55 --endLabel $mode.endLabel
|
|
56 #if $mode.regionStartLength.regionStartLength_select == "yes":
|
|
57 --beforeRegionStartLength $mode.regionStartLength.beforeRegionStartLength
|
|
58 --afterRegionStartLength $mode.regionStartLength.afterRegionStartLength
|
|
59 #end if
|
|
60 #end if
|
|
61
|
|
62 #if $advancedOpt.showAdvancedOpt == "yes":
|
|
63 --sortRegions '$advancedOpt.sortRegions'
|
|
64 --sortUsing '$advancedOpt.sortUsing'
|
|
65 --averageTypeBins '$advancedOpt.averageTypeBins'
|
|
66 $advancedOpt.missingDataAsZero
|
|
67 $advancedOpt.skipZeros
|
|
68 --binSize $advancedOpt.binSize
|
|
69
|
|
70 #if $advancedOpt.minThreshold:
|
|
71 --minThreshold $advancedOpt.minThreshold
|
|
72 #end if
|
|
73 #if $advancedOpt.maxThreshold:
|
|
74 --maxThreshold $advancedOpt.maxThreshold
|
|
75 #end if
|
|
76 #if $advancedOpt.scale:
|
|
77 --scale $advancedOpt.scale
|
|
78 #end if
|
|
79
|
|
80 #end if
|
|
81 ; rm $temp_input_path
|
|
82
|
|
83 </command>
|
|
84 <inputs>
|
|
85
|
|
86 <repeat name="regionsFiles" title="regions to plot" min="1">
|
|
87 <param name="regionsFile" format="bed" type="data" label="Regions to plot" help="File, in BED format, containing the regions to plot."/>
|
|
88 <param name="label" type="text" size="30" optional="true" value="" label="Label" help="Label to use in the output."/>
|
|
89 </repeat>
|
|
90
|
|
91 <param name="scoreFile" format="bigwig" type="data" label="Score file" help="Should be a bigWig file (containing a score, usually covering the whole genome). You can generate a bigWig file either from a bedGraph or WIG file using UCSC tools or from a BAM file using the deepTool bamCoverage."/>
|
|
92
|
|
93 <conditional name="mode" >
|
|
94 <param name="mode_select" type="select" label="computeMatrix has two main output options" help="In the scale-regions mode, all regions in the BED file are stretched or shrunk to the same length (bp) that is indicated by the user. Reference-point refers to a position within the BED regions (e.g start of region). In the reference-point mode only those genomic positions before (downstream) and/or after (upstream) the reference point will be plotted.">
|
|
95 <option value="scale-regions" selected="true">scale-regions</option>
|
|
96 <option value="reference-point">reference-point</option>
|
|
97 </param>
|
|
98
|
|
99 <when value="scale-regions" >
|
|
100 <param name="regionBodyLength" type="integer" value="500" label="Distance in bp to which all regions are going to be fitted"/>
|
|
101 <param name="startLabel" type="text" value="TSS" size="10" label="Label for the region start" help ="Label shown in the plot for the start of the region. Default is TSS (transcription start site), but could be changed to anything, e.g. "peak start"." />
|
|
102 <param name="endLabel" type="text" value="TES" size="10" label="Label for the region end" help="Label shown in the plot for the region end. Default is TES (transcription end site)."/>
|
|
103 <conditional name="regionStartLength">
|
|
104 <param name="regionStartLength_select" type="select" label="Set distance up- and downstream of the given regions">
|
|
105 <option value="no" selected="true">no</option>
|
|
106 <option value="yes">yes</option>
|
|
107 </param>
|
|
108 <when value="no" />
|
|
109 <when value="yes">
|
|
110 <param name="beforeRegionStartLength" type="integer" value="1000" min="1" optional="true" label="Distance upstream of the start site of the regions defined in the region file" help="If the regions are genes, this would be the distance upstream of the transcription start site."/>
|
|
111
|
|
112 <param name="afterRegionStartLength" type="integer" value="1000" min="1" optional="true" label="Distance downstream of the end site of the given regions" help="If the regions are genes, this would be the distance downstream of the transcription end site."/>
|
|
113 </when>
|
|
114 </conditional>
|
|
115 </when>
|
|
116
|
|
117 <when value="reference-point">
|
|
118 <param name="referencePoint" type="select" label="The reference point for the plotting">
|
9
|
119 <option value="TSS" selected="true">beginning of region (e.g. TSS)</option>
|
10
|
120 <option value="TES">end of region (e.g. TES)</option>
|
9
|
121 <option value="center">center of region</option>
|
0
|
122 </param>
|
9
|
123
|
0
|
124 <param name="nanAfterEnd" type="boolean" truevalue="--nanAfterEnd" falsevalue="" label="Discard any values after the region end" help="This is useful to visualize the region end when not using the scale-regions mode and when the reference-point is set to the TSS."/>
|
|
125 <param name="beforeRegionStartLength" type="integer" value="1000" min="1" label="Distance upstream of the start site of the regions defined in the region file" help="If the regions are genes, this would be the distance upstream of the transcription start site."/>
|
|
126
|
|
127 <param name="afterRegionStartLength" type="integer" value="1000" min="1" label="Distance downstream of the end site of the given regions" help="If the regions are genes, this would be the distance downstream of the transcription end site."/>
|
|
128 </when>
|
|
129 </conditional>
|
10
|
130
|
|
131 <expand macro="graphic_output_settings" />
|
0
|
132
|
|
133 <conditional name="advancedOpt" >
|
|
134 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
|
|
135 <option value="no" selected="true">no</option>
|
|
136 <option value="yes">yes</option>
|
|
137 </param>
|
|
138 <when value="no" />
|
|
139 <when value="yes">
|
|
140 <param name="binSize" type="integer" value="100" min="1" optional="true" label="Length, in base pairs, of the non-overlapping bin for averaging the score over the regions length" />
|
|
141 <param name="sortRegions" type="select" label="Sort regions"
|
|
142 help="Whether the output file should present the regions sorted.">
|
|
143 <option value="no" selected="true">no ordering</option>
|
|
144 <option value="descend">descending order</option>
|
|
145 <option value="ascend">ascending order</option>
|
|
146 </param>
|
|
147
|
|
148 <param name="sortUsing" type="select" label="Method used for sorting." help="The value is computed for each row." >
|
|
149 <option value="mean" selected="true">mean</option>
|
|
150 <option value="median">median</option>
|
|
151 <option value="min">min</option>
|
|
152 <option value="max">max</option>
|
|
153 <option value="sum">sum</option>
|
|
154 <option value="region_length">region length</option>
|
|
155 </param>
|
|
156
|
|
157 <param name="averageTypeBins" type="select" label="Define the type of statistic that should be displayed." help="The value is computed for each bin.">
|
|
158 <option value="mean" selected="true">mean</option>
|
|
159 <option value="median">median</option>
|
|
160 <option value="min">min</option>
|
|
161 <option value="max">max</option>
|
|
162 <option value="sum">sum</option>
|
|
163 <option value="std">std</option>
|
|
164 </param>
|
|
165
|
|
166 <param name="missingDataAsZero" type="boolean" truevalue="--missingDataAsZero" falsevalue="" label="Indicate missing data as zero" help="Set to "yes", if missing data should be indicated as zeros. Default is to ignore such cases which will be depicted as black areas in the heatmap. (see "Missing data color" options of the heatmapper for additional options)."/>
|
|
167 <param name="skipZeros" type="boolean" truevalue="--skipZeros" falsevalue="" label="Skip zeros" help="Whether regions with only scores of zero should be included or not. Default is to include them."/>
|
|
168 <param name="minThreshold" type="float" optional="true" label="Minimum threshold" help="Any region containing a value that is equal or less than this numeric value will be skipped. This is useful to skip, for example, genes where the read count is zero for any of the bins. This could be the result of unmappable areas and can bias the overall results."/>
|
|
169 <param name="maxThreshold" type="float" optional="true" label="Maximum threshold" help="Any region containing a value that is equal or higher that this numeric value will be skipped. The max threshold is useful to skip those few regions with very high read counts (e.g. major satellites) that may bias the average values."/>
|
|
170 <param name="scale" type="float" optional="true" label="Scale" help="If set, all values are multiplied by this number."/>
|
|
171 </when>
|
|
172 </conditional>
|
|
173
|
|
174 </inputs>
|
|
175 <outputs>
|
10
|
176 <data format="bgzip" name="outFileName" label="${tool.name} on ${on_string}: Matrix" />
|
|
177 <expand macro="output_graphic_outputs" />
|
0
|
178 </outputs>
|
|
179 <!--
|
|
180 computeMatrix -S test.bw -R test2.bed -a 100 -b 100 -bs 1
|
|
181 -->
|
|
182 <tests>
|
|
183 <test>
|
|
184 <param name="regionsFile" value="test2.bed" ftype="bed" />
|
|
185 <param name="scoreFile" value="test.bw" ftype="bigwig" />
|
|
186 <param name="advancedOpt.binSize" value="1" />
|
|
187 <param name="mode.beforeRegionStartLength" value="100" />
|
|
188 <param name="mode.afterRegionStartLength" value="100" />
|
|
189 <output name="outFileName" file="master.mat.gz" ftype="bgzip" compare="sim_size" delta="100" />
|
|
190 </test>
|
|
191 </tests>
|
|
192 <help>
|
|
193
|
|
194 **What it does**
|
|
195
|
|
196 This tool summarizes and prepares an intermediary file
|
|
197 containing scores associated with genomic regions that can be used
|
|
198 afterwards to plot a heatmap or a profile.
|
|
199
|
|
200 Genomic regions can really be anything - genes, parts of genes, ChIP-seq
|
|
201 peaks, favorite genome regions... as long as you provide a proper file
|
|
202 in BED or INTERVAL format. This tool can also be used to filter and sort
|
|
203 regions according to their score.
|
|
204
|
|
205
|
|
206 .. image:: $PATH_TO_IMAGES/flowChart_computeMatrixetc.png
|
|
207 :alt: Relationship between computeMatrix, heatmapper and profiler
|
|
208
|
|
209
|
|
210 -----
|
|
211
|
|
212 .. class:: infomark
|
|
213
|
|
214 @REFERENCES@
|
|
215
|
|
216 </help>
|
|
217 </tool>
|