CytoExploreR
CytoExploreR copied to clipboard
cyto_plot_gating_scheme.R
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])