gplots

Error while creating heatmaps - NA/NaN/Inf in foreign function call (arg 11)

本小妞迷上赌 提交于 2019-12-23 09:03:09
问题 I'm trying to prepare heatmap for my data but I have no idea why this error appears. My data: > dput(head(tbl_ready)) structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.370330677123077, 0, 0, 0, 0, 0, 0.53318856142826, 0, 0, 0, 0, 0, 0.217669675587482, 0, 0, 0, 0.79337589572453, 0, 1, 0.0132525790616207, 0, 0, 1, 0.498415470211292, 0.216961707575178, 0.0646831352678839, 0, 0, 0, 0.778625047514492, 0.165974546372072, 0.076951015613392, 0.889894091237216, 0, 0, 1, 0.129806153151281, 0

reduce width of columns on a heatmap.2 plot

*爱你&永不变心* 提交于 2019-12-23 06:35:09
问题 I have a 331*9 double matrix (named expr001). It looks like this: row.names Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 17211382 7.397439 7.377975 7.299997 8.192889 8.292300 8.092921 8.178948 8.120986 8.276824 17211752 9.115307 9.116741 9.113366 8.423073 8.458392 8.573309 8.773752 8.614159 8.592105 17212229 5.968911 6.060437 6.059898 5.595364 5.471327 5.538794 5.584753 5.518935 5.498830 17215629 8.641765 8.810358 8.770533 7.482992 7.732727 7.811839 8.582255 8.404402 8.357516 17215820 11

Making a heatmap in R varying both color and transparency

孤人 提交于 2019-12-13 06:54:23
问题 Is it possible to generate a heatmap taking into consideration both the color and the transparency, with these two parameters given from two different matrices (matrix 1 defines color, matrix 2 defines alpha)? A little more information on what I'm after: I have successfully used R and the heatmap.2 function in the gplots package to generate heatmaps - in this case to visualize miRNA interactions. Here, what I want to show is the probability of a particular nucleotide along the typical 20-24

Colour specific node in igraph

感情迁移 提交于 2019-12-11 04:39:01
问题 I am trying to colour node 6 and 7 regardless of whatever letter is selected from object 'd'. g <- graph_from_literal(1:2:3:4:5 -- 6:7) # Rename (sum up all the vertices) d <- c("a", "b", "c", "d", "e", "f", "g","h", "i", "j") V(g)$name <- sample(d, 7, replace=TRUE) colours <- c("red") V(g)$color <- ifelse(V(g)$name == c('a','e'), "white", colours) plot.igraph(g, layout=layout_with_dh, vertex.label=V(g)$name, vertex.size=35, vertex.color=V(g)$color, #colors.r vertex.label.cex=0.7, ) I tried

R: Weighted Joyplot/Ridgeplot/Density Plot?

五迷三道 提交于 2019-12-04 05:22:31
问题 I am trying to create a joyplot using the ggridges package (based on ggplot2 ). The general idea is that a joyplot creates nicely scaled stacked density plots. However, I cannot seem to produce one of these using weighted density. Is there some way of incorporating sampling weights (for weighted density) in the calculation of the densities in the creation of a joyplot? Here's a link to the documentation for the ggridges package: https://cran.r-project.org/web/packages/ggridges/ggridges.pdf I

Moving color key in R heatmap.2 (function of gplots package)

廉价感情. 提交于 2019-11-27 03:34:57
I read the heatmap.2 help manual a couple of times now, and also in various online tutorials I didn't read about a way to move the color key to a different position. Now, I am wondering if it is even possible? The color key is in the upper left corner by default if you are using the heatmap.2 function from the gplots package. The position of each element in the heatmap.2 plot can be controlled using the lmat , lhei and lwid parameters. These are passed by heatmap.2 to the layout command as: layout(mat = lmat, widths = lwid, heights = lhei) lmat is a matrix describing how the screen is to be

Moving color key in R heatmap.2 (function of gplots package)

≯℡__Kan透↙ 提交于 2019-11-26 12:11:21
问题 I read the heatmap.2 help manual a couple of times now, and also in various online tutorials I didn\'t read about a way to move the color key to a different position. Now, I am wondering if it is even possible? The color key is in the upper left corner by default if you are using the heatmap.2 function from the gplots package. 回答1: The position of each element in the heatmap.2 plot can be controlled using the lmat , lhei and lwid parameters. These are passed by heatmap.2 to the layout command