ImmuneDynamics / Spectre

A computational toolkit in R for the integration, exploration, and analysis of high-dimensional single-cell cytometry and imaging data.
https://immunedynamics.github.io/spectre/
MIT License
56 stars 21 forks source link

geom_point to geom_pointdensity in fast.colour.plot #158

Closed sirclockalot closed 1 year ago

sirclockalot commented 1 year ago

To the attention of @tomashhurst

Changed the ggpointdensity::geom_point to ggpointdensity::geom_pointdensity as this was giving the error 'Error: 'geom_point' is not an exported object from 'namespace:ggpointdensity''

Issue: Ran into the error 'Error: 'geom_point' is not an exported object from 'namespace:ggpointdensity' when running Spectre::fast.colour.plot().

Packages: Spectre development (1.0.0-0), ggplot2 (3.4.2)

Testing: Minimal testing on my own data.

Documentation: Not required

Vignette: No changes or additions required

Verbose Description: Was using the development version of Spectre to access truncate_max_range = FALSE in Spectre::read.files and came across the Spectre::fast.colour.plot function. When attempting to use it the above mentioned error was given. I substituted ggpointdensity::geom_point for ggpointdensity::geom_pointdensity which used in make.colour.plot. This solved the issue. I have little experience with pull request, so feel free to ignore. Please suggest what unit tests would be appropriate in this case. All the best.

ghar1821 commented 1 year ago

Thanks for spotting and fixing this @sirclockalot. For unit testing, I guess the most basic way to test functions which create plot is by creating a test which just call the function and expect no error. Unit test which does image comparison may be more trouble than worth. However, I'm all ears if there are good ways to do this.