DEseq2结果,enrichGO和ENSEMBL ID不匹配

问题描述 投票:0回答:1

我正在尝试做DEG,然后对结果使用enrichGO。

我最初在 DESEQ2 中使用代码

dds=DESeqDataSet(se,design=~TRAIT)
dds=DESeq(dds)
res=results(dds)

我目前有 DESEq2 的结果,如下所示:

log2 fold change (MLE): TRAIT S vs N 
Wald test p-value: TRAIT S vs N 
DataFrame with 42800 rows and 6 columns
                      baseMean log2FoldChange     lfcSE       stat    pvalue      padj
                     <numeric>      <numeric> <numeric>  <numeric> <numeric> <numeric>
ENSG00000000003.15   4.5568518     -0.1048029 0.5527906 -0.1895889  0.849631        NA
ENSG00000000005.6    0.0802772     -0.1570978 3.0089434 -0.0522103  0.958361        NA
ENSG00000000419.14 152.9563242      0.0437748 0.1139477  0.3841658  0.700856  0.857539
ENSG00000000457.14 271.1873887      0.0873888 0.0923764  0.9460082  0.344144  0.606002
ENSG00000000460.17  55.4021510      0.0671604 0.1729930  0.3882263  0.697849  0.856165

我想对上面的结果运行enrichGO:

genes_to_test <- rownames(res[res$log2FoldChange>0.5,])
GO_res <- enrichGO(genes_to_test, OrgDb = org.Hs.eg.db, keyType = "ENSEMBL", ont="BP")

但是,正如您所看到的,我的 ENSEMBL 有 ID 版本(数字然后 .xx = 额外数字),因此它们与 ENSEMBL 不匹配。

捕获 ID 版本的“keytype=”替代方案是什么?

第二个问题是如何更改初始 DESEQ2 结果,以便行名称是基因名称而不是 ENSEMBL 版本 ID?

r bioinformatics ontology bioconductor
1个回答
0
投票

只需从结果对象中删除版本号即可。

gsub("\\..*", "", rownames(res))

© www.soinside.com 2019 - 2024. All rights reserved.