Question: Complex Heatmap subscripts
0
gravatar for Seigfried
21 months ago by
Seigfried70
Seigfried70 wrote:

Hello all

I love the package 'Complex Heatmaps' to draw heatmaps in R and I quit using Heatmap.2.

However in heatmap.2, I could use something like expression(paste) to get some words as subscripts.

main = expression(paste("Log[2]","(FPKM) Values"))

Unfortunately, expression doesn't seem to work in Complex Heatmap. Any of you Gurus can help me out with this?

Error in (function (cl, name, valueClass)  :  assignment of an object of class 揺xpression?is not valid for @憂ame?in an object of class 揌eatmap? is(value, "character") is not TRUE

I just want to use subscripts in titles in Complex Heatmap. Thanks!

subscript complex heatmap • 750 views
ADD COMMENTlink modified 21 months ago • written 21 months ago by Seigfried70
1

It appears to be supported: Mathematical Expression Causes Error #113

ADD REPLYlink written 21 months ago by Kevin Blighe52k

Well, for me it works with column_title and not with name.

name = expression(log[2]~score),
column_title = expression(log[2]~score),
ADD REPLYlink written 21 months ago by Seigfried70
1

Thank you and apologies!

I got it to work in case i wanted multiple words in the subscript list(title = expression(log[hello~world]~Normalised~Values))

So I guess as usual [ ] denotes the start-end of the subscript. But I do not know why the tilde (~) is a substitute for a space

https://stackoverflow.com/questions/14976331/use-of-tilde-in-r-programming-language So it is a formula used as text?

ADD REPLYlink modified 21 months ago • written 21 months ago by Seigfried70

Yes, the tilde (~) is the space. It's not quite a formula but rather a mathematical expression.

ADD REPLYlink written 21 months ago by Kevin Blighe52k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 695 users visited in the last hour