文章寫得不錯(cuò)十拣,但是有個(gè)問題
res = results(dds2, contrast=c("condition", "control", "treat")) 這個(gè)地方應(yīng)該是存在問題的
下面是help文件中result中contrast參數(shù)的描述
this argument specifies what comparison to extract from the object to build a results table. one of either:
a character vector with exactly three elements: the name of a factor in the design formula, the name of the numerator level for the fold change, and the name of the denominator level for the fold change (simplest case)
a list of 2 character vectors: the names of the fold changes for the numerator, and the names of the fold changes for the denominator. these names should be elements of resultsNames(object). if the list is length 1, a second element is added which is the empty character vector, character(). (more general case, can be to combine interaction terms and main effects)
a numeric contrast vector with one element for each element in resultsNames(object) (most general case)
If specified, the name argument is ignored.
可見棵譬,當(dāng)contrast參數(shù)有三個(gè)元素時(shí)依次代表 數(shù)據(jù)中作為treat/control標(biāo)簽的列的名稱, fold change的分子呀页, 以及fold change的分母。
fold change 一般算的時(shí)treat/control叫挟,作者也在他的描述中說他算的是treat versus control双炕,所以這里正常應(yīng)該是
res = results(dds, contrast=c("condition", "treat", "control"))
在作者后面分析部分
> diff_gene_deseq2 <-subset(res, padj < 0.05 & abs(log2FoldChange) > 1)
> head(diff_gene_deseq2)
log2 fold change (MLE): condition control vs treat
也展示了他這里算的log2 fold change是control vs treat
RNA-seq(7): DEseq2篩選差異表達(dá)基因并注釋(bioMart)============================================寫在前面:可以參考另外一篇《得到差異基因后怎么做踱蠢?[https://www.jians...