CytoExploreR icon indicating copy to clipboard operation
CytoExploreR copied to clipboard

cyto_plot_gating_scheme.R

Open baj12 opened this issue 2 years ago • 0 comments

The index "x" is not referencing the same object within the function as it is supposed to be. unique(gt_gates[, c("xchannel", "channel")]) is not the same as unique(gt_gates[, "xchannel"])

cyto_plot_gating_scheme.R

around line 384

should be:

      # Parent may have gates in different channels
      # construct a plot for each channel set
      lapply(seq(1, nrow(unique(gt_gates[, c("xchannel", "ychannel")]))), 
             function(x) {
        parent <- as.character(parents)
        xchannel <- as.character(unique(gt_gates[, c("xchannel", "ychannel")])[x,1])
        ychannel <- as.character(unique(gt_gates[, c("xchannel", "ychannel")])[x,2])

is now:

      # Parent may have gates in different channels
      # construct a plot for each channel set
      lapply(seq(1, nrow(unique(gt_gates[, c("xchannel", "ychannel")]))), 
             function(x) {
        parent <- as.character(parents)
        xchannel <- as.character(unique(gt_gates[, "xchannel"])[x])
        ychannel <- as.character(unique(gt_gates[, "ychannel"])[x])

baj12 avatar Aug 29 '22 06:08 baj12