Hi,
I'm trying to use the biomaRt
package in order to map mouse gene names to the their human orthologs, retrieving the human gene names and Ensembl IDs as well as the mouse Ensembl IDs.
I started trying this:
human.mart <- biomaRt::useMart(host="https://www.ensembl.org", "ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl")
mouse.mart <- biomaRt::useMart(host="https://www.ensembl.org", "ENSEMBL_MART_ENSEMBL", dataset="mmusculus_gene_ensembl")
mouse2human.df <- biomaRt::getLDS(attributes=c("external_gene_name","ensembl_gene_id"),filters=c("external_gene_name"),values=c("Nf1","Pten","Rb1"),mart=mouse.mart,attributesL=c("external_gene_name","ensembl_gene_id"),martL=human.mart)
But it's producing this error:
Error: biomaRt has encountered an unexpected server error.
Consider trying one of the Ensembl mirrors (for more details look at ?useEnsembl)
So then I switched to trying the uswest
mirror site:
httr::set_config(httr::config(ssl_verifypeer = FALSE))
human.mart <- biomaRt::useMart(host="https://uswest.ensembl.org", "ENSEMBL_MART_ENSEMBL", dataset="hsapiens_gene_ensembl")
mouse.mart <- biomaRt::useMart(host="https://uswest.ensembl.org", "ENSEMBL_MART_ENSEMBL", dataset="mmusculus_gene_ensembl")
mouse2human.df <- biomaRt::getLDS(attributes=c("external_gene_name","ensembl_gene_id"),filters=c("external_gene_name"),values=c("Nf1","Pten","Rb1"),mart=mouse.mart,attributesL=c("external_gene_name","ensembl_gene_id"),martL=human.mart)
But this is producing this error message:
Error in .createErrorMessage(error_code = status_code(res), host = host) :
object 'err_msg' not found
Any idea what's causing this and how to get what I want?
I met the same question. I took your advice, and found it working! Thanks.