写在前面
不知道大家都是怎么完成qPCR
的计算的,在不会R
的时候,我是用一个祖传的Excel
表进行计算的。🤣
但是,一直有个缺点,如果需要计算的量比较大时,就不方便了,去搜了一下文献,发现了一个最近发表的R包
,不仅可以计算反转录
的RNA
体积,还可以帮助选择定量方法,简直是神仙R包,本期就介绍一下它的使用吧。🥰
感谢原作者的开发,嘿嘿,文末有引用方法。👀
用到的包
rm(list = ls())
library(tidyverse)
library(ggsci)
library(qPCRtools)
library(ggstatsplot)
计算反转录用的RNA体积
3.1 示例数据
包内自带了示例数据,这里我们就直接加载吧。🥳
df.1
需要至少2列,sample
和concentration
,剩下的大家随意。🤣
Note! 这里浓度默认是ng/ul
。🤜
df.1.path <- system.file("examples", "crtv.data.txt", package = "qPCRtools")
df.1 <- data.table::fread(df.1.path)
head(df.1)

Note! 这里我们的df.2
文件至少要包含一个all
的列,告诉R
具体的反应体积。🤒
df.2.path <- system.file("examples", "crtv.template.txt", package = "qPCRtools")
df.2 <- data.table::fread(df.2.path)
head(df.2)

3.2 开始计算
现在我们就知道每个sample
该如何配置反转路体积啦,Perfect!😁
这里我们假设反转1ug。🤩
result <- CalRTable(data = df.1, template = df.2, RNA.weight = 1)
head(result)

相对标准曲线和扩增效率的计算
拿到新的Primers
应该先进行扩增效率
的计算,一起看下怎么弄吧。👇
4.1 示例数据
df.1
包含至少2列,孔的位置和Cq
值。😗
df.1.path <- system.file("examples", "calsc.cq.txt", package = "qPCRtools")
df.1 <- data.table::fread(df.1.path)
head(df.1)

df.2
包含至少2列,孔的位置和浓度
。🫠
df.2.path <- system.file("examples", "calsc.info.txt", package = "qPCRtools")
df.2 <- data.table::fread(df.2.path)
head(df.2)

4.2 开始计算
Note! 大家注意一下这里的稀释倍数,默认是4
,可以按需更改。😂
CalCurve(
cq.table = df.1,
concen.table = df.2,
lowest.concen = 4,
highest.concen = 4096,
dilu = 4,
by = "mean"
) -> p
p[["table"]]

4.3 可视化
p[["figure"]] +
theme_bw()+
scale_color_npg()

使用相对标准曲线法计算基因表达水平
如果内参基因和目的基因的扩增效率
不相等,我们就不能使用2-ΔΔCt法了,需要选择无参的方法。🤨
5.1 示例数据
cq.table
至少包含position
和Cq
值。😘
df1.path <- system.file("examples", "cal.exp.curve.cq.txt", package = "qPCRtools")
cq.table <- data.table::fread(df1.path)
head(cq.table)

curve.table
为标准曲线,可以通过前面介绍的方法计算得出。😂
df2.path = system.file("examples", "cal.expre.curve.sdc.txt", package = "qPCRtools")
curve.table = data.table::fread(df2.path)
head(curve.table)

design.table
需要包含position
和相应的信息,如干预
、基因名
等。 🙃
df3.path = system.file("examples", "cal.exp.curve.design.txt", package = "qPCRtools")
design.table = data.table::fread(df3.path)
head(design.table)

5.2 开始计算
CalExpCurve(
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
res[["table"]]

5.3 可视化
大家可以直接使用res[["figure"]]
提取结果的可视化图,这里我为了更加美观,提取了数据进行美化。😘
res[["table"]] %>%
grouped_ggbetweenstats(y = expre,
x = Treatment,
grouping.var = Gene,
type = "nonparametric"
)

2-ΔΔCt法计算表达水平
数据准备与上面的方法相似,这里就不做具体介绍了。😂
6.1 示例数据
df1.path <- system.file("examples", "ddct.cq.txt", package = "qPCRtools")
cq.table <- data.table::fread(df1.path)
head(cq.table)

df2.path <- system.file("examples", "ddct.design.txt", package = "qPCRtools")
design.table <- data.table::fread(df2.path)
head(df.2)

6.2 开始计算
CalExp2ddCt(cq.table,
design.table,
ref.gene = "OsUBQ", ## 内参
ref.group = "CK", ## 对照
stat.method = "t.test", ## 统计方法
fig.type = "bar",
fig.ncol = NULL) -> res
res[["table"]]

6.3 可视化
res[["table"]] %>%
grouped_ggbetweenstats(y = expre,
x = Treatment,
grouping.var = gene,
type = "nonparametric"
)

使用RqPCR方法计算表达水平
这种方法也是一种不需要内参的计算方法,数据格式也是几乎一样的。
7.1 示例数据
df1.path <- system.file("examples", "cal.expre.rqpcr.cq.txt", package = "qPCRtools")
cq.table <- data.table::fread(df1.path, header = TRUE)
head(cq.table)

df2.path <- system.file("examples", "cal.expre.rqpcr.design.txt", package = "qPCRtools")
design.table <- data.table::fread(df2.path, header = TRUE)
head(design.table)

7.2 开始计算
CalExpRqPCR(cq.table,
design.table,
ref.gene = NULL,
ref.group = "CK",
stat.method = "t.test",
fig.type = "box",
fig.ncol = NULL
) -> res
res[["table"]]

7.3 可视化
res[["table"]] %>%
grouped_ggbetweenstats(y = Expre4Stat,
x = group,
grouping.var = gene,
type = "nonparametric"
)

引用
🌟 如何引用:👇
<font size=1>Li X, Wang Y, Li J, Mei X, Liu Y, Huang H. qPCRtools: An R package for qPCR data processing and visualization. Front Genet. 2022;13:1002704. Published 2022 Sep 13. doi:10.3389/fgene.2022.1002704</font>
<img src="https://img.haomeiwen.com/i24475539/b51a7740af8c7645.png" alt="泡芙" style="zoom:25%;" />
<center>最后祝大家早日不卷!~</center>
点个在看吧各位~ ✐.ɴɪᴄᴇ ᴅᴀʏ 〰
<center> <b>📍 往期精彩 <b> </center>
📍 <font size=1>🤩 ComplexHeatmap | 颜狗写的高颜值热图代码!</font>
📍 <font size=1>🤥 ComplexHeatmap | 你的热图注释还挤在一起看不清吗!?</font>
📍 <font size=1>🤨 Google | 谷歌翻译崩了我们怎么办!?(附完美解决方案)</font>
📍 <font size=1>🤩 scRNA-seq | 吐血整理的单细胞入门教程</font>
📍 <font size=1>🤣 NetworkD3 | 让我们一起画个动态的桑基图吧~</font>
📍 <font size=1>🤩 RColorBrewer | 再多的配色也能轻松搞定!~</font>
📍 <font size=1>🧐 rms | 批量完成你的线性回归</font>
📍 <font size=1>🤩 CMplot | 完美复刻Nature上的曼哈顿图</font>
📍 <font size=1>🤠 Network | 高颜值动态网络可视化工具</font>
📍 <font size=1>🤗 boxjitter | 完美复刻Nature上的高颜值统计图</font>
📍 <font size=1>🤫 linkET | 完美解决ggcor安装失败方案(附教程)</font>
📍 <font size=1>......</font>
本文由mdnice多平台发布
网友评论