Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I thought I would give a shot at contributing to this awesome tool! I added a function to Scanpy's plotting API that I use in my own research for creating stacked barplots for visualizing compositions of cell groups. An example is depicted below:
Specifically, this function enables one to plot the fraction of each cell group (e.g., cluster) that are labelled with a specific categorical variable. For example, if the cell groups are clusters, then one might be interested in examining the fraction of each cluster that originates from each "batch" of cells or each patient sample.
This function also enables ordering of the groups according to a specific value (e.g., a patient number or batch ID) or by agglomerative clustering. An example of ordering the groups based on agglomerative clustering is shown below:
The function supplies an argument to specify whether the dendrogram should or should not be plotted.
Please let me know if this feature is of interest and if so, what else needs to be adjusted or fixed prior to merging. Thanks!
Matt