Entering edit mode
7 weeks ago
iddryg
•
0
Hi, I'm sure I'm missing something obvious, but is there an easy way to access the gene symbols after adding them with the addIds() function in tximeta?
gse <- addIds(gse, "SYMBOL", gene=TRUE)
mcols(gse)
DataFrame with 60240 rows and 3 columns
gene_id
<character>
ENSG00000000003.15 ENSG00000000003.15
ENSG00000000005.6 ENSG00000000005.6
ENSG00000000419.12 ENSG00000000419.12
ENSG00000000457.14 ENSG00000000457.14
ENSG00000000460.17 ENSG00000000460.17
... ...
ENSG00000288600.1 ENSG00000288600.1
ENSG00000288601.1 ENSG00000288601.1
ENSG00000288602.1 ENSG00000288602.1
ENSG00000288603.1 ENSG00000288603.1
ENSG00000288604.1 ENSG00000288604.1
tx_ids
<CharacterList>
ENSG00000000003.15 ENST00000373020.9,ENST00000612152.4,ENST00000614008.4,...
ENSG00000000005.6 ENST00000373031.5,ENST00000485971.1
ENSG00000000419.12 ENST00000371588.9,ENST00000466152.5,ENST00000371582.8,...
ENSG00000000457.14 ENST00000367771.11,ENST00000367770.5,ENST00000367772.8,...
ENSG00000000460.17 ENST00000498289.5,ENST00000472795.5,ENST00000359326.9,...
... ...
ENSG00000288600.1 ENST00000674216.1
ENSG00000288601.1 ENST00000674448.1
ENSG00000288602.1 ENST00000520044.5,ENST00000519289.1
ENSG00000288603.1 ENST00000674332.1
ENSG00000288604.1 ENST00000674461.1
SYMBOL
<character>
ENSG00000000003.15 TSPAN6
ENSG00000000005.6 TNMD
ENSG00000000419.12 DPM1
ENSG00000000457.14 SCYL3
ENSG00000000460.17 C1orf112
... ...
ENSG00000288600.1 NA
ENSG00000288601.1 RNA5SP424
ENSG00000288602.1 C8orf44-SGK3
ENSG00000288603.1 SNORA74C-2
ENSG00000288604.1 NA
So I know that the gene symbols are in there somewhere, but I'm not sure how to access them. Later when doing differential expression with deseq2, it still shows the ensembl gene ids and not the symbols.
res_test %>% head(3)
log2 fold change (MLE): Serum 10_perc_FCS vs 2_perc_FCS
Wald test p-value: Serum 10_perc_FCS vs 2_perc_FCS
DataFrame with 3 rows and 6 columns
baseMean log2FoldChange lfcSE stat pvalue
<numeric> <numeric> <numeric> <numeric> <numeric>
ENSG00000000003.15 423.607 0.317025 0.170508 1.85930 0.0629842
ENSG00000000005.6 0.000 NA NA NA NA
ENSG00000000419.12 532.836 0.356938 0.148210 2.40834 0.0160254
padj
<numeric>
ENSG00000000003.15 0.241174
ENSG00000000005.6 NA
ENSG00000000419.12 0.099506
Any way to pull those gene symbols out and replace the ensembl ids? I know there are other ways to do this more manually like with org.Hs.eg.db but I feel like I'm just missing a simple function here. Thanks!