diferentially expressed ensembl ID to gene symbol conversion
1
0
Entering edit mode
3.8 years ago
imaparna27 ▴ 20

Hi, I am trying to convert my whole list of deferentially expressed genes (DEG) to their respective HGNC symbols against ensembl ID that I have pre-defined in my table.

I referred to some biomart scripts, but seems I could only retrieve all genes mentioned in the ensembl and not according to my requirements.

dim(df)
[1] 56804     7

dim(G_list)
[1] 67180     3

Here's the code I am using-

library('biomaRt')
ensembl = useMart("ensembl",dataset="hsapiens_gene_ensembl")
genes = df$Ensembl_ID
G_list <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id",
                            "entrezgene_id", "hgnc_symbol"), values=genes, mart=ensembl)

I have my first column as Ensembl ID for DEG, against which I want to add gene symbols. How can I achieve this?

Thanks in advance!

DEG Ensembl HGNC_symbol biomart • 1.5k views
ADD COMMENT
1
Entering edit mode
3.8 years ago
lessismore ★ 1.4k

I've tried this and works:

library(biomaRt)
ensembl <- useEnsembl(biomart = "genes", dataset = "hsapiens_gene_ensembl")
genes <- "ENSG00000139618"
G_list <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id",
                            "entrezgene_id", "hgnc_symbol"), values=genes, mart=ensembl)
ADD COMMENT
0
Entering edit mode

Thanks a lot for your response. But, what I am trying to achieve here is, I want to specify a specific column of my data frame (in my case, df) as input, how can I do that?

ADD REPLY
2
Entering edit mode

Exactly the same. This function is vectorized so it'll work on every element of the vector you supply with df$Ensembl_ID

library(biomaRt)
ensembl <- useEnsembl(biomart = "genes", dataset = "hsapiens_gene_ensembl")
genes <- df$Ensembl_ID
G_list <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id",
                            "entrezgene_id", "hgnc_symbol"), values=genes, mart=ensembl)
ADD REPLY
0
Entering edit mode

I could finally solve this issue, all the syntax and steps given above are correct. I could not get desired results earlier due to Ensembl version issue in my Ensembl_IDs. I could correct that, by changing values to-

values=substr(genes, 1, 15)
ADD REPLY

Login before adding your answer.

Traffic: 2431 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6