RGLab / openCyto

A package that provides data analysis pipeline for flow cytometry.
GNU Affero General Public License v3.0
75 stars 29 forks source link

Unable to plots gates #226

Closed drpreeti3628 closed 3 years ago

drpreeti3628 commented 3 years ago

Hi,

I have used the following gating template and tried to autogate the plots using the below code.

I am getting the following error. Can you please help.

Gating template

"","alias","pop","parent","dims","gating_method","gating_args","collapseDataForGating","groupBy","preprocessing_method","preprocessing_args" "1","nonDebris","+","root","FSC-A,SSC-A","boundary","min = c(-3.5e4,-3.5e4), max=c(3.5e5,3.5e4)",NA,NA,"",NA "2","CD4Tcells_gate","+","nonDebris","V500-A-CD4","gate_mindensity","gate_range = c(9.5)",NA,NA,"",NA "3","CD8Tcells_gate","+","nonDebris","Qdot 655-A-CD8","gate_mindensity","gate_range = c(7.5)",NA,NA,"",NA "4","Tcells","+/-+/-","nonDebris","V500-A-CD4,Qdot 655-A-CD8","refGate","CD4Tcells_gate:CD8Tcells_gate",NA,NA,"",NA

code for autogated plot

pbmc_f1_gs_p2<- autoplot( pbmc_f1_gs, x = "V500-A-CD4", y = "Qdot 655-A-CD8", gate = c( "V500-A-CD4+Qdot 655-A-CD8+", "V500-A-CD4+Qdot 655-A-CD8-", "V500-A-CD4-Qdot 655-A-CD8-", "V500-A-CD4-Qdot 655-A-CD8+" ) ) + coord_cartesian(xlim = c(-10, 15), ylim = c(-12.15))

print(pbmc_f1_gs_p2)

I am getting the following error

Error in if (all(is.finite(continuous_range_coord)) && diff(continuous_range_coord) < : missing value where TRUE/FALSE needed 16. expand_limits_continuous_trans(limits, expand, coord_limits) 15. expand_limits_continuous(limits, expand, coord_limits_scale) 14. expand_limits_scale(scale, expansion, limits, coord_limits = coord_limits) 13. view_scales_from_scale(scale_y, self$limits$y, self$expand) 12. f(..., self = self) 11. self$coord$setup_panel_params(scale_x, scale_y, params = self$coord_params) 10. (function (scale_x, scale_y) { self$coord$setup_panel_params(scale_x, scale_y, params = self$coord_params) })(dots[[1L]][[1L]], dots[[2L]][[1L]]) 9. mapply(FUN = f, ..., SIMPLIFY = FALSE) 8. Map(setup_panel_params, scales_x, scales_y) 7. f(..., self = self) 6. layout$setup_panel_params() 5. ggplot_build.ggplot(x) 4. ggplot_build(x) 3. ggplot2:::print.ggplot(x) 2. print(pbmc_f1_gs_p2) 1. print(pbmc_f1_gs_p2)

drpreeti3628 commented 3 years ago

Hi,

Sorry found the issue , it was in cartesian coordinates. Please close this