Skip to content
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

Reduce Package Dependencies #66

Closed
DillonHammill opened this issue Jul 10, 2020 · 1 comment
Closed

Reduce Package Dependencies #66

DillonHammill opened this issue Jul 10, 2020 · 1 comment

Comments

@DillonHammill
Copy link
Owner

Now that CytoExploreR is becoming such a big package, it is time to re-consider essential dependencies to make room for supporting other cytometry packages. The following packages should be removed as dependencies:

tibble

  • tibble package is currently required for cyto_stats_compute() but is not necessary - this should be removed as a dependency as described in integral of a histogram #32.

tools

  • only use very minor file management functions that can be directly added to CytoExploreR - file_ext() and file_ext_remove().

purrr

  • only used to transpose list objects - would be better if we had an internal wrapper in CytoExploreR - transpose_list(). It may be slower but at least it will perform consistently without the extra dependency.

magrittr

  • pipe operator is being imported by three different packages rhandsontable, dplyr and magrittr - sticking to dplyr would allow removal of magrittr.

gtools

  • only used to sort filenames for loading, perhaps we can add the mixedsort function to the CytoExploreR utilites and remove gtools as a dependency.

superheat

  • CytoExploreR will eventually use HeatmapR to construct all heatmaps so this will replace the superheat import.

I will work on this while I finish the plethora of updates coming to the next version of CytoExploreR.

@DillonHammill
Copy link
Owner Author

Revisiting this issue in preparation for the release of CytoExploreR version 2.0.0.

With the new cyto_require() function we have managed to reduce the dependencies by a total of 7 packages (once superheat is removed). This is pretty amazing considering the amount of new features added to this version.

In terms of new imports, we have only added KernSmooth which is used in cyto_stat_bkde2d() and within cyto_plot() to plot points. We could load this with cyto_require() but this is be inefficient to do every time we want to plot something.

In terms of imports that could still potentially be removed, MASS is only imported for its rlm() which is used by autospill and cyto_plot_compensation() - perhaps we could use cyto_require() here instead (it may be challenging to pass models through this API though). We have also reduced BiocGenerics imports to colnames() only but this is required by functions like cyto_channels(). The only other single import package in purrr() for its transpose() function which is used in a few places throughout the code - I think the speed improvement here is worth the import. Oh and of course the robustbase import is now reduced to only importing colMedians() which is used within cyto_stat_median().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant