calculateCPDs {ddPCRclust} | R Documentation

## Calculates the copies per droplet

### Description

This function takes the results of the clustering and calculates the actual counts per target, as well as the counts per droplet (CPD) for each marker.

### Usage

    calculateCPDs(results, template = NULL, constantControl = NULL)

### Arguments

`results` | The result of the ddPCRclust algorithm.
`template` | The parsed dataframe containing the template.
`constantControl` | The constant refrence control, which should be present in each reaction. It is used to normalize the data.

### Value

A list of lists, containing the counts for empty droplets, each marker with both total droplet count and CPD, and total number of droplets, for each element of the input list respectively.

### Examples

    # Read files
    exampleFiles <- list.files(paste0(find.package('ddPCRclust'), '/extdata'), full.names = TRUE)
    files <- readFiles(exampleFiles[3])
    # To read all example files uncomment the following line
    # files <- readFiles(exampleFiles[1:8])

    # Read template
    template <- readTemplate(exampleFiles[9])

    # Run ddPCRclust
    result <- ddPCRclust(files, template)

    # Calculate the CPDs
    markerCPDs <- calculateCPDs(result, template$template)

[Package ddPCRclust version 1.4.0 Index]