Hi,
I am seeking to lift over gene IDs from rat to human, this is what I got:
library("biomaRt")
human = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
rat = useMart("ensembl", dataset = "rnorvegicus_gene_ensembl")
x = c("Tll1", "Tlx3") # gene list to lift over
genesV2 = getLDS(attributes = c("mgi_symbol"),
filters = "mgi_symbol",
values = x ,
mart = rat,
attributesL = c("hgnc_symbol"),
martL = human,
uniqueRows=T)
genesV2
I found several entries for the lift over between mouse and human, but not rat and human. Hope that for people working good time with biomaRt, this could be easy to solve. I will keep on searching in the mean time.
thank you & best wishes
2 answers
Cool that you got another solution. The issue in your original biomaRt approach is that the MGI Symbol is specifically for the mouse genome, in the same way that HGNC Symbol relates to the human genome. For rat you need to use the RGD Symbol. Otherwise, your code looks great e.g.
library("biomaRt")
human = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
rat = useMart("ensembl", dataset = "rnorvegicus_gene_ensembl")
x = c("Tll1", "Tlx3") # gene list to lift over
genesV2 = getLDS(attributes = c("rgd_symbol"),
filters = "rgd_symbol",
values = x ,
mart = rat,
attributesL = c("hgnc_symbol"),
martL = human,
uniqueRows=T)
genesV2
#> RGD.symbol HGNC.symbol
#> 1 Tll1 TLL1
#> 2 Tlx3 TLX3
I took another route:
library(msigdbr)
m_df = msigdbr(species = "Rattus norvegicus")
m_df_sub = m_df[,c(5,8)] # select only the gene ids necessary
m_df_sub_dis = distinct(m_df_sub) # remove non unqique rows
df = merge(x = df, y = m_df_sub_dis, 'gene_symbol', all.x = TRUE)
At the end this gave me the human gene symbols for the respective rat gene symbols
Log in to answer this question.