install.packages("qPCRtools")
The first step of qPCR is usually the preparation of cDNA. We need to
calculate the column of RNA for reverse transcription to cDNA. So, if we
have the concentration of RNA, we can use the function
CalRTable
to do that. The function have three
patameters:
data
: The table of RNA concentration. The unit of
concentration is ng/\(\mu\)l. The demo
data can be found at GitHub.template
: The table of reagent for reverse
transcription. The demo data can be found at GitHub.
The column all
that must be in this dataframe is the total
volume for 1 $ $g RNA.RNA.weight
: The mass of RNA. The unit is $ $g. The
default value is 2.library(magrittr)
1.path <- system.file("examples", "crtv.data.txt", package = "qPCRtools")
df.2.path <- system.file("examples", "crtv.template.txt", package = "qPCRtools")
df..1 <- data.table::fread(df.1.path)
df.2 <- data.table::fread(df.2.path)
df<- qPCRtools::CalRTable(data = df.1, template = df.2, RNA.weight = 2)
result
%>%
result ::slice(1:6) %>%
dplyr::kable(format = "html") %>%
kableExtra::kable_styling("striped") kableExtra
sample | mean | volume.RNA | mix | gDNARemover | all | volume.h2o |
---|---|---|---|---|---|---|
1 | 160.4000 | 12.468828 | 8 | 2 | 40 | 17.53117 |
2 | 163.3333 | 12.244898 | 8 | 2 | 40 | 17.75510 |
3 | 182.5667 | 10.954902 | 8 | 2 | 40 | 19.04510 |
4 | 203.8000 | 9.813543 | 8 | 2 | 40 | 20.18646 |
5 | 180.1333 | 11.102887 | 8 | 2 | 40 | 18.89711 |
6 | 171.8333 | 11.639185 | 8 | 2 | 40 | 18.36081 |
The function can calculate the standard curve. At the same time, it can get the amplification efficiency of primer(s). Based on the amplification efficiency, we can know which method can be used to calculate the expression level. The function has 6 parameters:
cq.table
: The table of Cq. It must contain at least two
columns:One Position
and Cq
. The demo data can
be found at GitHub.concen.table
: The table of gene(s) and concentration.
It must contain at least three columns: Position
,
Gene
and Conc
. The demo data can be found at
GitHub.lowest.concen
: The lowest concentration used to
calculate the standard curve.highest.concen
: The highest concentration used to
calculate the standard curve.dilu
: The dilution factor of cDNA template. The default
value is 4.by
: Calculate the standard curve by average data or the
full data. The default value is mean
.library(qPCRtools)
1.path <- system.file("examples", "calsc.cq.txt", package = "qPCRtools")
df.2.path <- system.file("examples", "calsc.info.txt", package = "qPCRtools")
df..1 <- data.table::fread(df.1.path)
df.2 <- data.table::fread(df.2.path)
df::CalCurve(
qPCRtoolscq.table = df.1,
concen.table = df.2,
lowest.concen = 4,
highest.concen = 4096,
dilu = 4,
by = "mean"
-> p
)
"table"]] %>%
p[[::slice(1:6) %>%
dplyr::kable(format = "html") %>%
kableExtra::kable_styling("striped") kableExtra
Gene | Formula | Slope | Intercept | R2 | P.value | max.Cq | min.Cq | E | Date |
---|---|---|---|---|---|---|---|---|---|
Gene1 | y = -2.07*Conc + 40.08 | -2.07 | 40.08 | 0.7502 | 0 | 40.00 | 27.33 | 0.954 | 2022-08-15 |
Gene2 | y = -2.09*Conc + 34.97 | -2.09 | 34.97 | 0.9908 | 0 | 33.89 | 22.31 | 0.941 | 2022-08-15 |
Gene3 | y = -2.24*Conc + 33.34 | -2.24 | 33.34 | 0.9969 | 0 | 31.39 | 19.59 | 0.857 | 2022-08-15 |
Gene4 | y = -2.21*Conc + 35.46 | -2.21 | 35.46 | 0.9977 | 0 | 33.44 | 22.06 | 0.873 | 2022-08-15 |
"figure"]] p[[
## `geom_smooth()` using formula 'y ~ x'
After we calculated the standard curve, we can use the standard curve
to calculate the expression level of genes. In qPCRtools
,
function CalExpCurve
can get the expression using standard
curve. There are several parameters in this function: -
cq.table
: The table of Cq. It must contain at least two
columns:One Position
and Cq
. The demo data can
be found at GitHub.
- curve.table
: The table of standard curve calculated by
CalCurve
. - design.table
: The design
information including three columns: Position
,
Treatment
and Gene
. The demo table can be
found at GitHub.
- correction
: Expression level is corrected or not with
internal reference genes. The default value is TRUE
. -
ref.gene
: The name of reference gene. -
stat.method
: The method of statistics. One of
t.test
, wilcox.test
or anova
. The
default value is t.test
. - ref.group
: The name
of reference group. If stat.method
is t.test
or wilcox.test
, the function need a ref.group
.
- fig.type
: The type of figure, box
or
bar
. box
represents boxplot
.
bar
represents barplot
. The default value is
box
. - fig.ncol
: The column of figure. The
default value is NULL
.
= system.file("examples", "cal.exp.curve.cq.txt", package = "qPCRtools")
df1.path = system.file("examples", "cal.expre.curve.sdc.txt", package = "qPCRtools")
df2.path = system.file("examples", "cal.exp.curve.design.txt", package = "qPCRtools")
df3.path
= data.table::fread(df1.path)
cq.table = data.table::fread(df2.path)
curve.table = data.table::fread(df3.path)
design.table
::CalExpCurve(
qPCRtools
cq.table,
curve.table,
design.table,correction = TRUE,
ref.gene = "OsUBQ",
stat.method = "t.test",
ref.group = "CK",
fig.type = "box",
fig.ncol = NULL) -> res
## Warning in qPCRtools::CalExpCurve(cq.table, curve.table, design.table,
## correction = TRUE, : Cq of A3 out of curve range!
"table"]] %>%
res[[::slice(1:6) %>%
dplyr::kable(format = "html") %>%
kableExtra::kable_styling("striped") kableExtra
Treatment | Gene | expre | temp | signif | mean.expre | sd.expre | n | se |
---|---|---|---|---|---|---|---|---|
CK | OSPOX8 | 1.0312698 | OSPOX8CK | NA | 1.0359221 | 0.0483130 | 8 | 0.0170812 |
CK | OsWAK91 | 0.2791407 | OsWAK91CK | NA | 0.7631784 | 0.2121981 | 8 | 0.0750234 |
CK | OsRBBI2 | 0.5073215 | OsRBBI2CK | NA | 0.5399223 | 0.0431135 | 8 | 0.0152429 |
CK | OsCeBip | 0.9040572 | OsCeBipCK | NA | 0.8421330 | 0.1713979 | 8 | 0.0605983 |
CK | OsPR10 | 1.1275436 | OsPR10CK | NA | 1.2492427 | 0.2011588 | 8 | 0.0711204 |
CK | OSPOX8 | 1.0715901 | OSPOX8CK | NA | 1.0359221 | 0.0483130 | 8 | 0.0170812 |
"figure"]] res[[
## Warning: Removed 40 rows containing missing values (geom_text).
$2^{-{Δ}{Δ}{C_t }} $is a widely used method to calculate qPCR
data[1]. Our function
CalExp2ddCt
can do it. Seven parameters are required for
this function: - cq.table
: The demo file can be found at GitHub.
- design.table
: The demo data can be found at GitHub.
Other parameters are same as the function CalExpCurve
. -
ref.gene
: The name of reference gene. -
ref.group
: The name of reference group. If
stat.method
is t.test
or
wilcox.test
, the function need a ref.group
. -
stat.method
: The method of statistics. One of
t.test
, wilcox.test
or anova
. The
default value is t.test
. - fig.type
: The type
of figure, box
or bar
. box
represents boxplot
. bar
represents
barplot
. The default value is box
. -
fig.ncol
: The column of figure. The default value is
NULL
.
= system.file("examples", "ddct.cq.txt", package = "qPCRtools")
df1.path = system.file("examples", "ddct.design.txt", package = "qPCRtools")
df2.path
= data.table::fread(df1.path)
cq.table = data.table::fread(df2.path)
design.table
::CalExp2ddCt(cq.table,
qPCRtools
design.table,ref.gene = "OsUBQ",
ref.group = "CK",
stat.method = "t.test",
fig.type = "bar",
fig.ncol = NULL) -> res
"table"]] %>%
res[[::slice(1:6) %>%
dplyr::kable(format = "html") %>%
kableExtra::kable_styling("striped") kableExtra
Treatment | gene | biorep | expre | mean.expre | sd.expre | n | se.expre | temp | signif |
---|---|---|---|---|---|---|---|---|---|
Treatment | OsPR10 | 1 | 0.5398479 | 0.6896177 | 0.2739611 | 4 | 0.3448088 | OsPR10Treatment | NS |
Treatment | OsPR10 | 2 | 0.8097930 | 0.6896177 | 0.2739611 | 4 | 0.3448088 | OsPR10Treatment | NS |
Treatment | OsPR10 | 3 | 0.3979406 | 0.6896177 | 0.2739611 | 4 | 0.3448088 | OsPR10Treatment | NS |
Treatment | OsPR10 | 4 | 1.0108893 | 0.6896177 | 0.2739611 | 4 | 0.3448088 | OsPR10Treatment | NS |
CK | OsPR10 | 1 | 0.8069913 | 2.0326462 | 1.5252126 | 4 | 1.0163231 | OsPR10CK | NA |
CK | OsPR10 | 2 | 3.1725106 | 2.0326462 | 1.5252126 | 4 | 1.0163231 | OsPR10CK | NA |
"figure"]] res[[
## Warning: Removed 20 rows containing missing values (geom_text).
The method from SATQPCR can
identify the most stable reference genes (REF) across biological
replicates and technical replicates[2]. Our package provides a function,
CalExpRqPCR
, to achieve it. In the
design.table
, BioRep
, TechRep
and
Eff
are required. BioRep
is the
biological replicates
. TechRep
is the
technical replicates
. Eff
is the amplification
efficiency of genes.
cq.table
can be found at GitHub.design,table
can be found at GitHub.
If user want to give reference gene, ref.gene
can be used
(The default is NULL
).ref.gene
: The name of reference gene.ref.group
: The name of reference group. If
stat.method
is t.test
or
wilcox.test
, the function need a
ref.group
.stat.method
: The method of statistics. One of
t.test
, wilcox.test
or anova
. The
default value is t.test
.fig.type
: The type of figure, box
or
bar
. box
represents boxplot
.
bar
represents barplot
. The default value is
box
.fig.ncol
: The column of figure. The default value is
NULL
.<- system.file("examples", "cal.expre.rqpcr.cq.txt", package = "qPCRtools")
df1.path <- system.file("examples", "cal.expre.rqpcr.design.txt", package = "qPCRtools")
df2.path
<- data.table::fread(df1.path, header = TRUE)
cq.table <- data.table::fread(df2.path, header = TRUE)
design.table
::CalExpRqPCR(cq.table,
qPCRtools
design.table,ref.gene = NULL,
ref.group = "CK",
stat.method = "t.test",
fig.type = "bar",
fig.ncol = NULL
-> res
)
"table"]] %>%
res[[::slice(1:6) %>%
dplyr::kable(format = "html") %>%
kableExtra::kable_styling("striped") kableExtra
group | biorep | gene | Expre4Stat | Expression | SD | SE |
---|---|---|---|---|---|---|
CK | 1 | OSPOX8 | 1.0000000 | 1.393984 | 0.5409190 | 0.2704595 |
CK | 2 | OSPOX8 | 1.7640638 | 1.393984 | 0.5409190 | 0.2704595 |
CK | 3 | OSPOX8 | 1.1700339 | 1.393984 | 0.5409190 | 0.2704595 |
CK | 4 | OSPOX8 | 0.6965246 | 1.393984 | 0.5409190 | 0.2704595 |
Treatment | 1 | OSPOX8 | 0.6609311 | 1.000000 | 0.2887030 | 0.1443515 |
Treatment | 2 | OSPOX8 | 1.0000000 | 1.000000 | 0.2887030 | 0.1443515 |
CK | 1 | OsCeBip | 1.0000000 | 1.123741 | 0.5020716 | 0.2510358 |
CK | 2 | OsCeBip | 0.3006107 | 1.123741 | 0.5020716 | 0.2510358 |
CK | 3 | OsCeBip | 0.9256854 | 1.123741 | 0.5020716 | 0.2510358 |
CK | 4 | OsCeBip | 1.1681248 | 1.123741 | 0.5020716 | 0.2510358 |
Treatment | 1 | OsCeBip | 0.5103220 | 1.000000 | 0.4585177 | 0.2292588 |
Treatment | 2 | OsCeBip | 1.0000000 | 1.000000 | 0.4585177 | 0.2292588 |
CK | 1 | OsPR10 | 1.0000000 | 1.946979 | 0.6240021 | 0.3120011 |
CK | 2 | OsPR10 | 2.1298352 | 1.946979 | 0.6240021 | 0.3120011 |
CK | 3 | OsPR10 | 1.3107239 | 1.946979 | 0.6240021 | 0.3120011 |
CK | 4 | OsPR10 | 1.5101879 | 1.946979 | 0.6240021 | 0.3120011 |
Treatment | 1 | OsPR10 | 0.7202223 | 1.000000 | 0.2092850 | 0.1046425 |
Treatment | 2 | OsPR10 | 0.6869024 | 1.000000 | 0.2092850 | 0.1046425 |
CK | 1 | OsWAK91 | 0.1901955 | 1.000000 | 0.4515142 | 0.2257571 |
CK | 2 | OsWAK91 | 0.3025867 | 1.000000 | 0.4515142 | 0.2257571 |
CK | 3 | OsWAK91 | 0.5006031 | 1.000000 | 0.4515142 | 0.2257571 |
CK | 4 | OsWAK91 | 0.2294250 | 1.000000 | 0.4515142 | 0.2257571 |
Treatment | 1 | OsWAK91 | 1.5798934 | 4.219614 | 1.3413252 | 0.6706626 |
Treatment | 2 | OsWAK91 | 1.0000000 | 4.219614 | 1.3413252 | 0.6706626 |
"figure"]] res[[
## Warning: Removed 16 rows containing missing values (geom_text).