compare.counts {CytoML} | R Documentation

## compare the counts to cytobank's exported csv so that the parsing result can be verified.

### Description

compare the counts to cytobank's exported csv so that the parsing result can be verified.

### Usage

    compare.counts(gs, file, id.vars = c("FCS Filename", "population"), ...)

### Arguments

`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

### Value

a data.table (in long format) that contains the counts from openCyto and Cytobank side by side.

### Examples

    xmlfile <- system.file("extdata/cytotrol_tcell_cytobank.xml", package = "CytoML")
    fcsFiles <- list.files(pattern = "CytoTrol",
            system.file("extdata", package = "flowWorkspaceData"), full = TRUE)
    gs <- cytobank2GatingSet(xmlfile, fcsFiles)
    ## verify the stats are correct
    statsfile <- system.file("extdata/cytotrol_tcell_cytobank_counts.csv", package = "CytoML")
    dt_merged <- compare.counts(gs, statsfile, id.vars = "population", skip = "FCS Filename")
    all.equal(dt_merged[, count.x], dt_merged[, count.y], tol = 5e-4)

[Package CytoML version 1.6.5 Index]