if (FALSE) {
library(beadplexr)
library(dplyr)
data("lplex")
df <- lplex[[1]]
panel_info <- load_panel(.panel_name = "Human Growth Factor Panel (13-plex)")
args_ident_analyte <- list(fs = list(.parameter = c("FSC-A", "SSC-A"),
.column_name = "Bead group",
.trim = 0.1,
.method = "clara"),
analytes = list(.parameter = "FL6-H",
.column_name = "Analyte ID",
.trim = 0,
.method = "clara"))
annot_events <- identify_legendplex_analyte(df = df,
.analytes = panel_info$analytes,
.method_args = args_ident_analyte)
annot_events |> facs_plot(.beads = "Bead group")
annot_events |>
filter(`Bead group` == "A") |>
facs_plot(.x = "FL2-H", .y = "FL6-H", .beads = "Analyte ID")
annot_events |>
filter(`Bead group` == "B") |>
facs_plot(.x = "FL2-H", .y = "FL6-H", .beads = "Analyte ID")
}
if (FALSE) {
library(beadplexr)
data(simplex)
df <- simplex[["cba"]]
analytes <- vector("list", 30) |> setNames(as.character(c(1:30)))
args_ident_analyte <- list(.parameter = c("APC", "APC-Cy7"),
.column_name = "Analyte ID",
.trim = 0.1,
.method = "clara")
annot_events <- identify_cba_analyte(df = df,
.analytes = analytes,
.method_args = args_ident_analyte)
annot_events |> facs_plot(.x = "FSC", .y = "SSC")
annot_events |>
facs_plot(.x = "APC", .y = "APC-Cy7", .beads = "Analyte ID")
annot_events <- identify_cba_analyte(df = df,
.analytes = analytes,
.method_args = args_ident_analyte,
.trim_fs = 0.1,
.parameter_fs = c("FSC", "SSC"))
annot_events |> facs_plot(.x = "FSC", .y = "SSC", .beads = "Bead events")
# Looks strange because some true beads events have randomly been placed far
# from the center in the forward-side scatter when the data was created
annot_events |>
facs_plot(.x = "APC", .y = "APC-Cy7", .beads = "Analyte ID")
}
if (FALSE) {
library(beadplexr)
data(simplex)
df <- simplex[["mplex"]]
analytes <- vector("list", 10) |> setNames(as.character(c(1:10)))
args_ident_analyte <- list(.parameter = c("FITC", "PE"),
.column_name = "Analyte ID",
.trim = 0.1,
.method = "clara")
annot_events <- identify_macsplex_analyte(df = df,
.analytes = analytes,
.method_args = args_ident_analyte)
annot_events |> facs_plot(.x = "FSC", .y = "SSC")
annot_events |>
facs_plot(.x = "FITC", .y = "PE", .beads = "Analyte ID")
annot_events <- identify_macsplex_analyte(df = df,
.analytes = analytes,
.method_args = args_ident_analyte,
.trim_fs = 0.1,
.parameter_fs = c("FSC", "SSC"))
annot_events |> facs_plot(.x = "FSC", .y = "SSC", .beads = "Bead events")
# Looks strange because some true beads events have randomly been placed far
# from the center in the forward-side scatter when the data was created
annot_events |>
facs_plot(.x = "FITC", .y = "PE", .beads = "Analyte ID")
}
Run the code above in your browser using DataLab