| wellClassification {twoddpcr} | R Documentation |
Retrieve the classification from a ddpcrWell object.
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
theObject |
A |
cMethod |
The names (or column numbers) of the classification to
retrieve. If |
withAmplitudes |
Logical value. If |
value |
A factor with the same length as the number of droplets in
|
A factor or data frame corresponding to the requested classification(s).
Anthony Chiu, anthony.chiu@cruk.manchester.ac.uk
wellClassificationMethod for the name of the
classification method.
## 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))