<p>My background in coding is more extensive in Python.  If you have Python skills, I can say for sure, use the Bioservices library:</p>
<pre class="lang-py prettyprint-override"><code>from bioservices import BioMart
</code></pre>
<p>Install Bioservices via pip:</p>
<pre><code>pip install bioservices
</code></pre>
<p>You can also use the web-based tool on Ensembl called BioMart.  It does the same thing, just easier to use if you continue to have difficulties with Python or in your case, R.  I looked up the R package for BioMart, it is called: biomaRt</p>
<p>Here's the link for the Ensembl BioMart web-based tool if you need to use it and are in a crunch for time on your project:</p>
<p><a href="https://useast.ensembl.org/info/data/biomart/how_to_use_biomart.html#introduction" rel="nofollow noreferrer">https://useast.ensembl.org/info/data/biomart/how_to_use_biomart.html#introduction</a></p>
<p>I hope this helps! :)</p>

CC BY-SA 4.0
2023-11-15T14:57:04.080Z
2023-11-16T20:29:27.437Z
2023-11-16T20:29:27.437Z
Rachel Sweeney
<p>I wanted to use the code to convert mouse to human symbol, but I have problem with the mirror, I've tried to establish another one, but continue to have the same problem.</p>
<pre class="lang-r prettyprint-override"><code>musGenes &lt;- c(&quot;Hmmr&quot;, &quot;Tlx3&quot;, &quot;Cpeb4&quot;)

# Basic function to convert mouse to human gene names
convertMouseGeneList &lt;- function(x){
    require(&quot;biomaRt&quot;)
    human = useMart(&quot;ensembl&quot;, dataset = &quot;hsapiens_gene_ensembl&quot;)
    mouse = useMart(&quot;ensembl&quot;, dataset = &quot;mmusculus_gene_ensembl&quot;)
    genesV2 = getLDS(attributes = c(&quot;mgi_symbol&quot;), filters = &quot;mgi_symbol&quot;, values = x , mart = mouse, attributesL = c(&quot;hgnc_symbol&quot;), martL = human, uniqueRows=T)
    humanx &lt;- unique(genesV2[, 2])

    # Print the first 6 genes found to the screen
    print(head(humanx))
    return(humanx)
}
</code></pre>

CC BY-SA 4.0
2023-11-15T14:52:48.550Z
Show us the error message.
Ram RS
<r><biomart>
biomarRT conversion of symbols
# biomarRT conversion of symbols

(Asked by: username_0 on 2023-11-14)

I wanted to use the code to convert mouse to human symbol, but I have problem with the mirror, I've tried to establish another one, but continue to have the same problem.
musGenes <- c("Hmmr", "Tlx3", "Cpeb4")

# Basic function to convert mouse to human gene names
convertMouseGeneList <- function(x){
    require("biomaRt")
    human = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
    mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl")
    genesV2 = getLDS(attributes = c("mgi_symbol"), filters = "mgi_symbol", values = x , mart = mouse, attributesL = c("hgnc_symbol"), martL = human, uniqueRows=T)
    humanx <- unique(genesV2[, 2])

    # Print the first 6 genes found to the screen
    print(head(humanx))
    return(humanx)
}

**Tags:** r, biomart
> **Comments:**
> **username_1**: Show us the error message.  

---

## 1 answers

### Answer by username_2 on 2023-11-15. Score: 1

My background in coding is more extensive in Python.  If you have Python skills, I can say for sure, use the Bioservices library:
from bioservices import BioMart

Install Bioservices via pip:
pip install bioservices

You can also use the web-based tool on Ensembl called BioMart.  It does the same thing, just easier to use if you continue to have difficulties with Python or in your case, R.  I looked up the R package for BioMart, it is called: biomaRt
Here's the link for the Ensembl BioMart web-based tool if you need to use it and are in a crunch for time on your project:
https://useast.ensembl.org/info/data/biomart/how_to_use_biomart.html#introduction
I hope this helps! :)


---

