R/cytobank2GatingSet.R
gs_compare_cytobank_counts.Rd
compare the counts to cytobank's exported csv so that the parsing result can be verified.
gs_compare_cytobank_counts( gs, file, id.vars = c("FCS Filename", "population"), ... )
gs | parsed GatingSet |
---|---|
file | the stats file (contains the populatio counts) exported from cytobank. |
id.vars | either "population" or "FCS filename" that tells whether the stats file format is one population per row or FCS file per row. |
... | arguments passed to data.table::fread function |
a data.table (in long format) that contains the counts from openCyto and Cytobank side by side.
acsfile <- system.file("extdata/cytobank_experiment.acs", package = "CytoML") ce <- open_cytobank_experiment(acsfile)#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>## verify the stats are correct statsfile <- ce$attachments[1] dt_merged <- gs_compare_cytobank_counts(gs, statsfile, id.vars = "population", skip = "FCS Filename") all.equal(dt_merged[, count.x], dt_merged[, count.y], tol = 5e-4)#> [1] TRUE