R/utils.R
aggregateAndSample.Rd
Aggregate multiple flow frames in order to analyze them simultaneously. A new FF, which contains about cTotal cells, with ceiling(cTotal/nFiles) cells from each file. Two new columns are added: a column indicating the original file by index, and a noisy version of this, for better plotting opportunities, This function is based on PeacoQC::AggregateFlowframes() where file names inputs have been replaced by a flowSet input.
aggregateAndSample(
fs,
nTotalEvents,
seed = NULL,
channels = NULL,
writeOutput = FALSE,
outputFile = "aggregate.fcs",
keepOrder = FALSE
)
a flowCore::flowset
Total number of cells to select from the input flow frames
seed to be set before sampling for reproducibility. Default NULL does not set any seed.
Channels/markers to keep in the aggregate. Default NULL takes all channels of the first file.
Whether to write the resulting flowframe to a file. Default FALSE
Full path to output file. Default "aggregate.fcs"
If TRUE, the random subsample will be ordered in the same way as they were originally ordered in the file. Default = FALSE.
returns a new flowCore::flowFrame
data(OMIP021Samples)
nCells <- 1000
agg <- aggregateAndSample(
fs = OMIP021Samples,
nTotalEvents = nCells)