-
Notifications
You must be signed in to change notification settings - Fork 2
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
Revisit the facet umap function #637
Comments
We should also figure out if we really do or do not want |
In my opinion, we probably should lump submitter annotations for these plots too (move the lumping code into this function?). For the text length problem, we may be able to solve it with modifying legend placement to something like:
This assumes that the individual plots are square-ish, and there are 8 of them, arranged in a 3x3 grid which we should be trying to achieve. |
I think we do, in general, but it will require that we get the dimensions of the plot as a whole to match: if we do 3X3, we need the plot to be pretty square. If we have more than the 8 plots, then we will need a matching aspect ratio (and to deal with the legend differently). One other option is to move some of the theme settings back out of the function that we are using... We can always add them back on a per-plot basis.
|
Noting that I was wrong - we do already lump submitter cell types; it's just that my brain was toast the day before break 😬 . The code lumps/mutates at So, we'll want to count the final number of cell types and determine appropriate layout from there to achieve some kind of 3x3 grid. I might vote something like this for N<=8, where dashed-line boxes are panels that may or may not be there depending on the actual N, and the lines with pink dots are legends. The yellow text is a loose concept of where to place the legend - Extrapolating, we can use
The only time things would get out of handle with a 3-column layout is if there are a lot of clusters. Perhaps we cap the situation at like N=15, and change the ncol for anything bigger than that? I'll note also I previously brought up the idea that we might not need a legend at all since the facets are all labeled anyways. This was nixed at the time, but maybe it's more of a contender now? Note I also intend to use Tagging @allyhawkins @jashapiro for post-winter-break thoughts! |
This approach seems reasonable to me.
I think we had decided that we would use N = 7 for lumping? That's our default and we don't actually change it in the workflow so I would not anticipate having any more than 7 cell types + 1 for all other cell types in any of the UMAPs. If you really wanted to be careful we could add a check to the
I also would be okay with removing the legend. The reason I do like having it is because the colors are different for each cell type so then users would know what color is expected in that panel. |
Yes - n=7 for lumping but then the extra "all other cell types" brings us to 8 total. I think we're saying the same thing? |
Yes, we are. But I don't know why we would ever have a scenario with N=15. |
It definitely wouldn't happen with cell types, but possibly with clusters. EDIT: Ah, nope! We don't use the facet function for clusters. So indeed it wouldn't happen!! |
@jashapiro and I had a quick chat about this on Slack. Notes -
|
Closed by #644 |
See original comment: #635 (comment)
The legend placement is not sufficiently general for the plots we'll be using it for, so we'll need to revisit this code.
The text was updated successfully, but these errors were encountered: