comparison heatmap2.xml @ 7:53460afd5115 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heatmap2 commit 48958ce8d7a3b630dfcca78d12222ac67f1602fe
author iuc
date Wed, 08 Mar 2023 14:11:15 +0000
parents 566197475670
children 374e9062d874
comparison
equal deleted inserted replaced
6:566197475670 7:53460afd5115
1 <tool id="ggplot2_heatmap2" name="heatmap2" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> 1 <tool id="ggplot2_heatmap2" name="heatmap2" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.01">
2 <macros> 2 <macros>
3 <token name="@TOOL_VERSION@">3.1.1</token> 3 <token name="@TOOL_VERSION@">3.1.3</token>
4 <token name="@VERSION_SUFFIX@">1</token> 4 <token name="@VERSION_SUFFIX@">0</token>
5 </macros> 5 </macros>
6 <requirements> 6 <requirements>
7 <requirement type="package" version="@TOOL_VERSION@">r-gplots</requirement> 7 <requirement type="package" version="@TOOL_VERSION@">r-gplots</requirement>
8 <requirement type="package" version="1.1_3">r-rcolorbrewer</requirement> 8 <requirement type="package" version="1.1_3">r-rcolorbrewer</requirement>
9 </requirements> 9 </requirements>
51 scale <- "none" 51 scale <- "none"
52 #elif $zscore_cond.zscore == "none": 52 #elif $zscore_cond.zscore == "none":
53 scale <- "$zscore_cond.scale" 53 scale <- "$zscore_cond.scale"
54 #end if 54 #end if
55 55
56 srtCol <- 45 56 srtCol <- 30
57 #if $labels == "both" 57 #if $labels == "both"
58 rlabs <- NULL 58 rlabs <- NULL
59 clabs <- NULL 59 clabs <- NULL
60 label_margins <- c(8,8)
60 #elif $labels == "rows" 61 #elif $labels == "rows"
61 rlabs <- NULL 62 rlabs <- NULL
62 clabs <- FALSE 63 clabs <- FALSE
63 srtCol <- NULL 64 srtCol <- NULL
65 label_margins <- c(1,8)
64 #elif $labels == "columns" 66 #elif $labels == "columns"
65 rlabs <- FALSE 67 rlabs <- FALSE
66 clabs <- NULL 68 clabs <- NULL
69 label_margins <- c(8,1)
67 #elif $labels == "none" 70 #elif $labels == "none"
68 rlabs <- FALSE 71 rlabs <- FALSE
69 clabs <- FALSE 72 clabs <- FALSE
70 srtCol <- NULL 73 srtCol <- NULL
74 label_margins <- c(1,1)
71 #end if 75 #end if
72 76
73 #if $cluster_cond.cluster == "yes": 77 #if $cluster_cond.cluster == "yes":
74 dendrogramtoplot <- "$cluster_cond.cluster_cols_rows" 78 dendrogramtoplot <- "$cluster_cond.cluster_cols_rows"
75 #if $cluster_cond.cluster_cols_rows == "both" 79 #if $cluster_cond.cluster_cols_rows == "both"
76 reorder_cols <- TRUE 80 reorder_cols <- TRUE
77 reorder_rows <- TRUE 81 reorder_rows <- TRUE
82 layout_matrix <- rbind(c(4,3), c(2,1))
83 key_margins <- list(mar=c(4,0.5,2,1))
84 lheight <- c(1, 5)
85 lwidth <- c(1,3)
78 #elif $cluster_cond.cluster_cols_rows == "row" 86 #elif $cluster_cond.cluster_cols_rows == "row"
79 reorder_cols <- FALSE 87 reorder_cols <- FALSE
80 reorder_rows <- TRUE 88 reorder_rows <- TRUE
89 layout_matrix <- rbind(c(3,4), c(2,1))
90 key_margins <- list(mar=c(3,5,1,10))
91 lheight <- c(1,7)
92 lwidth <- c(1,3)
81 #elif $cluster_cond.cluster_cols_rows == "column" 93 #elif $cluster_cond.cluster_cols_rows == "column"
82 reorder_cols <- TRUE 94 reorder_cols <- TRUE
83 reorder_rows <- FALSE 95 reorder_rows <- FALSE
96 layout_matrix <- rbind(c(4), c(3), c(1), c(2))
97 key_margins <- list(mar=c(4,0.5,2,1))
98 lheight <- c(0.3, 2, 6, 1)
99 lwidth <- c(1)
84 #end if 100 #end if
85 hclust_fun <- function(x) hclust(x, method='$cluster_cond.clustering') 101 hclust_fun <- function(x) hclust(x, method='$cluster_cond.clustering')
86 #if $cluster_cond.distance == 'pearson_correlation': 102 #if $cluster_cond.distance == 'pearson_correlation':
87 dist_fun <- function(x) as.dist(1 - cor(t(x))) 103 dist_fun <- function(x) as.dist(1 - cor(t(x)))
88 #elif $cluster_cond.distance == 'spearmann_correlation': 104 #elif $cluster_cond.distance == 'spearmann_correlation':
92 #end if 108 #end if
93 #else: 109 #else:
94 dendrogramtoplot <- "none" 110 dendrogramtoplot <- "none"
95 reorder_cols <- FALSE 111 reorder_cols <- FALSE
96 reorder_rows <- FALSE 112 reorder_rows <- FALSE
113 layout_matrix <- rbind(c(0,4,3), c(0,1,2))
114 key_margins <- list(mar=c(3,5,1,10))
115 lheight <- c(1,7)
116 lwidth <- c(1,7,1)
97 hclust_fun <- hclust 117 hclust_fun <- hclust
98 dist_fun <- dist 118 dist_fun <- dist
119 label_margins <- c(8,2)
99 #end if 120 #end if
100 121
101 ncolors <- 50 122 ncolors <- 50
102 #if $colorchoice.type == "palettes": 123 #if $colorchoice.type == "palettes":
103 colused <- brewer.pal(ncolors, "$colorchoice.name") 124 colused <- brewer.pal(ncolors, "$colorchoice.name")
108 #end if 129 #end if
109 130
110 #if $image_file_format == "pdf": 131 #if $image_file_format == "pdf":
111 pdf(file='$output1') 132 pdf(file='$output1')
112 #else: 133 #else:
113 png(file='$output1') 134 png(file='$output1', res=240, height=2000, width=2000)
114 #end if 135 #end if
115 136
116 heatmap.2(linput, dendrogram=dendrogramtoplot, Colv=reorder_cols, Rowv=reorder_rows, 137 heatmap.2(linput, dendrogram=dendrogramtoplot, Colv=reorder_cols, Rowv=reorder_rows,
117 distfun=dist_fun, hclustfun=hclust_fun, scale = scale, labRow = rlabs, labCol = clabs, 138 distfun=dist_fun, hclustfun=hclust_fun, scale = scale, labRow = rlabs, labCol = clabs,
118 col=colused, trace="none", density.info = "none", margins=c(8,8), 139 col=colused, trace="none", density.info = "none", margins=label_margins,
119 main = '$title', key.xlab='$key', keysize=1, cexCol=0.8, cexRow = 0.8, srtCol=srtCol) 140 main = '$title', cexCol=0.8, cexRow=0.8, srtCol=srtCol,
141 keysize=3, key.xlab='$key', key.title='', key.par=key_margins,
142 lmat=layout_matrix, lhei=lheight, lwid=lwidth)
120 143
121 dev.off() 144 dev.off()
122 ]]></configfile> 145 ]]></configfile>
123 </configfiles> 146 </configfiles>
124 147
126 <param name="input1" type="data" format="tabular" 149 <param name="input1" type="data" format="tabular"
127 label="Input should have column headers - these will be the columns that are plotted and row names."/> 150 label="Input should have column headers - these will be the columns that are plotted and row names."/>
128 <param name="title" type="text" format="txt" label="Plot title"/> 151 <param name="title" type="text" format="txt" label="Plot title"/>
129 <param name="key" type="text" format="txt" label="key title"/> 152 <param name="key" type="text" format="txt" label="key title"/>
130 <param name="transform" type="select" label="Data transformation"> 153 <param name="transform" type="select" label="Data transformation">
131 <option value="none">Plot the data as it is</option> 154 <option value="none" selected="true">Plot the data as it is</option>
132 <option value="log2">Log2(value) transform my data</option> 155 <option value="log2">Log2(value) transform my data</option>
133 <option value="log2plus1">Log2(value+1) transform my data</option> 156 <option value="log2plus1">Log2(value+1) transform my data</option>
134 <option value="log10">Log10(value) transform my data</option> 157 <option value="log10">Log10(value) transform my data</option>
135 <option value="log10plus1">Log10(value+1) transform my data</option> 158 <option value="log10plus1">Log10(value+1) transform my data</option>
136 </param> 159 </param>
137 <conditional name="zscore_cond"> 160 <conditional name="zscore_cond">
138 <param name="zscore" type="select" label="Compute z-scores prior to clustering"> 161 <param name="zscore" type="select" label="Compute z-scores prior to clustering">
139 <option value="none">Do not compute z-scores</option> 162 <option value="none" selected="true">Do not compute z-scores</option>
140 <option value="rows">Compute on rows</option> 163 <option value="rows">Compute on rows</option>
141 <option value="cols">Compute on columns</option> 164 <option value="cols">Compute on columns</option>
142 </param> 165 </param>
143 <when value="none"> 166 <when value="none">
144 <param name="scale" type="select" label="Scale data on the plot (after clustering)" > 167 <param name="scale" type="select" label="Scale data on the plot (after clustering)" >
150 <when value="rows"/> 173 <when value="rows"/>
151 <when value="cols"/> 174 <when value="cols"/>
152 </conditional> 175 </conditional>
153 <conditional name="cluster_cond"> 176 <conditional name="cluster_cond">
154 <param name="cluster" type="select" label="Enable data clustering"> 177 <param name="cluster" type="select" label="Enable data clustering">
155 <option value="yes">Yes</option> 178 <option value="yes" selected="true">Yes</option>
156 <option value="no">No</option> 179 <option value="no">No</option>
157 </param> 180 </param>
158 <when value="yes"> 181 <when value="yes">
159 <param name="cluster_cols_rows" type="select" label="Clustering columns and rows"> 182 <param name="cluster_cols_rows" type="select" label="Clustering columns and rows">
160 <option value="both" selected="true">Cluster rows and columns</option> 183 <option value="both" selected="true">Cluster rows and columns</option>
190 <option value="columns">Label columns and not rows</option> 213 <option value="columns">Label columns and not rows</option>
191 <option value="none">Do not label rows or columns</option> 214 <option value="none">Do not label rows or columns</option>
192 </param> 215 </param>
193 <conditional name="colorchoice"> 216 <conditional name="colorchoice">
194 <param name="type" type="select" label="Type of colormap to use"> 217 <param name="type" type="select" label="Type of colormap to use">
195 <option value="palettes">RColorBrewer palettes</option> 218 <option value="palettes" selected="true">RColorBrewer palettes</option>
196 <option value="two">Gradient with 2 colors</option> 219 <option value="two">Gradient with 2 colors</option>
197 <option value="three">Gradient with 3 colors</option> 220 <option value="three">Gradient with 3 colors</option>
198 </param> 221 </param>
199 <when value="palettes"> 222 <when value="palettes">
200 <param name="name" type="select" label="Name of the colormap"> 223 <param name="name" type="select" label="Name of the colormap">
236 <param name="color2" type="color" value="#ffffff" label="Second color" /> 259 <param name="color2" type="color" value="#ffffff" label="Second color" />
237 <param name="color3" type="color" value="#ff0000" label="Third color" /> 260 <param name="color3" type="color" value="#ff0000" label="Third color" />
238 </when> 261 </when>
239 </conditional> 262 </conditional>
240 <param name="image_file_format" type="select" label="Output format"> 263 <param name="image_file_format" type="select" label="Output format">
241 <option value="pdf">PDF</option> 264 <option value="pdf" selected="true">PDF</option>
242 <option value="png">PNG</option> 265 <option value="png">PNG</option>
243 </param> 266 </param>
244 </inputs> 267 </inputs>
245 <outputs> 268 <outputs>
246 <data name="output1" format="pdf"> 269 <data name="output1" format="pdf">
309 This tool employs the heatmap.2 function from the R gplots package and will generate a heatmap of your data. If clustering is enabled, the heatmap uses the Euclidean distance method and the Complete hierarchical clustering method by default. 332 This tool employs the heatmap.2 function from the R gplots package and will generate a heatmap of your data. If clustering is enabled, the heatmap uses the Euclidean distance method and the Complete hierarchical clustering method by default.
310 333
311 Input data should have row labels in the first column and column labels. For example, the row labels (the first column) should represent gene IDs and the column labels should represent sample IDs. 334 Input data should have row labels in the first column and column labels. For example, the row labels (the first column) should represent gene IDs and the column labels should represent sample IDs.
312 ]]></help> 335 ]]></help>
313 <citations> 336 <citations>
337 <citation type="bibtex">
338 @ONLINE{heatmap2,
339 title = {heatmap.2: Enhanced Heat Map},
340 url = {https://rdocumentation.org/packages/gplots/versions/3.1.3/topics/heatmap.2}
341 }
342 </citation>
314 </citations> 343 </citations>
315 </tool> 344 </tool>