dpcR is an R package designed to assist in analysis of digital PCR experiments.
dpcR does not have any inbuilt tools for reading specific data types. Instead, we advise to use other packages belonging do the pcRuniversum as RDML or dedicated packages such as ReadqPCR (available from bioconductor.org).
Before analysis data should be saved using one of the three classes - adpcr
(end-point array digital PCR experiments), ddpcr
(droplet digital PCR experiments) and rtadpcr
(real-time array digital PCR experiments). To do so, use create_dpcr
function.
library(dpcR)
#generate some data from 15x16 array. Let's presume, that we have results from two plates
sample_runs <- matrix(rpois(480, lambda = 1.5), ncol = 2)
#check its class - it's a typical R structure
class(sample_runs)
## [1] "matrix"
#save it to adpcr object
adpcr_experiments <- create_dpcr(sample_runs, n = 30L, type = "nm", adpcr = TRUE)
class(adpcr_experiments)
## [1] "adpcr"
## attr(,"package")
## [1] "dpcR"
Data can be easily visualized using plot_panel
function.
#remember, you can plot only single panel at once
plot_panel(extract_dpcr(adpcr_experiments, 1), nx_a = 15, ny_a = 16, main = "Experiment 1")
Randomness of spatial distribution on plate can be checked using test_panel
.
#remember, you can plot only single panel at once
test_panel(extract_dpcr(adpcr_experiments, 1), nx_a = 15, ny_a = 16)
## $`1`
##
## Chi-squared test of CSR using quadrat counts
## Pearson X2 statistic
##
## data: single_panel
## X2 = 7.4525, df = 24, p-value = 0.0009998
## alternative hypothesis: two.sided
##
## Quadrats: 5 by 5 grid of tiles