-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fix color control of plotScoreHeatmap when 'normalize=TRUE' #259
Conversation
Double-checked other pheatmap inputs that we explicitly touch in the function. All the ones already recorded as inputs are good now, but there 3 currently touched "siltently": breaks, legend_breaks, legend_labels. If I remember correctly, the plan was to give all of these as explicit inputs so that they could be documented for the user, and I've done that in my last commit. Also, I might need to rely on you @LTLA to get the updated man pages built. I'm having a bit of trouble getting a proper SingleR dev environment set up at the moment. (Bioconductor hosted devel docker image fails at installing Rcpp, so... can't install SingleR or SingleR deps.) Still working on a solution here, but I can't run |
LGTM, I just did some minor editing of the doc strings. |
I'm just going to merge and ignore the CI issues; can't do much about those. |
default_legend_breaks <- c(-abs.max, abs.max, length.out = 3) | ||
default_legend_breaks <- c(-abs.max, abs.max) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, your bugfix here went the opposite way of what I'd have intended to do. I would have left the length.out and swapped back to the original seq()
had I caught it....
Ultimately though, 🤷, new version just removes a middle label in the legend, which was always at zero. Now only the ends of the legend will be labeled but that's totally fine!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, I was wondering which way it should go. Ended up just flipping a coin in my head.
Per #197
Bug Fix: This PR ensures that when users supply their own
color
map to theplotScoreHeatmap()
function, it will be used regardless of whethernormalize
was set toTRUE
.New Feature: Also gives users expanded control over their legend by newly allowing override of SingleR's default strategies for filling the pheatmap inputs
breaks
,legend_breaks
, andlegend_labels
.ToDo: