- 1、本文档共16页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
1. R 语言安装 :官方网站 / 安装软件。
2. 所需要的软件包 :
2.1 affy 数据处理相关的程序包
在 R 中复制 source(/biocLite.R)
biocLite(affy)
2.2 热度图相关程序包
Gplots ():install.packages(gplots)
3. 获取基因表达数据
3.1 读取基因芯片数据( cel.files )
the.filter - matrix(c(CEL file (*.cel), *.cel, All (*.*), *.*), ncol = 2, byrow = T)
cel.files - choose.files(caption = Select CEL files, multi = TRUE, filters = the.filter, index = 1)
raw.data - ReadAffy(filenames = cel.files)
3.2 sampleNames(raw.data) ang # 先看看原样品名称的规律
3.3 pat - .*MT-([0-9A-Z]+).* # 样品名称查找的正则表达式
sampleNames(raw.data) - gsub(pat, \\1, cel.files) #gsub 为正则表达式查找函数
(samples - sampleNames(raw.data))
pData (raw.data)$treatment - rep ( c (0h, 1h, 24h, 7d), each = 2) #确定样品重复数
使用 rma 方法进行预处理: eset.rma - rma(raw.data)
## Background correcting
## Normalizing
## Calculating Expression
4. 计算基因表达量
emat.rma.log2 - exprs (eset.rma)
class ( emat.rma.log2)
head(emat.rma.log2, 1)
# 计算平均值,并做对数转换
results.rma - data.frame ((emat.rma.log2[, c (1, 3, 5, 7)] + emat.rma.log2[,
c (2, 4, 6, 8)])/2)
# 计算表达量差异倍数
results.rma$fc.1h - results.rma[, 2] - results.rma[, 1]
results.rma$fc.24h - results.rma[, 3] - results.rma[, 1]
results.rma$fc.7d - results.rma[, 4] - results.rma[, 1]
head(results.rma, 2)
5.T 检验
p.value = apply (emat.rma.log2,1, function(x)(t.test(x[7:9], x[10:12])$p.value))
6. 导出数据
write.csv (results.rma,file=C:/users/suntao/desktop/data.csv)
7. 选取目的基因
在 /index.php 上确定探针,选取数据;汇总到 excel 表格中,保存为 csv 格式。
8.热度图
cipk= read.csv(c:/users/suntao/desktop/TaCIPK affx arry log.csv)
s(cipk)=cipk$genename
cipk - cipk[,-1]
cipk_matrix= data.matrix( cipk)
library (gplots)
heatmap.2(cipk_matrix,Rowv=FALSE,Colv=FALSE,col=greenred(75),key=TRUE,keysize=0.8,trace=n
one,=none,symkey=FALSE,revC=FALSE,margins=c(10,10),denscol=traceco
文档评论(0)