relabelClasses {twoddpcr} | R Documentation

## Re-label clusters.

### 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

    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

    ## 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)

[Package twoddpcr version 1.11.0 Index]