finds name of channels corresponding to user provided markers
getChannelNamesFromMarkers(ff, markers)
a flowCore::flowFrame
a vector of markers, either provided as :
an array of booleans (referring to flowFrame columns)
an array of integers (indices in flowFrame columns)
an array of characters (exact markers or channel patterns)
a character vector, containing the names of the corresponding channels
data(OMIP021Samples)
# with existing markers
ret <- getChannelNamesFromMarkers(
OMIP021Samples[[1]],
c(
"FSC-A",
"L/D Aqua - Viability",
"FITC - gdTCR",
"PECy5 - CD28"
))
ret # c("FSC-A", "525/50Violet-A", "530/30Blue-A", "670/30Yellow-A")
#> [1] "FSC-A" "525/50Violet-A" "530/30Blue-A" "670/30Yellow-A"
# with boolean vector
indices <- c(1, 6, 14, 18)
boolInput <- rep(FALSE, 21)
boolInput[indices] <- TRUE
ret2 <- getChannelNamesFromMarkers(
OMIP021Samples[[1]],
boolInput)
ret2 # c("FSC-A", "525/50Violet-A", "530/30Blue-A", "670/30Yellow-A")
#> [1] "FSC-A" "525/50Violet-A" "530/30Blue-A" "670/30Yellow-A"
# with indices vector
ret3 <- getChannelNamesFromMarkers(
OMIP021Samples[[1]],
indices
)
ret3 # c("FSC-A", "525/50Violet-A", "530/30Blue-A", "670/30Yellow-A")
#> [1] "FSC-A" "525/50Violet-A" "530/30Blue-A" "670/30Yellow-A"