grimbough / biomaRt

R package providing query functionality to BioMart instances like Ensembl
https://bioconductor.org/packages/biomaRt/
34 stars 13 forks source link

Mouse to Human mapping errors #15

Closed komalsrathi closed 5 years ago

komalsrathi commented 5 years ago

Hi,

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

Here is the code:

require("biomaRt")
convertMouseGeneList <- function(x, y){
  human = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
  mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl")

  # 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)

  # 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)

  return(genesV1)
  return(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. Can you please look into this?

grimbough commented 5 years ago

Duplicate of https://support.bioconductor.org/p/121305/