Skip to content

Commit

Permalink
Add barcoding error message to cyto_plot().
Browse files Browse the repository at this point in the history
  • Loading branch information
djhammill committed Jun 13, 2024
1 parent bcf225a commit 2470f1d
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions R/cyto_plot-internal-helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,26 @@
}

# EVENT-ID
if(length(x) > 1) {
if(!all(sapply(x, function(z) {"Event-ID" %in% cyto_channels(z)}))) {
stop(
"Data must be barcoded using cyto_barcode(x, 'events') to display overlays."
)
}
if(length(x[[1]]) > 1) {
lapply(
x,
function(z) {
if(length(z) > 1) {
if(!all(LAPPLY(
z,
function(w) {
"Event-ID" %in% cyto_channels(w)
}
))) {
stop(
"Data must be barcoded using cyto_barcode(x, 'events') to display overlays."
)
}
}
}
)
}

# SOM
if(som) {
# MERGE SOM AT EACH LAYER
Expand Down

0 comments on commit 2470f1d

Please sign in to comment.