Downloads multiple files bundled into a ZIP archive.

downloadFcsFiles(
  experimentId,
  format,
  destination,
  overwrite = FALSE,
  fcsFileIds = NULL,
  populationIds = NULL,
  compensationId = NULL,
  compensatedQ = NULL,
  preSubsampleN = NULL,
  preSubsampleP = NULL,
  postSubsampleN = NULL,
  postSubsampleP = NULL,
  seed = NULL,
  filenameTemplate = NULL
)

Arguments

experimentId

ID of experiment.

format

Specifies the file format ("fcs", "tsv (with header)" or "tsv (without header)")

destination

String. Write the files to the specified destination.

overwrite

Logical. Allows a destination file to be overwritten.

fcsFileIds

List of string. Optional. Defaults to returning all non-control files in the experiment.

populationIds

List of string. Optional. If provided, only events from these populations will be included in the output files. Defaults to ungated.

compensationId

String. Required if populationIds is specified. Compensation to use for gating.

compensatedQ

Logical. Optional. If true, applies the compensation specified in compensationId to the exported events. For TSV format, the numerical values will be the compensated values. For FCS format, the numerical values will be unchanged, but the file header will contain the compensation as the spill string (file-internal compensation).

preSubsampleN

Integer. Randomly subsample the file to contain this many events before gating.

preSubsampleP

Numeric. Randomly subsample the file to contain this percent of events (0 to 1) before gating.

postSubsampleN

Integer. Randomly subsample the file to contain this many events after gating.

postSubsampleP

Numeric. Randomly subsample the file to contain this percent of events (0 to 1) after gating.

seed

Numeric. Seed for random number generator used for subsampling. Use for deterministic (reproducible) subsampling. If omitted, a pseudo-random value is used.

filenameTemplate

String. Tokenized template to dynamically name each file in the resulting archive, like "{fcsfile.filename}-{population._id}".

Examples

if (FALSE) { # \dontrun{
# Download all FCS files in the experiment
downloadFcsFiles(experimentId, "fcs", "archive.zip", overwrite = T)
# Download specific FCS files
fcsFileIds <- c("5d2f8b4b21fd0676fb3a6a72", "5d2f8b4b21fd0676fb3a6a74")
downloadFcsFiles(experimentId, "fcs", "archive.zip", fcsFileIds = fcsFileIds)
} # }