Undefined columns error R cytometry analysis
1
0
Entering edit mode
Elizabeth • 0
@df46ae5a
Last seen 3.5 years ago
United States

Enter the body of text here

Hello! I have been following the GvHD code in order to work on analyzing flow data in R. However, I keep getting the following undefined columns error Code should be placed in three backticks as shown below

knitr::opts_chunk$set(echo = TRUE)
library(ggfortify)
library("flowCore")
library("mtvnorm")
library(ggcyto)
library("ggplot2")
library(flowWorkspace)
library(flowWorkspaceData)
library(xtable)
library(cowplot)
data("GvHD") #load data set
dataDir <- system.file("extdata", package="flowWorkspaceData")

gs <- load_gs(list.files(dataDir, pattern = "gs_bcell_auto",full =TRUE))
gs@transformation <- transform(colnames(gs)[-(1:2)], flowjo_biexp_trans())

autoplot(gs[1], gate = c("CD3","CD19"), bins = 64) + 
  geom_overlay(data = "IgD+CD27+",size=0.25)

Error in `[.data.frame`(x@transformation, i) : undefined columns selected

Any help would be appreciated thanks.

flowCore ggcyto FlowCytometryData • 1.1k views
ADD COMMENT
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.1 years ago
(Private Address)

I see you are trying to fill the missing transform info to gs_bcell_auto , which is a hack, but since you seems to know what you are doing, here is the right way of doing it (still a hack though)

tranlist = transformerList(colnames(gs)[-(1:2)], flowjo_biexp_trans())
gs@transformation <- sapply(sampleNames(gs), function(i)tranlist, simplify = F)
ADD COMMENT

Login before adding your answer.

Traffic: 1096 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6