SingleR-inc / SingleR

Clone of the Bioconductor repository for the SingleR package.
https://bioconductor.org/packages/devel/bioc/html/SingleR.html
GNU General Public License v3.0
173 stars 19 forks source link

Resizing plotScoreDistribution and plotScoreHeatmap plots #146

Closed yasharw closed 4 years ago

yasharw commented 4 years ago

Hi all,

I'm using plotScoreDistribution and plotScoreHeatmap to visualize the SingleR scores on my dataset. However, as I am using SingleR fine labels for labeling my clusters, I have >30 cell labels, which is crowding the outputs of these functions. Usually, I can fix this with packages like pheatmap by specifying the height and width of the output. However, I can't find these arguments with these two functions.

integrated_predicted_cell_types_blueprint_encode.pdf score_distribution_blueprint_encode.pdf

Thank you!

dtm2451 commented 4 years ago

For plotScoreHeatmap, this function is essentially a wrapper around pheatmap and we made it so that typical pheatmap inputs can be provided in your plotScoreHeatmap() call. So, as mentioned in the ... entry in ?plotScoreHeatmap, you can provide the relevant pheatmap inputs and these will get passed through to the eventual pheatmap call.

For plotScoreDistribution, depending on inputs, the basic output is either a pure ggplot object or a list of pure ggplot objects. So the method for resizing is not specific to SingleR functions. You should be able to adjust the size by adjusting the size of your plot window, or by using the inputs whatever function you are using to save the plot.