Question: Mouse genes not mapping to Human orthologs
1
gravatar for komal.rathi
4 weeks ago by
komal.rathi80
United States
komal.rathi80 wrote:

Hi,

I am using biomaRt to convert mouse gene symbols to human and vice versa.

Here is the code:

library(biomaRt)
human = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl")

convertMouseGeneList <- function(x, y){

  # convert mouse to human
  genesV1 = getLDS(attributes = c("mgi_symbol"), filters = "mgi_symbol", values = x , 
                   mart = mouse, attributesL = c("hgnc_symbol"), martL = human, uniqueRows=T)
  print(genesV1)

  # convert human to mouse
  genesV2 = getLDS(attributes = c("hgnc_symbol"), filters = "hgnc_symbol", values = y , 
                   mart = human, attributesL = c("mgi_symbol"), martL = mouse, uniqueRows=T)      
  print(genesV2)
}

x <- 'Rpl18' # mouse gene
y <- 'RPL18' # human gene

convertMouseGeneList(x, y)

This returns a NULL dataframe. However, on MGI, they have mentioned that the human ortholog to Rpl18 is RPL18. How can I fix this? I have also submitted an issue on github regarding this, but I wasn't sure about the response rate there.

Thanks!

biomart • 78 views
ADD COMMENTlink modified 4 weeks ago • written 4 weeks ago by komal.rathi80
Answer: Mouse genes not mapping to Human orthologs
2
gravatar for James W. MacDonald
4 weeks ago by
United States
James W. MacDonald50k wrote:

I don't think it's an issue of fixing anything. Except do note that you can't return two sets of results like that. Your function by definition will only ever return the genesV1 results, and will never return the genesV2 results. As an example:

> z <- function(x,y) {return(x); return(y)}
> z("x","y")
[1] "x"

Also

> human <- useMart("ensembl", "hsapiens_gene_ensembl")
> mouse <- useMart("ensembl", "mmusculus_gene_ensembl")
> getLDS("mgi_symbol","mgi_symbol", "Rpl18", mouse, "hgnc_symbol", martL = human) 
[1] MGI.symbol  HGNC.symbol
<0 rows> (or 0-length row.names)
> getLDS("hgnc_symbol","hgnc_symbol","RPL18", human, "mgi_symbol", martL = mouse)
[1] HGNC.symbol MGI.symbol 
<0 rows> (or 0-length row.names)
## now for something that does map at the Biomart
> getLDS("hgnc_symbol","hgnc_symbol","TP53", human, "mgi_symbol", martL = mouse)
  HGNC.symbol MGI.symbol
1        TP53      Trp53
> getLDS("mgi_symbol","mgi_symbol", "Trp53", mouse, "hgnc_symbol", martL = human) 
  MGI.symbol HGNC.symbol
1      Trp53        TP53
ADD COMMENTlink written 4 weeks ago by James W. MacDonald50k

Oh yeah, that return statement was a typo. I know two returns are not possible. I'll fix that. The question is still what I have asked: why Rpl18 is not getting mapped to RPL18.

ADD REPLYlink written 4 weeks ago by komal.rathi80

Just to emphasis what James has demonstrated, take a look at the ortholog sections on the Ensembl pages for RPL18 and TP53. Ensembl doesn't list an ortholog for RPL18 in rat, so your biomaRt query wont find anything - it only looks at the data that are in Ensembl. TP53 does has an ortholog listed, and the query returns that.

If you want to know why the data are differnet between MGI and Ensembl you'll need to contact the two institutions directly as there are many possible reasons.

ADD REPLYlink written 4 weeks ago by Mike Smith3.7k

Yeah I was confused because MGI reports the human ortholog but Ensembl does not. Anyway, I will report this to the respective institutions and would like to keep this open here until I get an answer from them.

ADD REPLYlink written 4 weeks ago by komal.rathi80
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 268 users visited in the last hour