setupDiscovrExperiment: Prepare a dataset for DISCOV-R analysis

View source: R/clusteringPhase.R

setupDiscovrExperimentR Documentation

Prepare a dataset for DISCOV-R analysis

Description

Loads in the marker and .fcs information and prepares a discovrExperiment object for analysis. Default parameters values are based on the original DISCOV-R analysis published in Wiedeman et al 2020.

Usage

setupDiscovrExperiment(
  markerInfoFile,
  fcsInfoFile,
  parentPopulation,
  markerCommonField = "fixed",
  markerFcsField = "desc",
  arcsinhA = 0,
  arcsinhB = 0.2,
  arcsinhC = 0,
  verbose = TRUE,
  checkMemory = TRUE,
  downsampleVectorList = NULL
)

Arguments

markerInfoFile

A character string indicating the path to a .csv file. This file is expected to have columns named useToCluster", as well as the names specified in the markerCommonField and markerFcsField variables. Details of the markerCommonField and markerFcsField arguments are provided below; the "useToCluster" column should have only TRUE or FALSE values. Markers with a TRUE value in this column will be used for clustering, whereas the others will not.

fcsInfoFile

A character string indicating the path to a file containing columns named "subject", "cellSubset", and "filename". The "filename" field must contain paths to the .fcs files that will be used in analysis.

parentPopulation

A character sting indicating the name of the parent population subset. Must match one of the values in the fcsInfoFile 'cellSubset' column.

markerCommonField

(default: "fixed") A character string indicating the name of a column containing common marker names for human use, like "CD45"

markerFcsField

(default: "desc") A character string indicating the name ofa column containing the marker names in the .fcs files,like "89Y_CD45"

arcsinhA

(default: 0) A numeric indicating the value for 'a' in the arcsinh data transformation equation. Should usually be 0.

arcsinhB

(default: 0.2) A numeric indicating the value for 'b' in the arcsinh data transformation equation. Should be 1/5 for cytof data, and 1/150 for flow data.

arcsinhC

(default: 0) A numeric indicating the value for 'c' in the arcsinh data transformation equation. Should usually be 0.

verbose

(default: TRUE) A logical specifying whether to display processing messages

checkMemory

(default: TRUE) A logical indicating whether to check how much system memory is available before loading the dataset. If TRUE, this function will display a message and prevent data loading when the files take up more than 80 percent of the available system memory.

downsampleVectorList

(default: NULL) A list of vectors of row numbers to use from files in fcsInfoFile. Generally generated by downsampleFcsList. If an object is specified here, it is used to downsample the files as they are read in. NOTE: the list must be in the same order as the files in fcsInfoFile, so it is best to generate this object directly from that file to ensure that they match. Possible future update to allow named list with names matching a combination of identifying fields for the FCS files.

Value

An S3 object of class discovrExperiment

Author(s)

Mario G Rosasco, Virginia Muir, Matt Dufort

See Also

discovrExperiment


BenaroyaResearch/briDiscovr documentation built on March 15, 2024, 12:31 a.m.