comparison heatmapper.xml @ 10:135f3bae5c56 draft

Uploaded
author bgruening
date Sat, 14 Dec 2013 03:29:29 -0500
parents d957e25e18a3
children baf4283e2d7f
comparison
equal deleted inserted replaced
9:c53a73b8eef9 10:135f3bae5c56
1 <tool id="deeptools_heatmapper" name="heatmapper" version="1.0"> 1 <tool id="deeptools_heatmapper" name="heatmapper" version="1.0.2">
2 <description>creates a heatmap for a score associated to genomic regions</description> 2 <description>creates a heatmap for a score associated to genomic regions</description>
3 <expand macro="requirements"> 3 <expand macro="requirements"/>
4 <requirement type="package" version="1.7.1">numpy</requirement> 4 <expand macro="stdio" />
5 <requirement type="package" version="1.2.1">matplotlib</requirement>
6 <requirement type="package" version="0.12.0">scipy</requirement>
7 </expand>
8 <macros> 5 <macros>
9 <import>deepTools_macros.xml</import> 6 <import>deepTools_macros.xml</import>
10 </macros> 7 </macros>
11 <command> 8 <command>
12 heatmapper 9 heatmapper
13 10
14 --matrixFile $matrixFile 11 --matrixFile $matrixFile
15 #if $output.showOutputSettings == "yes" 12 --outFileName $outFileName
16 #set newoutFileName=str($outFileName)+"."+str($output.outFileFormat)
17 --outFileName $newoutFileName
18 #if $outFileNameData:
19 --outFileNameData '$outFileNameData'
20 #end if
21 13
22 #if $outFileNameMatrix: 14 #if $output.showOutputSettings == "yes"
23 --outFileNameMatrix '$outFileNameMatrix' 15 --plotFileFormat $output.outFileFormat
24 #end if 16 #if $outFileNameData:
17 --outFileNameData '$outFileNameData'
18 #end if
25 19
26 #if $outFileSortedRegions: 20 #if $outFileNameMatrix:
27 --outFileSortedRegions '$outFileSortedRegions' 21 --outFileNameMatrix '$outFileNameMatrix'
28 #end if 22 #end if
29 #else 23
30 #set newoutFileName=str($outFileName)+".png" 24 #if $outFileSortedRegions:
31 --outFileName $newoutFileName 25 --outFileSortedRegions '$outFileSortedRegions'
32 #end if 26 #end if
33 27 #else
34 #if $advancedOpt.showAdvancedOpt == "yes" 28 --plotFileFormat 'png'
35 #if $advancedOpt.sortRegions: 29 #end if
36 --sortRegions '$advancedOpt.sortRegions' 30
37 #end if 31 #if $advancedOpt.showAdvancedOpt == "yes"
32 #if $advancedOpt.sortRegions:
33 --sortRegions '$advancedOpt.sortRegions'
34 #end if
38 35
39 #if $advancedOpt.sortUsing: 36 #if $advancedOpt.sortUsing:
40 --sortUsing '$advancedOpt.sortUsing' 37 --sortUsing '$advancedOpt.sortUsing'
41 #end if 38 #end if
42
43 #if $advancedOpt.averageTypeSummaryPlot:
44 --averageTypeSummaryPlot '$advancedOpt.averageTypeSummaryPlot'
45 #end if
46
47 #if str($advancedOpt.missingDataColor.value) != "None":
48 --missingDataColor '$advancedOpt.missingDataColor'
49 #end if
50
51 --colorMap '$advancedOpt.colorMap'
52
53 #if $advancedOpt.zMin:
54 --zMin $advancedOpt.zMin
55 #end if
56 #if $advancedOpt.zMax:
57 --zMax $advancedOpt.zMax
58 #end if
59
60 #if $advancedOpt.yMin:
61 --yMin $advancedOpt.yMin
62 #end if
63 #if $advancedOpt.yMax:
64 --yMax $advancedOpt.yMax
65 #end if
66 39
67 --xAxisLabel '$advancedOpt.xAxisLabel' 40 #if $advancedOpt.averageTypeSummaryPlot:
68 --yAxisLabel '$advancedOpt.yAxisLabel' 41 --averageTypeSummaryPlot '$advancedOpt.averageTypeSummaryPlot'
42 #end if
69 43
70 --heatmapWidth $advancedOpt.heatmapWidth 44 #if str($advancedOpt.missingDataColor.value) != "None":
71 --heatmapHeight $advancedOpt.heatmapHeight 45 --missingDataColor '$advancedOpt.missingDataColor'
46 #end if
72 47
73 --whatToShow '$advancedOpt.whatToShow' 48 --colorMap '$advancedOpt.colorMap'
74 49
75 --startLabel '$advancedOpt.startLabel' 50 #if $advancedOpt.zMin:
76 --endLabel '$advancedOpt.endLabel' 51 --zMin $advancedOpt.zMin
77 --refPointLabel '$advancedOpt.referencePointLabel' 52 #end if
78 --regionsLabel '$advancedOpt.regionsLabel' 53 #if $advancedOpt.zMax:
54 --zMax $advancedOpt.zMax
55 #end if
79 56
80 #if str($advancedOpt.plotTitle.value) != "None": 57 #if $advancedOpt.yMin:
81 --plotTitle '$advancedOpt.plotTitle' 58 --yMin $advancedOpt.yMin
82 #end if 59 #end if
60 #if $advancedOpt.yMax:
61 --yMax $advancedOpt.yMax
62 #end if
83 63
84 $advancedOpt.onePlotPerGroup 64 --xAxisLabel '$advancedOpt.xAxisLabel'
85 #end if 65 --yAxisLabel '$advancedOpt.yAxisLabel'
86 66
87 ; mv $newoutFileName $outFileName 67 --heatmapWidth $advancedOpt.heatmapWidth
88 </command> 68 --heatmapHeight $advancedOpt.heatmapHeight
89 <inputs>
90 <param name="matrixFile" format="bgzip" type="data" label="Matrix file from the computeMatrix tool"/>
91 69
92 <expand macro="graphic_output_settings" /> 70 --whatToShow '$advancedOpt.whatToShow'
93 71
94 <conditional name="advancedOpt" > 72 --startLabel '$advancedOpt.startLabel'
95 <param name="showAdvancedOpt" type="select" label="Show advanced options" > 73 --endLabel '$advancedOpt.endLabel'
96 <option value="no" selected="true">no</option> 74 --refPointLabel '$advancedOpt.referencePointLabel'
97 <option value="yes">yes</option> 75 --regionsLabel '$advancedOpt.regionsLabel'
98 </param>
99 <when value="no" />
100 <when value="yes">
101 <param name="sortRegions" type="select" label="Sort regions"
102 help="Whether the heatmap should present the regions sorted. The default is to sort in descending order based on the mean value per region.">
103 <option value="no">no ordering</option>
104 <option value="descend" selected="true">descending order</option>
105 <option value="ascend">ascending order</option>
106 </param>
107 76
108 <param name="sortUsing" type="select" label="Method used for sorting" help="For each row the method is computed." > 77 #if str($advancedOpt.plotTitle.value) != "None":
109 <option value="mean" selected="true">mean</option> 78 --plotTitle '$advancedOpt.plotTitle'
110 <option value="median">median</option> 79 #end if
111 <option value="min">min</option>
112 <option value="max">max</option>
113 <option value="sum">sum</option>
114 <option value="region_length">region length</option>
115 </param>
116 80
117 <param name="averageTypeSummaryPlot" type="select" label="Type of statistic that should be plotted in the summary image above the heatmap"> 81 $advancedOpt.onePlotPerGroup
118 <option value="mean" selected="true">mean</option> 82 #end if
119 <option value="median">median</option> 83 </command>
120 <option value="min">min</option> 84 <inputs>
121 <option value="max">max</option> 85 <param name="matrixFile" format="bgzip" type="data" label="Matrix file from the computeMatrix tool"/>
122 <option value="sum">sum</option>
123 <option value="std">std</option>
124 </param>
125 86
126 <param name="missingDataColor" type="text" label="Missing data color" value="black" optional="true" help="If 'Represent missing data as zero' is not set, such cases will be colored in black by default. By using this parameter a different color can be set. A value between 0 and 1 will be used for a gray scale (black is 0). Also color names can be used, see a list here: http://packages.python.org/ete2/reference/reference_svgcolors.html. Alternatively colors can be specified using the #rrggbb notation." /> 87 <expand macro="graphic_output_settings" />
127 88
128 <expand macro="colormap" /> 89 <conditional name="advancedOpt" >
90 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
91 <option value="no" selected="true">no</option>
92 <option value="yes">yes</option>
93 </param>
94 <when value="no" />
95 <when value="yes">
96 <param name="sortRegions" type="select" label="Sort regions"
97 help="Whether the heatmap should present the regions sorted. The default is to sort in descending order based on the mean value per region.">
98 <option value="no">no ordering</option>
99 <option value="descend" selected="true">descending order</option>
100 <option value="ascend">ascending order</option>
101 </param>
129 102
130 <param name="zMin" type="float" value="" size="3" label="Minimum value for the heatmap intensities. Leave empty for automatic values" optional="true"/> 103 <param name="sortUsing" type="select" label="Method used for sorting" help="For each row the method is computed." >
131 <param name="zMax" type="float" value="" size="3" label="Maximum value for the heatmap intensities. Leave empty for automatic values" optional="true"/> 104 <option value="mean" selected="true">mean</option>
132 <param name="yMin" type="float" value="" size="3" label="Minimum value for the Y-axis of the summary plot. Leave empty for automatic values" optional="true"/> 105 <option value="median">median</option>
133 <param name="yMax" type="float" value="" size="3" label="Maximum value for Y-axis of the summary plot. Leave empty for automatic values" optional="true"/> 106 <option value="min">min</option>
107 <option value="max">max</option>
108 <option value="sum">sum</option>
109 <option value="region_length">region length</option>
110 </param>
134 111
135 <param name="xAxisLabel" type="text" value="distance from TSS (bp)" size="200" label="Description for the x-axis label" /> 112 <param name="averageTypeSummaryPlot" type="select" label="Type of statistic that should be plotted in the summary image above the heatmap">
136 <param name="yAxisLabel" type="text" value="genes" size="30" label="Description for the y-axis label for the top panel" /> 113 <option value="mean" selected="true">mean</option>
114 <option value="median">median</option>
115 <option value="min">min</option>
116 <option value="max">max</option>
117 <option value="sum">sum</option>
118 <option value="std">std</option>
119 </param>
137 120
138 <param name="heatmapWidth" type="float" value="7.5" min="1" max="100" label="Heatmap width in cm" help="The minimum value is 1 and the maximum is 100."/> 121 <param name="missingDataColor" type="text" label="Missing data color" value="black" optional="true" help="If 'Represent missing data as zero' is not set, such cases will be colored in black by default. By using this parameter a different color can be set. A value between 0 and 1 will be used for a gray scale (black is 0). Also color names can be used, see a list here: http://packages.python.org/ete2/reference/reference_svgcolors.html. Alternatively colors can be specified using the #rrggbb notation." />
139 <param name="heatmapHeight" type="float" value="25" min="3" max="100" label="Heatmap height in cm" help="The minimum value is 3 and the maximum is 100."/>
140 122
141 <param name="whatToShow" type="select" label="What to show" help ="The default is to include a summary or profile plot on top of the heatmap and a heatmap colorbar."> 123 <expand macro="colormap" />
142 <option value="plot, heatmap and colorbar" selected="true">summary plot, heatmap and colorbar</option>
143 <option value="plot only">summary plot only</option>
144 <option value="plot and heatmap">summary plot and heatmap (no colorbar)</option>
145 <option value="heatmap only">heatmap only</option>
146 <option value="heatmap and colorbar">heatmap and colorbar</option>
147 <option value="colorbar only">colorbar only</option>
148 </param>
149 124
150 <param name="startLabel" type="text" value="TSS" size="10" label="Label for the region start" help ="[only for scale-regions mode] 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. &quot;peak start&quot;." /> 125 <param name="zMin" type="float" value="" size="3" label="Minimum value for the heatmap intensities. Leave empty for automatic values" optional="true"/>
151 <param name="endLabel" type="text" value="TES" size="10" label="Label for the region end" help="[only for scale-regions mode] Label shown in the plot for the region end. Default is TES (transcription end site)."/> 126 <param name="zMax" type="float" value="" size="3" label="Maximum value for the heatmap intensities. Leave empty for automatic values" optional="true"/>
127 <param name="yMin" type="float" value="" size="3" label="Minimum value for the Y-axis of the summary plot. Leave empty for automatic values" optional="true"/>
128 <param name="yMax" type="float" value="" size="3" label="Maximum value for Y-axis of the summary plot. Leave empty for automatic values" optional="true"/>
152 129
153 <param name="referencePointLabel" type="text" value="TSS" size="10" label="Reference point label" help ="[only for scale-regions mode] Label shown in the plot for the reference-point. Default is the same as the reference point selected (e.g. TSS), but could be anything, e.g. &quot;peak start&quot; etc." /> 130 <param name="xAxisLabel" type="text" value="distance from TSS (bp)" size="200" label="Description for the x-axis label" />
154 <param name="regionsLabel" type="text" value="genes" size="30" label="Labels for the regions plotted in the heatmap" help="If more than one region is being plotted a list of labels separated by comma and limited by quotes, is required. For example, &quot;label1, label2&quot;."/> 131 <param name="yAxisLabel" type="text" value="genes" size="30" label="Description for the y-axis label for the top panel" />
155 <param name="plotTitle" type="text" value="" size="30" label="Title of the plot" help="Title of the plot, to be printed on top of the generated image. Leave blank for no title." />
156 <param name="onePlotPerGroup" type="boolean" truevalue="--onePlotPerGroup" falsevalue="" label="Do one plot per group" help="When the region file contains groups separated by &quot;#&quot;, the default is to plot the averages for the distinct plots in one plot. If this option is set, each group will get its own plot, stacked on top of each other."/>
157 132
133 <param name="heatmapWidth" type="float" value="7.5" min="1" max="100" label="Heatmap width in cm" help="The minimum value is 1 and the maximum is 100."/>
134 <param name="heatmapHeight" type="float" value="25" min="3" max="100" label="Heatmap height in cm" help="The minimum value is 3 and the maximum is 100."/>
158 135
159 </when> 136 <param name="whatToShow" type="select" label="What to show" help ="The default is to include a summary or profile plot on top of the heatmap and a heatmap colorbar.">
160 </conditional> 137 <option value="plot, heatmap and colorbar" selected="true">summary plot, heatmap and colorbar</option>
138 <option value="plot only">summary plot only</option>
139 <option value="plot and heatmap">summary plot and heatmap (no colorbar)</option>
140 <option value="heatmap only">heatmap only</option>
141 <option value="heatmap and colorbar">heatmap and colorbar</option>
142 <option value="colorbar only">colorbar only</option>
143 </param>
161 144
162 </inputs> 145 <param name="startLabel" type="text" value="TSS" size="10" label="Label for the region start" help ="[only for scale-regions mode] 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. &quot;peak start&quot;." />
163 <outputs> 146 <param name="endLabel" type="text" value="TES" size="10" label="Label for the region end" help="[only for scale-regions mode] Label shown in the plot for the region end. Default is TES (transcription end site)."/>
164 <data format="png" name="outFileName" label="${tool.name} image"> 147
165 <change_format> 148 <param name="referencePointLabel" type="text" value="TSS" size="10" label="Reference point label" help ="[only for scale-regions mode] Label shown in the plot for the reference-point. Default is the same as the reference point selected (e.g. TSS), but could be anything, e.g. &quot;peak start&quot; etc." />
166 <when input="output.outFileFormat" value="pdf" format="pdf" /> 149 <param name="regionsLabel" type="text" value="genes" size="30" label="Labels for the regions plotted in the heatmap" help="If more than one region is being plotted a list of labels separated by comma and limited by quotes, is required. For example, &quot;label1, label2&quot;."/>
167 <when input="output.outFileFormat" value="svg" format="svg" /> 150 <param name="plotTitle" type="text" value="" size="30" label="Title of the plot" help="Title of the plot, to be printed on top of the generated image. Leave blank for no title." />
168 <when input="output.outFileFormat" value="eps" format="eps" /> 151 <param name="onePlotPerGroup" type="boolean" truevalue="--onePlotPerGroup" falsevalue="" label="Do one plot per group" help="When the region file contains groups separated by &quot;#&quot;, the default is to plot the averages for the distinct plots in one plot. If this option is set, each group will get its own plot, stacked on top of each other."/>
169 <when input="output.outFileFormat" value="emf" format="emf" /> 152 </when>
170 </change_format> 153 </conditional>
171 </data> 154 </inputs>
172 <data format="tabular" name="outFileNameData" label="${tool.name} raw plot data"> 155 <outputs>
173 <filter>(output['showOutputSettings'] == 'yes' and output['saveData'] == True)</filter> 156 <data format="png" name="outFileName" label="${tool.name} image">
174 </data> 157 <change_format>
175 <data format="tabular" name="outFileNameMatrix" label="${tool.name} matrix of heatmap values"> 158 <when input="output.outFileFormat" value="pdf" format="pdf" />
176 <filter>(output['showOutputSettings'] == 'yes' and output['saveMatrix'] == True)</filter> 159 <when input="output.outFileFormat" value="svg" format="svg" />
177 </data> 160 <when input="output.outFileFormat" value="eps" format="eps" />
178 <data format="bed" name="outFileSortedRegions" label="${tool.name} sorted/filtered regions"> 161 <when input="output.outFileFormat" value="emf" format="emf" />
179 <filter>(output['showOutputSettings'] == 'yes' and output['saveSortedRegions'] == True)</filter> 162 </change_format>
180 </data> 163 </data>
181 </outputs> 164 <expand macro="output_graphic_outputs" />
165 </outputs>
182 <tests> 166 <tests>
183 <test> 167 <test>
184 <param name="matrixFile" value="master.mat.gz" ftype="bgzip" /> 168 <param name="matrixFile" value="master.mat.gz" ftype="bgzip" />
185 <output name="outFileName" file="master.png" ftype="png" compare="sim_size" delta="100" /> 169 <output name="outFileName" file="master.png" ftype="png" compare="sim_size" delta="100" />
186 </test> 170 </test>
187 </tests> 171 </tests>
188 <help> 172 <help>
189 173
190 **What it does** 174 **What it does**
191 175
192 The heatmapper visualizes scores associated with genomic regions, for example ChIP enrichment values around the TSS of genes. 176 The heatmapper visualizes scores associated with genomic regions, for example ChIP enrichment values around the TSS of genes.
193 Those values can be visualized individually along each of the regions provided by the user in INTERVAL or BED format. 177 Those values can be visualized individually along each of the regions provided by the user in INTERVAL or BED format.