DillonHammill / CytoExploreR

Interactive Cytometry Data Analysis
61 stars 13 forks source link

cyto_sample not working with cytosets/cytoframes #84

Closed DillonHammill closed 4 years ago

DillonHammill commented 4 years ago

Looks like there is a lingering x@exprs in cyto_sample() which is causing cyto_sample() to bypass the sampling process. This means that the display argument in cyto_plot() is currently not working. This issue will only be apparent for users with the latest versions of the RGLab packages. To see if your CytoExploreR requires updating try the following code:

library(CytoExploreR)
library(CytoExploreRData)
gs <- GatingSet(Activation)
cs <- cyto_extract(gs, "root") # 50000 events each
cs <- cyto_sample(cs, 10000)
cyto_stats_compute(cs, stat = "count")

If your counts are all 50000 events after sampling, you will need to update your CytoExploreR to fix this issue:

devtools::install_github("DillonHammill/CytoExploreR")

This also affects cyto_convert() which will be completely re-written or removed in the next version of CytoExploreR. I have also made the appropriate fixes for this to master branch in case it affects any of the other code.

I also found another x@exprs within cyto_plot() which I have also fixed so that things work as expected until the next release.

Hopefully this is last of the changes required to cover cytoframes/cytosets.