new_plate {ddpcr}R Documentation

Create a new ddPCR plate

Description

Any ddPCR analysis must start by creating a ddPCR plate object. Use this function to read ddPCR data into R and create a plate object that can then be analyzed.

Usage

new_plate(dir, type, data_files, meta_file, name, params)

Arguments

dir

The directory containing the ddPCR droplet data files, and potentially the plate results file

type

A ddPCR plate type (see plate_types)

data_files

If dir is not provided, you can provide a vector of file paths to the ddPCR droplet data files.

meta_file

If dir is not provided, you can provide a file path to the ddPCR results file.

name

Name of the dataset. If not provided, the name will be guessed based on the filenames.

params

List of parameters to set for the plate. Only advanced users should consider using this feature.

Details

See the README for more information on plate types.

Value

A new ddPCR plate object with droplet data loaded that is ready to be analyzed.

Providing ddPCR data

The first step to using the ddpcr package is to get the ddPCR data into R. This package uses as input the data files that are exported by QuantaSoft. For a dataset with 20 wells, QuantaSoft will create 20 well files (each ending with "_Amplitude.csv") and one results file. The well files are essential for analysis since they contain the actual droplet data, and the results file is optional because the only information used from it is the mapping from well IDs to sample names.

The easiest way to use your ddPCR data with this package is to Export the data from QuantaSoft into some directory, and providing that directory as the dir argument. This way, this package will automatically find all the data files as well as the results file. Alternatively, you can provide the data files (well files) manually as a list of filenames using the data_files argument. If you use the data_files argument instead of dir, you can also optionally provide the results file as the meta_file argument. If no results file is provided then the wells will not be mapped to their sample names.

Plate parameters

Every plate has a set of default parameters that are used in the analysis. You can see all the parameters of a plate with the params function. If you want to provide different values for some parameters when initializing a plate, you can do that with the params argument. This is considered an advanced feature.

For example, if you inspect the parameters of any ddPCR plate, you will see that by defalt the random seed used by default is 8. If you want to create a new plate that uses a different random seed, you could do so like this:

plate <- new_plate(sample_data_dir(), params = list('GENERAL' = list('RANDOM_SEED' = 10)))
plate 

Most numeric parameters that are used in the algorithms of the analysis steps can be modified in a similar fashion. This can be used to fine-tune the analysis of a plate if you require different parameters.

See Also

plate_types
type
reset
analyze
plot.ddpcr_plate
params

Examples

## Not run: 
plate <- new_plate(sample_data_dir())

## End(Not run) 

[Package ddpcr version 1.15 Index]