getPopStats(gs) returns Empty data.table (0 rows) of 6 cols: name,Population,Parent,Count,ParentCount,prop
0
0
Entering edit mode
@timothyforbes-16207
Last seen 5.8 years ago

In the following code excerpt I seek to get the population statistics from my gating set (gs), however my code returns Empty data.table (0 rows) of 6 cols: name,Population,Parent,Count,ParentCount,prop despite my gating set containing 96 samples in it. 

#Reads in Flow Set and assigns to flowData
  flowData <- read.flowSet(path = data_path, isncdf = TRUE)
  #Creates Gating Set (gs) from Flow Data (flowData)
  gs<-GatingSet(flowData)
  
  #compensate
  comp <- spillover(flowData[[1]])[["SPILL"]]
  print('Comp 1 Done')
  chnls <- colnames(comp)
  print('Chnls Done')
  comp <- compensation(comp)
  print('Comp 2 Done')
  gs <- compensate(gs, comp)
  print('gs Done')
  
  #transform FlowJo Biex
  trans <- flowJo_biexp_trans(widthBasis = -40)
  print('Trans 1 Done')
  trans <- transformerList(from = chnls,trans = trans)
  print('Trans 2 Done')
  gs <- transform(gs, trans)
  print('gs 2 Done')
 

  #get population statistics

  stats <- getPopStats(gs) 

                       # statistic = c("freq", "count"),
                       # xml = FALSE, subpopulations = NULL, 
                       # format = c("long", "wide"),
                       # path = "auto")
  print(stats[,prop := Count/ParentCount])

getPopStats() • 438 views
ADD COMMENT

Login before adding your answer.

Traffic: 952 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