r - 微阵列 Limma 包,在 topTable 函数中不为 probsets 列分配 ID

标签 r bioconductor

我尝试了 Daniel Swan 的教程,效果非常好。但我在 limma 包topTable 函数中遇到了问题。

“topTable”函数创建一个“探针集列表”,但该探针集列表没有“ID”标题(其他列名称是它们的样本名称,但探针列表列没有名称(ID))。

结果,当我运行时:

gene.symbols <- getSYMBOL(probeset.list$ID, "hgu133plus2")

我收到以下错误

  Error in .select(x, keys, columns, keytype = extraArgs[["kt"]], jointype = jointype): 
      'keys' must be a character vector

topTable 是:

               logFC  AveExpr        t      P.Value    adj.P.Val        B
204779_s_at 7.367790 4.171707 72.77347 3.284937e-15 8.969850e-11 20.25762
207016_s_at 6.936667 4.027733 57.39252 3.694641e-14 5.044293e-10 19.44987
209631_s_at 5.192949 4.003992 51.24892 1.170273e-13 1.065182e-09 18.96660

我的表达式集是通过simpleaffy(gcrma)包实现的。 我在 Windows 7 下运行 R 3.0.2,使用最新的生物导体包 simpleaffy_2.38.0 、 limma_3.18.13 和注释文件: hgu133plus2.db_2.10.1 、hgu133plus2probe_2.13.0、hgu133plus2cdf_2.13.0

如果有人能帮助我,我将非常感激。

最佳答案

ID 不存储为 ID 列,而是存储为表的行名。将行更改为:

gene.symbols <- getSYMBOL(rownames(probeset.list), "hgu133plus2")

如果您希望有一个 ID 列而不是使用行名称,您可以使用以下命令指定一个 ID 列:

probeset.list$ID = rownames(probeset.list)

根据toptable函数的文档,当且仅当存在重复的基因名称时,ID列才会存在:

 If ‘fit’ had unique rownames, then the row.names of the above
 data.frame are the same in sorted order. Otherwise, the row.names
 of the data.frame indicate the row number in ‘fit’. If ‘fit’ had
 duplicated row names, then these are preserved in the ‘ID’ column
 of the data.frame, or in ‘ID0’ if ‘genelist’ already contained an
 ‘ID’ column.

在您看到的使用 ID 的其他示例中,输入中一定存在重复的基因名称。这是有道理的,因为 R 通常不喜欢重复的行名(但列中存在重复的 ID 没有问题)。

关于r - 微阵列 Limma 包,在 topTable 函数中不为 probsets 列分配 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22970546/

相关文章:

r - 加快独特观测值的成对计数

使用匿名函数的 R 流水线

r - ESet的子集/划分ESet

r - 通过基因 id 获取 SNP 列表的最佳方法?

r - 如何排除要在 R 中更新的包?

r - 将两个 GRanges 对象相减

Rnw文档中的SQL代码与knitr

r - 根据大于或小于前一列中的条件,向 R 中的数据框添加一列

r - dplyr - 使用 rowwise() 应用自定义函数

r - 田庄-(左)加入