wellClassification: Retrieve a classification vector.

Description Usage Arguments Value Author(s) See Also Examples

Description

Retrieve the classification from a ddpcrWell object.

Usage

1
2
3
4
5
6
7
8
9
wellClassification(theObject, cMethod = NULL, withAmplitudes = FALSE)

## S4 method for signature 'ddpcrWell'
wellClassification(theObject, cMethod = NULL, withAmplitudes = FALSE)

wellClassification(theObject, cMethod) <- value

## S4 replacement method for signature 'ddpcrWell'
wellClassification(theObject, cMethod) <- value

Arguments

theObject

A ddpcrWell object.

cMethod

The names (or column numbers) of the classification to retrieve. If NULL, then all of the classifications are obtained. Defaults to NULL when retrieving. When setting a classification, this cannot be NULL.

withAmplitudes

Logical value. If TRUE, returns a data frame with the droplet amplitudes and corresponding classifications. If FALSE, returns the classification vector only. Defaults to FALSE.

value

A factor with the same length as the number of droplets in theObject, with levels in ddpcr$classesRain.

Value

A factor or data frame corresponding to the requested classification(s).

Author(s)

Anthony Chiu, anthony.chiu@cruk.manchester.ac.uk

See Also

wellClassificationMethod for the name of the classification method.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Take some droplets with a given classification.
amplitudes <- KRASdata[["E03"]][, c("Ch1.Amplitude", "Ch2.Amplitude")]

## Create a ddpcrWell object with the amplitudes only.
aWell <- ddpcrWell(well=amplitudes)

## This has no classification yet.
head(wellClassification(aWell))

## We check the classification now, showing the amplitudes as well.
head(wellClassification(aWell, withAmplitudes=TRUE))

## Now set a sample classification.
wellClassification(aWell, cMethod="Sample") <-
  rep(c("NN", "NP", "PN", "PP"), numDroplets(aWell) / 4)
head(wellClassification(aWell, withAmplitudes=TRUE))

twoddpcr documentation built on Nov. 8, 2020, 5:49 p.m.