# 使用DEXSeq分析NGS数据中的exon表达差异

1 7,981

`python ~/projects/RLib.3.01/DEXSeq/python_scripts/dexseq_prepare_annotation.py Homo_sapiens.GRCh37.75.fixed.gtf DEXSeq.hg19.gene.gff`

`python ~/projectGREEN/RLib.3.01/DEXSeq/python_scripts/dexseq_count.py -p yes -s no -a 10 -f bam ~/DEXSeq/DEXSeq.hg19.gene.gff bam.file out.counts`

```> suppressPackageStartupMessages(library("DEXSeq"))
> inDir <- system.file("extdata", package="pasilla")
> countFiles <- list.files(inDir, pattern="fb.txt\$", full.names=TRUE)
> gffFile <- list.files(inDir, pattern="gff\$", full.names=TRUE) ##注意，如果是自己的数据的话，比如之前示例使用的是DEXSeq.hg19.gene.gff，这里就用DEXSeq.hg19.gene.gff
> ##实验设计
> sampleTable <- data.frame(row.names=c(paste("treated", 1:3, sep=""), paste("untreated", 1:4, sep="")),
+ condition=rep(c("knockdown", "control"), c(3, 4)))
>
> dxd <- DEXSeqDataSetFromHTSeq(
+ countFiles,
+ sampleData=sampleTable,
+ design= ˜ sample + exon + condition:exon,
+ flattenedfile=gffFile)```

```> dxr <- DEXSeq(dxd)
> dxr```

```> dxd <- estimateSizeFactors(dxd) #第一步
> dxd <- estimateDispersions(dxd) #第二步，此时可以使用plotDispEsts(dxd)来观察离散情况
> dxd <- testForDEU(dxd) #第三步
> dxd <- estimateExonFoldChanges(dxd, fitExptoVar="condition")
> dxr1 <- DEXSeqResults(dxd) #可以使用plotMA(dxr1)来查看结果```

• liuqs1990 0