240 发简信
IP属地:四川
  • 文章写得不错,但是有个问题

    res = results(dds2, contrast=c("condition", "control", "treat")) 这个地方应该是存在问题的

    下面是help文件中result中contrast参数的描述

    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.

    可见,当contrast参数有三个元素时依次代表 数据中作为treat/control标签的列的名称, fold change的分子, 以及fold change的分母。
    fold change 一般算的时treat/control,作者也在他的描述中说他算的是treat versus control,所以这里正常应该是
    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筛选差异表达基因并注释(bioMart)

    ============================================写在前面:可以参考另外一篇《得到差异基因后怎么做?[https://www.jians...