Closed northNomad closed 3 years ago
Seems like a general issue to density_xxx
###SAME CODE AS ABOVE
+ density_fill_alpha = 0,
+ density_line_width = 2
+ )
Error in fr_dens_list[[1]]$y : $ operator is invalid for atomic vectors
Figured it out, I had a new .fcs with no events in a gate. Apologize for the confusion.
@northNomad, cyto_plot()
should handle empty samples, so I would still like to fix this. Do you mind posting the output of traceback()
after running the problematic code?
@northNomad,
cyto_plot()
should handle empty samples, so I would still like to fix this. Do you mind posting the output oftraceback()
after running the problematic code?
@DillonHammill Thanks Dillon
Error in fr_dens_list[[1]]$y : $ operator is invalid for atomic vectors
> traceback()
13: paste(0, max(fr_dens_list[[1]]$y), sep = "-")
12: .cyto_density.list(fr_list, channel = channels, smooth = density_smooth,
modal = density_modal, stack = density_stack)
11: .cyto_density(fr_list, channel = channels, smooth = density_smooth,
modal = density_modal, stack = density_stack)
10: withCallingHandlers(expr, message = function(c) if (inherits(c,
classes)) tryInvokeRestart("muffleMessage"))
9: suppressMessages(.cyto_density(fr_list, channel = channels, smooth = density_smooth,
modal = density_modal, stack = density_stack))
8: cyto_plot.flowFrame(x[[1]], channels = channels, overlay = overlay,
gate = gate, axes_trans = axes_trans, axes_limits = axes_limits,
display = display, margins = margins, popup = FALSE, xlim = xlim,
ylim = ylim, xlab = xlab, ylab = ylab, title = title, negate = negate,
title_text_font = title_text_font, title_text_size = title_text_size,
title_text_col = title_text_col, density_modal = density_modal,
density_smooth = density_smooth, density_stack = density_stack,
density_cols = density_cols, density_fill = density_fill,
density_fill_alpha = density_fill_alpha, density_line_type = density_line_type,
density_line_width = density_line_width, density_line_col = density_line_col,
point_shape = point_shape, point_size = point_size, point_col_scale = point_col_scale,
point_cols = point_cols, point_col = point_col, point_col_alpha = point_col_alpha,
contour_lines = contour_lines, contour_line_type = contour_line_type,
contour_line_width = contour_line_width, contour_line_col = contour_line_col,
contour_line_alpha = contour_line_alpha, axes_text = axes_text,
axes_text_font = axes_text_font, axes_text_size = axes_text_size,
axes_text_col = axes_text_col, axes_label_text_font = axes_label_text_font,
axes_label_text_size = axes_label_text_size, axes_label_text_col = axes_label_text_col,
legend = legend, legend_text = legend_text, legend_text_font = legend_text_font,
legend_text_size = legend_text_size, legend_text_col = legend_text_col,
legend_line_type = legend_line_type, legend_line_width = legend_line_width,
legend_line_col = legend_line_col, legend_box_fill = legend_box_fill,
legend_point_col = legend_point_col, gate_line_type = gate_line_type,
gate_line_width = gate_line_width, gate_line_col = gate_line_col,
gate_fill = gate_fill, gate_fill_alpha = gate_fill_alpha,
label = label, label_text = label_text, label_stat = label_stat,
label_position = label_position, label_text_x = label_text_x,
label_text_y = label_text_y, label_text_font = label_text_font,
label_text_size = label_text_size, label_text_col = label_text_col,
label_fill = label_fill, label_fill_alpha = label_fill_alpha,
border_line_type = border_line_type, border_line_width = border_line_width,
border_line_col = border_line_col, border_fill = border_fill,
border_fill_alpha = border_fill_alpha)
7: cyto_plot(x[[1]], channels = channels, overlay = overlay, gate = gate,
axes_trans = axes_trans, axes_limits = axes_limits, display = display,
margins = margins, popup = FALSE, xlim = xlim, ylim = ylim,
xlab = xlab, ylab = ylab, title = title, negate = negate,
title_text_font = title_text_font, title_text_size = title_text_size,
title_text_col = title_text_col, density_modal = density_modal,
density_smooth = density_smooth, density_stack = density_stack,
density_cols = density_cols, density_fill = density_fill,
density_fill_alpha = density_fill_alpha, density_line_type = density_line_type,
density_line_width = density_line_width, density_line_col = density_line_col,
point_shape = point_shape, point_size = point_size, point_col_scale = point_col_scale,
point_cols = point_cols, point_col = point_col, point_col_alpha = point_col_alpha,
contour_lines = contour_lines, contour_line_type = contour_line_type,
contour_line_width = contour_line_width, contour_line_col = contour_line_col,
contour_line_alpha = contour_line_alpha, axes_text = axes_text,
axes_text_font = axes_text_font, axes_text_size = axes_text_size,
axes_text_col = axes_text_col, axes_label_text_font = axes_label_text_font,
axes_label_text_size = axes_label_text_size, axes_label_text_col = axes_label_text_col,
legend = legend, legend_text = legend_text, legend_text_font = legend_text_font,
legend_text_size = legend_text_size, legend_text_col = legend_text_col,
legend_line_type = legend_line_type, legend_line_width = legend_line_width,
legend_line_col = legend_line_col, legend_box_fill = legend_box_fill,
legend_point_col = legend_point_col, gate_line_type = gate_line_type,
gate_line_width = gate_line_width, gate_line_col = gate_line_col,
gate_fill = gate_fill, gate_fill_alpha = gate_fill_alpha,
label = label, label_text = label_text, label_stat = label_stat,
label_position = label_position, label_text_x = label_text_x,
label_text_y = label_text_y, label_text_font = label_text_font,
label_text_size = label_text_size, label_text_col = label_text_col,
label_fill = label_fill, label_fill_alpha = label_fill_alpha,
border_line_type = border_line_type, border_line_width = border_line_width,
border_line_col = border_line_col, border_fill = border_fill,
border_fill_alpha = border_fill_alpha)
6: (function (x, gate, axes_limits, display, xlab, ylab, title,
title_text_font, title_text_size, title_text_col, density_modal,
density_smooth, density_stack, density_fill, density_fill_alpha,
density_line_type, density_line_width, density_line_col,
point_shape, point_size, point_col, point_col_alpha, contour_lines,
contour_line_type, contour_line_width, contour_line_col,
contour_line_alpha, axes_text, axes_text_font, axes_text_size,
axes_text_col, axes_label_text_font, axes_label_text_size,
axes_label_text_col, legend, legend_text, legend_text_font,
legend_text_size, legend_text_col, legend_line_type, legend_line_width,
legend_line_col, legend_box_fill, legend_point_col, gate_line_type,
gate_line_width, gate_line_col, gate_fill, gate_fill_alpha,
label, label_text, label_stat, label_position, label_text_x,
label_text_y, label_text_font, label_text_size, label_text_col,
label_fill, label_fill_alpha, border_line_type, border_line_width,
border_line_col, border_fill, border_fill_alpha)
{
cnt <<- cnt + 1
if (length(x) > 1) {
overlay <- x[seq(2, length(x), 1)]
}
else {
overlay <- NA
}
cyto_plot(x[[1]], channels = channels, overlay = overlay,
gate = gate, axes_trans = axes_trans, axes_limits = axes_limits,
display = display, margins = margins, popup = FALSE,
xlim = xlim, ylim = ylim, xlab = xlab, ylab = ylab, title = title,
negate = negate, title_text_font = title_text_font, title_text_size = title_text_size,
title_text_col = title_text_col, density_modal = density_modal,
density_smooth = density_smooth, density_stack = density_stack,
density_cols = density_cols, density_fill = density_fill,
density_fill_alpha = density_fill_alpha, density_line_type = density_line_type,
density_line_width = density_line_width, density_line_col = density_line_col,
point_shape = point_shape, point_size = point_size, point_col_scale = point_col_scale,
point_cols = point_cols, point_col = point_col, point_col_alpha = point_col_alpha,
contour_lines = contour_lines, contour_line_type = contour_line_type,
contour_line_width = contour_line_width, contour_line_col = contour_line_col,
contour_line_alpha = contour_line_alpha, axes_text = axes_text,
axes_text_font = axes_text_font, axes_text_size = axes_text_size,
axes_text_col = axes_text_col, axes_label_text_font = axes_label_text_font,
axes_label_text_size = axes_label_text_size, axes_label_text_col = axes_label_text_col,
legend = legend, legend_text = legend_text, legend_text_font = legend_text_font,
legend_text_size = legend_text_size, legend_text_col = legend_text_col,
legend_line_type = legend_line_type, legend_line_width = legend_line_width,
legend_line_col = legend_line_col, legend_box_fill = legend_box_fill,
legend_point_col = legend_point_col, gate_line_type = gate_line_type,
gate_line_width = gate_line_width, gate_line_col = gate_line_col,
gate_fill = gate_fill, gate_fill_alpha = gate_fill_alpha,
label = label, label_text = label_text, label_stat = label_stat,
label_position = label_position, label_text_x = label_text_x,
label_text_y = label_text_y, label_text_font = label_text_font,
label_text_size = label_text_size, label_text_col = label_text_col,
label_fill = label_fill, label_fill_alpha = label_fill_alpha,
border_line_type = border_line_type, border_line_width = border_line_width,
border_line_col = border_line_col, border_fill = border_fill,
border_fill_alpha = border_fill_alpha)
if (cnt%%np == 0 | cnt == length(fr_list)) {
if (getOption("cyto_plot_method") == "flowSet") {
p <- cyto_plot_record()
}
else {
p <- NULL
}
}
else {
p <- NULL
}
if (popup == TRUE & cnt%%np == 0 & length(fr_list) > cnt) {
cyto_plot_new(popup = popup)
par(mfrow = layout)
}
return(p)
})(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]], dots[[4L]][[1L]],
dots[[5L]][[1L]], dots[[6L]][[1L]], dots[[7L]][[1L]], dots[[8L]][[1L]],
dots[[9L]][[1L]], dots[[10L]][[1L]], dots[[11L]][[1L]], dots[[12L]][[1L]],
dots[[13L]][[1L]], dots[[14L]][[1L]], dots[[15L]][[1L]],
dots[[16L]][[1L]], dots[[17L]][[1L]], dots[[18L]][[1L]],
dots[[19L]][[1L]], dots[[20L]][[1L]], dots[[21L]][[1L]],
dots[[22L]][[1L]], dots[[23L]][[1L]], dots[[24L]][[1L]],
dots[[25L]][[1L]], dots[[26L]][[1L]], dots[[27L]][[1L]],
dots[[28L]][[1L]], dots[[29L]][[1L]], dots[[30L]][[1L]],
dots[[31L]][[1L]], dots[[32L]][[1L]], dots[[33L]][[1L]],
dots[[34L]][[1L]], dots[[35L]][[1L]], dots[[36L]][[1L]],
dots[[37L]][[1L]], dots[[38L]][[1L]], dots[[39L]][[1L]],
dots[[40L]][[1L]], dots[[41L]][[1L]], dots[[42L]][[1L]],
dots[[43L]][[1L]], dots[[44L]][[1L]], dots[[45L]][[1L]],
dots[[46L]][[1L]], dots[[47L]][[1L]], dots[[48L]][[1L]],
dots[[49L]][[1L]], dots[[50L]][[1L]], dots[[51L]][[1L]],
dots[[52L]][[1L]], dots[[53L]][[1L]], dots[[54L]][[1L]],
dots[[55L]][[1L]], dots[[56L]][[1L]], dots[[57L]][[1L]],
dots[[58L]][[1L]], dots[[59L]][[1L]], dots[[60L]][[1L]],
dots[[61L]][[1L]], dots[[62L]][[1L]], dots[[63L]][[1L]],
dots[[64L]][[1L]], dots[[65L]][[1L]])
5: mapply(function(x, gate, axes_limits, display, xlab, ylab, title,
title_text_font, title_text_size, title_text_col, density_modal,
density_smooth, density_stack, density_fill, density_fill_alpha,
density_line_type, density_line_width, density_line_col,
point_shape, point_size, point_col, point_col_alpha, contour_lines,
contour_line_type, contour_line_width, contour_line_col,
contour_line_alpha, axes_text, axes_text_font, axes_text_size,
axes_text_col, axes_label_text_font, axes_label_text_size,
axes_label_text_col, legend, legend_text, legend_text_font,
legend_text_size, legend_text_col, legend_line_type, legend_line_width,
legend_line_col, legend_box_fill, legend_point_col, gate_line_type,
gate_line_width, gate_line_col, gate_fill, gate_fill_alpha,
label, label_text, label_stat, label_position, label_text_x,
label_text_y, label_text_font, label_text_size, label_text_col,
label_fill, label_fill_alpha, border_line_type, border_line_width,
border_line_col, border_fill, border_fill_alpha) {
cnt <<- cnt + 1
if (length(x) > 1) {
overlay <- x[seq(2, length(x), 1)]
}
else {
overlay <- NA
}
cyto_plot(x[[1]], channels = channels, overlay = overlay,
gate = gate, axes_trans = axes_trans, axes_limits = axes_limits,
display = display, margins = margins, popup = FALSE,
xlim = xlim, ylim = ylim, xlab = xlab, ylab = ylab, title = title,
negate = negate, title_text_font = title_text_font, title_text_size = title_text_size,
title_text_col = title_text_col, density_modal = density_modal,
density_smooth = density_smooth, density_stack = density_stack,
density_cols = density_cols, density_fill = density_fill,
density_fill_alpha = density_fill_alpha, density_line_type = density_line_type,
density_line_width = density_line_width, density_line_col = density_line_col,
point_shape = point_shape, point_size = point_size, point_col_scale = point_col_scale,
point_cols = point_cols, point_col = point_col, point_col_alpha = point_col_alpha,
contour_lines = contour_lines, contour_line_type = contour_line_type,
contour_line_width = contour_line_width, contour_line_col = contour_line_col,
contour_line_alpha = contour_line_alpha, axes_text = axes_text,
axes_text_font = axes_text_font, axes_text_size = axes_text_size,
axes_text_col = axes_text_col, axes_label_text_font = axes_label_text_font,
axes_label_text_size = axes_label_text_size, axes_label_text_col = axes_label_text_col,
legend = legend, legend_text = legend_text, legend_text_font = legend_text_font,
legend_text_size = legend_text_size, legend_text_col = legend_text_col,
legend_line_type = legend_line_type, legend_line_width = legend_line_width,
legend_line_col = legend_line_col, legend_box_fill = legend_box_fill,
legend_point_col = legend_point_col, gate_line_type = gate_line_type,
gate_line_width = gate_line_width, gate_line_col = gate_line_col,
gate_fill = gate_fill, gate_fill_alpha = gate_fill_alpha,
label = label, label_text = label_text, label_stat = label_stat,
label_position = label_position, label_text_x = label_text_x,
label_text_y = label_text_y, label_text_font = label_text_font,
label_text_size = label_text_size, label_text_col = label_text_col,
label_fill = label_fill, label_fill_alpha = label_fill_alpha,
border_line_type = border_line_type, border_line_width = border_line_width,
border_line_col = border_line_col, border_fill = border_fill,
border_fill_alpha = border_fill_alpha)
if (cnt%%np == 0 | cnt == length(fr_list)) {
if (getOption("cyto_plot_method") == "flowSet") {
p <- cyto_plot_record()
}
else {
p <- NULL
}
}
else {
p <- NULL
}
if (popup == TRUE & cnt%%np == 0 & length(fr_list) > cnt) {
cyto_plot_new(popup = popup)
par(mfrow = layout)
}
return(p)
}, fr_list, gate, axes_limits, display, xlab, ylab, title, title_text_font,
title_text_size, title_text_col, density_modal, density_smooth,
density_stack, density_fill, density_fill_alpha, density_line_type,
density_line_width, density_line_col, point_shape, point_size,
point_col, point_col_alpha, contour_lines, contour_line_type,
contour_line_width, contour_line_col, contour_line_alpha,
axes_text, axes_text_font, axes_text_size, axes_text_col,
axes_label_text_font, axes_label_text_size, axes_label_text_col,
legend, legend_text, legend_text_font, legend_text_size,
legend_text_col, legend_line_type, legend_line_width, legend_line_col,
legend_box_fill, legend_point_col, gate_line_type, gate_line_width,
gate_line_col, gate_fill, gate_fill_alpha, label, label_text,
label_stat, label_position, label_text_x, label_text_y, label_text_font,
label_text_size, label_text_col, label_fill, label_fill_alpha,
border_line_type, border_line_width, border_line_col, border_fill,
border_fill_alpha)
4: cyto_plot.flowSet(x = new("cytoset", pointer = <pointer: 0x0000025958371550>,
frames = <environment>, phenoData = new("AnnotatedDataFrame",
varMetadata = structure(list(labelDescription = character(0)), row.names = character(0), class = "data.frame"),
data = structure(list(), .Names = character(0), row.names = integer(0), class = "data.frame"),
dimLabels = c("rowNames", "columnNames"), .__classVersion__ = new("Versions",
.Data = list(c(1L, 1L, 0L))))), channels = "FL2-H",
axes_trans = structure(list(`FL1-A` = structure(list(name = "flowJo_logicle",
transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL1-H` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL2-A` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL2-H` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL4-A` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL4-H` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL5-A` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL5-H` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL7-A` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL7-H` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL8-A` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL8-H` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL9-A` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans"), `FL9-H` = structure(list(
name = "flowJo_logicle", transform = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), FALSE), type = "logicle"),
inverse = structure(function (x)
x <- logicle_transform(as.double(x), as.double(t), as.double(w),
as.double(m), as.double(a), TRUE), type = "logicle"),
breaks = function (x)
{
flow_breaks(x, n = n, equal.space = equal.space,
trans.fun, inverse.fun)
}, minor_breaks = function (b, limits, n)
{
b <- b[!is.na(b)]
if (length(b) < 2)
return()
bd <- diff(b)[1]
if (!reverse) {
if (min(limits) < min(b))
b <- c(b[1] - bd, b)
if (max(limits) > max(b))
b <- c(b, b[length(b)] + bd)
}
else {
if (max(limits) > max(b))
b <- c(b[1] - bd, b)
if (min(limits) < min(b))
b <- c(b, b[length(b)] + bd)
}
seq_between <- function(a, b) {
seq(a, b, length.out = n + 1)[-(n + 1)]
}
breaks <- unlist(Map(seq_between, b[-length(b)],
b[-1]))
breaks <- c(breaks, b[length(b)])
breaks
}, format = function (x)
{
pretty10exp(as.numeric(x), drop.1 = TRUE)
}, domain = c(-Inf, Inf)), class = "trans")), class = c("transformerList",
"list")), group_by = list(treatment = c("ut", "veh", "ivo",
"pim", "ivo.pim")), overlay = NA, gate = NA, display = 25000,
layout = "", margins = NULL, popup = FALSE, select = NULL,
xlim = NA, ylim = NA, xlab = "", ylab = "", title = c("hCD33",
"hCD33", "hCD33", "hCD33", "hCD33"), negate = FALSE, density_modal = TRUE,
density_smooth = 0.6, density_stack = 0.5, density_layers = NA,
density_cols = NA, density_fill = NA, density_fill_alpha = 1,
density_line_type = 1, density_line_width = 1, density_line_col = "black",
point_shape = ".", point_size = 2, point_col_scale = NA,
point_cols = NA, point_col = NA, point_col_alpha = 1, contour_lines = 0,
contour_line_type = 1, contour_line_width = 1, contour_line_col = "black",
contour_line_alpha = 1, axes_limits = "auto", axes_limits_buffer = 0.03,
axes_text = c(TRUE, TRUE), axes_text_font = 1, axes_text_size = 1,
axes_text_col = "black", axes_label_text_font = 1, axes_label_text_size = 1.1,
axes_label_text_col = "black", title_text_font = 2, title_text_size = 3,
title_text_col = "black", legend = FALSE, legend_text = "hCD33",
legend_text_font = 1, legend_text_size = 1, legend_text_col = "black",
legend_line_type = NA, legend_line_width = NA, legend_line_col = NA,
legend_box_fill = NA, legend_point_col = NA, gate_line_type = 1,
gate_line_width = 2.5, gate_line_col = "red", gate_fill = "white",
gate_fill_alpha = 0, label = "", label_text = NA, label_stat = "",
label_position = "auto", label_text_x = NA, label_text_y = NA,
label_text_font = 2, label_text_size = 0.8, label_text_col = "black",
label_fill = "white", label_fill_alpha = 0.6, border_line_type = 1,
border_line_width = 1, border_line_col = "black", border_fill = "white",
border_fill_alpha = 1)
3: do.call("cyto_plot.flowSet", args)
2: cyto_plot.GatingSet(gs_160345, channels = "FL2-H", parent = "hCD33",
group_by = list(treatment = c("ut", "veh", "ivo", "pim",
"ivo.pim")), density_stack = 0.5, title_text_size = 3)
1: cyto_plot(gs_160345, channels = "FL2-H", parent = "hCD33", group_by = list(treatment = c("ut",
"veh", "ivo", "pim", "ivo.pim")), density_stack = 0.5, title_text_size = 3)
@northNomad, was it the first layer that contained no events? If so, cyto_plot()
doesn't currently support this as the first layer is required to compute axes limits for stacking. 1D plots are getting a complete overhaul in the new update so I will see if I can address this better there.
@DillonHammill Yes, it's the first sample in the gating set (it' was an unstained control that's why no cells passed all the gates).
Looking forward to it! You are a legend.
OK I will close this issue for now then. You can reopen it if the issue persists when the new update is released.
Hi Dillon, Running some old code. Seemed to have broke.
Not sure if there is a change in how we should set
density_stack
incyto_plot
Much love, NN