我有一张桌子,开始是这样的:
WE1_counts WE2_counts M1_counts M2_counts M3_counts
YAL008W 465 291 911 926 946
YBR255W 1040 1357 1428 1304 1112
YGR131W 95 170 230 113 138
YNL003ßC 1800 3107 3979 3012 2899
YBR135W 1094 2143 936 860 561目标是找到条件"W“和"M”之间的差异表达基因。下面是我这样做的代码:
source("http://bioconductor.org/biocLite.R")
biocLite("DESeq")
library("locfit")
library("lattice")
library("DESeq")
condition= c("W", "W", "M", "M", "M")
#data = table given above
cds1 = newCountDataSet(data, condition)
#Normalization
cds1=estimateSizeFactors(cds1)
sizeFactors(cds1)
head( counts( cds1, normalized=TRUE ) )
#Estimate dispersion
cds1 = estimateDispersions( cds1 )
dev.new()
plotDispEsts( cds1 )
head( fData(cds1) )
# Plotting mean vs log2FoldChange
res = nbinomTest( cds1, "W", "M")
dev.new()
plotMA(res)我的问题是: nbinomTest()函数基于10%FDR返回差异表达的基因。有没有办法改变这个数字?例如,我可以在5%的FDR下检查差异表达的基因吗?
发布于 2013-07-24 17:02:15
nbinomTest仅针对多个比较进行调整,然后您可以自己应用截止。
counts(cds1)[which(res$padj < my.fdr),]
另一方面,如果您不想控制FDR过程本身的\alpha(具体地说,是FDR \alpha),那么您可能需要this (虽然还没有使用过它)
顺便说一句,在R中编码时,请考虑使用<-而不是=
https://stackoverflow.com/questions/17809472
复制相似问题