# HG changeset patch # User artbio # Date 1635243748 0 # Node ID 17f627ee8f5a950884a7fd56bcbb68343d41de07 # Parent 58b36ae7baca88ccd941e0c91e2050c9075177bd "planemo upload for repository https://github.com/artbio/tools-artbio/tree/master/tools/high_dim_heatmap commit ba6089071a53fbf08df00c0f94dfc8515b7c858b" diff -r 58b36ae7baca -r 17f627ee8f5a heatmap.xml --- a/heatmap.xml Thu Oct 22 21:47:10 2020 +0000 +++ b/heatmap.xml Tue Oct 26 10:22:28 2021 +0000 @@ -1,4 +1,4 @@ - + with high number of rows r-gplots @@ -22,29 +22,29 @@ input <- read.delim('$input1', sep='\t', header=TRUE) -mat_input <- data.matrix(input[,2:ncol(input)]) -rownames(mat_input) <- input[,1] +mat_input <- data.matrix(input[, 2:ncol(input)]) +rownames(mat_input) <- input[, 1] #if $transform == "none" linput <- mat_input #elif $transform == "log2" linput <- log2(mat_input) #elif $transform == "log2plus1" - linput <- log2(mat_input+1) + linput <- log2(mat_input + 1) #elif $transform == "log10" linput <- log10(mat_input) #elif $transform == "log10plus1" - linput <- log10(mat_input+1) + linput <- log10(mat_input + 1) #end if #if $colorscheme == "whrd" - colorscale = colfunc <- colorRampPalette(c("white", "red")) + colfunc <- colorRampPalette(c("white", "red")) #elif $colorscheme == "whblu" - colorscale = colfunc <- colorRampPalette(c("white", "blue")) + colfunc <- colorRampPalette(c("white", "blue")) #elif $colorscheme == "blwhre" - colorscale = colfunc <- colorRampPalette(c("blue","white", "red")) + colfunc <- colorRampPalette(c("blue","white", "red")) #elif $colorscheme == "yeblu" - colorscale = colfunc <- colorRampPalette(c("lightyellow", "royalblue4")) + colfunc <- colorRampPalette(c("lightyellow", "royalblue4")) #end if #if $labels== "both" @@ -61,37 +61,37 @@ clabs = FALSE #end if -pdf(file='$output1', paper='special', height=$height) -colorscale +pdf(file = '$output1', paper = 'special', height = $height) +par(cex.main = $title_size) #if $cluster_cond.cluster: - hclust_fun = function(x) hclust(x, method='$cluster_cond.clustering') - dist_fun = function(x) dist(x, method='$cluster_cond.distance') - #if $cluster_cond.cluster_cols_rows=="rows": - heatmap.2(linput, dendrogram="row", Colv=FALSE, Rowv=TRUE, - distfun=dist_fun, hclustfun=hclust_fun, scale = '$scale', labRow = rlabs, labCol = clabs, - col=colfunc(50), trace="none", density.info = "none", margins=c(8,8), - main = '$title', key.xlab='$key', keysize=1, cexCol=0.8, cexRow = $rowfontsize, srtCol=45, - lhei=c(1, $lineheight)) - #elif $cluster_cond.cluster_cols_rows=="columns": - heatmap.2(linput, dendrogram="column", Colv=TRUE, Rowv=FALSE, - distfun=dist_fun, hclustfun=hclust_fun, scale = '$scale', labRow = rlabs, labCol = clabs, - col=colfunc(50), trace="none", density.info = "none", margins=c(8,8), - main = '$title', key.xlab='$key', keysize=1, cexCol=0.8, cexRow = $rowfontsize, srtCol=45, - lhei=c(1, $lineheight)) + hclust_fun = function(x) hclust(x, method = '$cluster_cond.clustering') + dist_fun = function(x) dist(x, method = '$cluster_cond.distance') + #if $cluster_cond.cluster_cols_rows == "rows": + heatmap.2(linput, dendrogram="row", Colv = FALSE, Rowv = TRUE, + distfun = dist_fun, hclustfun = hclust_fun, scale = '$scale', labRow = rlabs, + labCol = clabs, col = colfunc(50), trace = "none", density.info = "none", + margins = c(8,8), main = '$title', key.xlab = '$key', keysize = 1, + cexCol = 0.8, cexRow = $rowfontsize, srtCol = 45, lhei = c(1, $lineheight)) + #elif $cluster_cond.cluster_cols_rows == "columns": + heatmap.2(linput, dendrogram = "column", Colv = TRUE, Rowv = FALSE, + distfun = dist_fun, hclustfun = hclust_fun, scale = '$scale', labRow = rlabs, + labCol = clabs, col = colfunc(50), trace = "none", density.info = "none", + margins = c(8,8), main = '$title', key.xlab = '$key', keysize = 1, + cexCol = 0.8, cexRow = $rowfontsize, srtCol = 45, lhei = c(1, $lineheight)) #else heatmap.2(linput, - distfun=dist_fun, hclustfun=hclust_fun, scale = '$scale', labRow = rlabs, labCol = clabs, - col=colfunc(50), trace="none", density.info = "none", margins=c(8,8), - main = '$title', key.xlab='$key', keysize=1, cexCol=0.8, cexRow = $rowfontsize, srtCol=45, - lhei=c(1, $lineheight)) + distfun = dist_fun, hclustfun = hclust_fun, scale = '$scale', labRow = rlabs, + labCol = clabs, col = colfunc(50), trace = "none", density.info = "none", + margins = c(8,8), main = '$title', key.xlab = '$key', keysize = 1, + cexCol = 0.8, cexRow = $rowfontsize, srtCol = 45, lhei = c(1, $lineheight)) #end if #else heatmap.2(linput, - dendrogram="none", Colv=FALSE, Rowv=FALSE, scale = '$scale', labRow = rlabs, labCol = clabs, - col=colfunc(50), trace="none", density.info = "none", margins=c(8,8), - main='$title', key.xlab='$key', keysize=1, cexCol=0.8, cexRow = $rowfontsize, srtCol=45, - lhei=c(1, $lineheight)) + dendrogram = "none", Colv = FALSE, Rowv = FALSE, scale = '$scale', labRow = rlabs, + labCol = clabs, col = colfunc(50), trace="none", density.info = "none", + margins = c(8,8), main = '$title', key.xlab = '$key', keysize = 1, cexCol = 0.8, + cexRow = $rowfontsize, srtCol = 45, lhei = c(1, $lineheight)) #end if dev.off() @@ -149,6 +149,7 @@ + @@ -159,16 +160,20 @@ + + + + diff -r 58b36ae7baca -r 17f627ee8f5a test-data/complex_result1.pdf Binary file test-data/complex_result1.pdf has changed diff -r 58b36ae7baca -r 17f627ee8f5a test-data/result1.pdf Binary file test-data/result1.pdf has changed diff -r 58b36ae7baca -r 17f627ee8f5a test-data/result2.pdf Binary file test-data/result2.pdf has changed