TheFluorophores <- FluorophoreMatrix(data=Panel, NumberDetectors = 38,
returnType="data") |> pull(Fluorophore)
Data <- Luciernaga:::InstrumentReferences(NumberDetectors=38)
Data <- Data |> dplyr::filter(Fluorophore %in% TheFluorophores) |> select(-Instrument) |>
tidyr::pivot_wider(names_from = "Detector", values_from = "AdjustedY")
colnames(Unstained) <- gsub("-A", "", colnames(Unstained))
Unstained <- Unstained |> select(where(is.numeric)) |>
AveragedSignature(stats="median", normalize=TRUE) |>
mutate(Fluorophore="Unstained") |> relocate(Fluorophore, .before=1)
Data <- bind_rows(Data, Unstained)