Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plotScoreHeatmap color parameter #197

Open
alanaleah89 opened this issue Jul 15, 2021 · 8 comments
Open

plotScoreHeatmap color parameter #197

alanaleah89 opened this issue Jul 15, 2021 · 8 comments

Comments

@alanaleah89
Copy link

Hi there,

I would like to use my own colour scheme for SingleRs heatmap. I think there may be a bug in the plotScoreHeatmap method.
When I execute the following code I get the same color scheme as the default.
plotScoreHeatmap(p.abx, color = (grDevices::colorRampPalette(c('#f1a340','#f7f7f7','#998ec3')))(100))
p abx
However, if I execute the same code with normalize = F, I get the color scheme I want but I would also like my data normalised.
plotScoreHeatmap(p.abx, color = (grDevices::colorRampPalette(c('#f1a340','#f7f7f7','#998ec3')))(100), normalize = F)
p abx

@LTLA
Copy link
Collaborator

LTLA commented Jul 19, 2021

@dtm2451 can you have a look at this?

@dtm2451
Copy link
Collaborator

dtm2451 commented Jul 19, 2021

Yes, yes. Sorry for the delay.. back from a long vacation today!

I know where this is from and can definitely address it this week if we want to @LTLA. My only concern is that it doesn't necessarily make sense for a user to use a bipolar color scale for the normalized data. I can't remember if we had kept the colors out of a users hands on purpose when normalize = TRUE. But it would feel like a bug to users anyway. I'll make a PR for this (and any other pheatmap inputs that may be overridden internally, if there are any).

@LTLA
Copy link
Collaborator

LTLA commented Jul 20, 2021

Right... yeah, I guess we should at least respond to the user-supplied color when normalize=TRUE, and it's on the user to make sure they choose a sensible color scale. In this case, a bidirectional one probably doesn't make a lot of sense, but I suppose someone might prefer something other than viridis (gasp), in which case we should support that.

@IreneP19
Copy link

IreneP19 commented Feb 2, 2023

Hi, has anyone fixed this?
I have the same problem. Changing color scale does not work when normalize = T.

Thanks!

@lindaboshans
Copy link

Following up on this. I also can not use custom colors when normalize is set to T.

@LTLA
Copy link
Collaborator

LTLA commented Jan 2, 2024

@dtm2451 did we decide what to do here?

@dtm2451
Copy link
Collaborator

dtm2451 commented Jan 2, 2024

Thanks for the bump @lindaboshans.
@LTLA looks to me above like we decided to give users this control, and leave it to them to pick a color scale that makes sense. ...I just forgot to do so. Starting this work now!

@LTLA
Copy link
Collaborator

LTLA commented Jan 6, 2024

Pushed to 2.4.1, should be available in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants