df2dpcr {dpcR} | R Documentation |
Convert data.frame to dpcr object
Description
Converts data.frame
object to to adpcr
or
dpcr
object. The resulting object will have "tnp"
type.
Usage
df2dpcr(df)
Arguments
df |
data frame with specified column names. See Details. |
Details
The data frame must have REDF structure. It means that data must contain following columns with exactly specified names:
- experiment
names of experiments
- replicate
indices of replicates
- assay
names of assays
- k
number of positive partitions
- n
total number of partitions
- v
volume of partition (nL)
- uv
uncertainty of partition's volume (nL)
- threshold
partitions with
k
equal or higher than threshold are treated as positve.
There are also one optional column:
- panel_id
indices of panels
If the additional column is present, the resulting object has
adpcr
type.
Value
An object of adpcr
or dpcr
type,
depends on the presence of additional column with panel indices (see Details).
Author(s)
Michal Burdukiewcz, Stefan Roediger
See Also
Flexibly create dpcr
objects: create_dpcr
Inverse function: dpcr2df
Examples
dat <- data.frame(experiment = factor(rep(paste0("Experiment", 1L:2), 3)),
replicate = c(1, 1, 2, 2, 3, 3),
assay = "Assay1",
k = c(55, 121, 43, 150, 70, 131),
n = 765,
v = 1,
uv = 0)
df2dpcr(dat)