1 | showtimeMapping(base, overlay)
|
base |
|
overlay |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (base, overlay)
{
cluster = overlay
map = base
map$genes = rownames(map)
cluster$genes = rownames(cluster)
map$colors = 0
n = max(cluster$colors)
for (i in 1:nrow(cluster)) {
map[which(cluster[i, "genes"] == map$genes), "colors"] = cluster[i,
"colors"]
}
cluster.color = map
cluster.color$colors[cluster.color$colors == 0] = "light grey"
cluster.color.sub = cluster.color[cluster.color$colors ==
"light grey", ]
cluster.color = cluster.color[cluster.color$colors != "light grey",
]
p = ggplot(cluster.color, aes(x, y)) + theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(), panel.background = element_blank()) +
theme(legend.position = "none") + geom_point(data = cluster.color.sub,
size = 2.5, color = cluster.color.sub$colors) + geom_point(size = 5,
pch = 21, fill = cluster.color$colors) + theme(axis.text.x = element_blank()) +
theme(axis.text.y = element_blank()) + theme(axis.ticks.x = element_blank()) +
theme(axis.ticks.y = element_blank()) + xlab("") + ylab("")
print(p)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.