0

I have received codes from other lab using the following line:

image(plot_bm.mat, col = mycol, axes = F, useRaster = T, zlim = c(z.lim[1], z.lim[2]))

in which mycol <- colItay(seq(0,1,0.01))[30:100].

The resulting image is

this

I cannot find the function colItay. Could someone please explain to me what this is?

MLavoie
  • 9,671
  • 41
  • 36
  • 56
  • It looks like a custom function. Can you add a reproducible sample? Refer https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Mohanasundaram May 03 '20 at 10:22
  • As colItay is called for col=, i believe that it is a color spectrum ranging between 0 and 1 with the precision of two decimals and here out of the 100, 61 are selected and called in image(0 – Mohanasundaram May 03 '20 at 10:35
  • Thank you for your reply. Unfortunately i dont' have a reproducible sample. I only have a matrix of gene expression. the reason for not having the reproducible sample is because of the colItay cannot be run on my computer and the source code does not contain how this function is written. now I simply want to bypass this. how do i create the image without using colItay? or to say is there a way to create a color spectrum using colorRampPalette() that can achieve a mycol so that i can run the image function? – Atom Wang May 03 '20 at 16:37
  • Refer this manual on heatmap3 package https://rdrr.io/cran/heatmap3/man/colByValue.html to set the mycol. For example, library(heatmap3) temp<-rnorm(1000) mycol <- colByValue(temp,col=colorRampPalette(c('chartreuse4','white','firebrick'))(5), breaks=c(-5,-1,-0.1,0.1,1,5),cex.axis=0.8) – Mohanasundaram May 04 '20 at 04:22
  • As you said, you can also assign mycol <- colorRampPalette(c("blue", "yellow", "red"))(n = 70) – Mohanasundaram May 04 '20 at 07:21

0 Answers0