annotate script.R @ 1:05fbc5c891c5 draft default tip

planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
author earlhaminst
date Mon, 24 Feb 2025 11:03:02 +0000
parents bd8fd161908b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
1 #!/usr/bin/env Rscript
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
2
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
3 args <- commandArgs(TRUE)
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
4 countDataPath <- args[1]
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
5 statsDataPath <- args[2]
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
6 logFC <- args[3]
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
7 logCPM <- args[4]
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
8 pValue <- args[5]
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
9 fdr <- args[6]
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
10
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
11 clusterRow <- args[7]
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
12 clusterCol <- args[8]
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
13 hclustMethod <- args[9]
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
14
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
15 mgColumnNm <- as.numeric(args[10])
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
16 mgRowNm <- as.numeric(args[11])
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
17
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
18 pdfWidth <- as.numeric(args[12])
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
19 pdfHeight <- as.numeric(args[13])
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
20
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
21
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
22 if (clusterRow == "Yes") {
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
23 clusterRow <- TRUE
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
24 } else {
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
25 clusterRow <- NA
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
26 }
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
27
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
28 if (clusterCol == "Yes") {
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
29 clusterCol <- TRUE
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
30 } else {
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
31 clusterCol <- NA
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
32 }
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
33
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
34 require(preprocessCore)
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
35 require(gplots)
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
36
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
37 # prepare counts data --------------------------------------------------------
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
38 countData <- read.table(countDataPath,
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
39 comment = "",
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
40 sep = "\t"
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
41 )
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
42
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
43 groups <- sapply(as.character(countData[1, -1]), strsplit, ":")
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
44 groups <- as.vector(t(countData[1, -1]))
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
45
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
46 names <- as.vector(t(countData[2, -1]))
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
47
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
48 countData <- countData[-c(1, 2), ]
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
49 rownames(countData) <- countData[, 1]
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
50 countData <- countData[, -1]
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
51 colnames(countData) <- names
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
52
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
53 countData <- countData[, order(groups, names)]
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
54
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
55 # prepare stats data ------------------------------------------------------
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
56
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
57 statsData <- read.table(statsDataPath,
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
58 sep = "\t",
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
59 header = T
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
60 )
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
61
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
62 colnames(statsData)[-1] <- sapply(colnames(statsData)[-1], function(x) {
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
63 unlist(strsplit(x, ".", fixed = T))[3]
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
64 })
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
65
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
66 wh <- which(abs(statsData$logFC) >= logFC & statsData$logCPM >= logCPM & statsData$PValue <= pValue & statsData$FDR <= fdr)
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
67
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
68 for (i in 1:ncol(countData)) {
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
69 countData[, i] <- as.numeric(countData[, i])
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
70 }
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
71
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
72 countDataNorm <- normalize.quantiles(as.matrix(countData), copy = T)
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
73 countDataNormLog <- log(countDataNorm + 1, 2)
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
74
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
75 colnames(countDataNormLog) <- colnames(countData)
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
76 rownames(countDataNormLog) <- rownames(countData)
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
77
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
78 # svg("heatmap.svg", width = 3+length(names), height = 1/2*length(wh))
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
79 pdf("heatmap.pdf", width = pdfWidth, height = pdfHeight)
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
80
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
81 heatmap.2(
1
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
82 countDataNormLog[wh, ],
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
83 density.info = c("none"),
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
84 hclustfun = function(x) hclust(x, method = hclustMethod),
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
85 distfun = function(x) as.dist(1 - cor(t(x))),
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
86 col = bluered(50),
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
87 scale = "row",
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
88 trace = "none",
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
89 Rowv = clusterRow,
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
90 Colv = clusterCol,
05fbc5c891c5 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/plotheatmap commit 6e40bbe92367310e9d3ec69571d08eb49af7c0a6-dirty
earlhaminst
parents: 0
diff changeset
91 margins = c(mgColumnNm, mgRowNm)
0
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
92 )
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
93
bd8fd161908b planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/plotheatmap commit 7e9d6b283879b45d5fe673767668c06104d31609-dirty
earlhaminst
parents:
diff changeset
94 dev.off()