relabelClasses: Re-label clusters.

Description Usage Arguments Value Author(s) Examples

View source: R/relabelClasses.R

Description

An attempt to label clusters with "NN", "NP", "PN" or "PP" automatically. (This will not generalise to amplitudes in only a single channel.)

Usage

1
relabelClasses(droplets, classCol = "class", presentClasses = ddpcr$classes)

Arguments

droplets

A data frame of droplet amplitudes with a classification.

classCol

The column (name or number) from 'droplets' representing the class.

presentClasses

A vector of classes that we want to label. Must be a subset of c("NN", "NP", "PN", "PP") and must have the same number of classes as the number of unique classes in the class column.

Value

The classification column relabelled with "NN", "NP", "PN" and "PP".

Author(s)

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Look at the "Cluster" column that was created by Bio-Rad's QuantaSoft.
aWell <- KRASdata[["E03"]]
str(aWell$Cluster)

## Relabel the classes to see the difference.
relabelled <- relabelClasses(aWell, classCol="Cluster")
str(relabelled)
levels(relabelled)

## We choose a sample with 3 clusters.
unique(KRASdata[["H04"]]$Cluster)

## We can check that there is no "PP" class, so specify the others only.
relabelled <- relabelClasses(KRASdata[["H04"]], classCol="Cluster",
                             presentClasses=c("NN", "PN", "NP"))
table(relabelled)

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