一:安装并加装该R包
安装就用source(“http://bioconductor.org/biocLite.R”) ;biocLite(“DESeq”)即可,如果安装失败,就需要自己下载源码包,然后安装R模块。
二.所需要数据
它的说明书指定了我们一个数据source(“http://bioconductor.org/biocLite.R”) ;
biocLite(“pasilla”)
安装了pasilla这个包之后,在这个包的安装目录就可以找到一个表格文件,就是我们的DESeq需要的文件。
C:\Program Files\R\R-3.2.0\library\pasilla\extdata\pasilla_gene_counts.tsv
说明书原话是这样的
The table cell in the i-th row and the j-th column of the table tells how many reads have been mapped to gene i in sample j.
一般我们需要用htseq-count这个程序对我们的每个样本的sam文件做处理计数,并合并这样的数据
下面这个是示例数据,第一列是基因ID号,后面的每一列都是一个样本。
de = newCountDataSet( pasillaCountTable, condition ) #根据我们的样本因子把基因计数表格读入成一个cds对象,这个newCountDataSet函数就是为了构建对象!
对我们构建好的de对象就可以直接开始找差异啦!非常简单的几步即可
de=estimateSizeFactors(