<p>Now there's another option, the <code>ensembl_rest</code> module, a thin wrapper around the <a href="http://rest.ensembl.org" rel="noreferrer">Ensembl REST API</a> to simplify its usage and make it more pythonic. You can find the documentation <a href="https://ensemblrest.readthedocs.io" rel="noreferrer">here</a>. </p>

<p>To clarify things, I'm the creator and maintainer, but still think it's a legitimate alternative.</p>

CC BY-SA 4.0
2019-07-07T02:00:50.120Z
This looks pretty neat and actually a lot more cleaner than the default python option in the EnsEMBL page. Great work!
Ram RS
CC BY-SA 4.0
2019-07-06T15:57:18.027Z
2019-07-06T15:57:18.027Z
Ad115
<p>The correct API for Ensembl is the <a href="http://rest.ensembl.org/documentation" rel="nofollow noreferrer">Ensembl REST API</a> which is updated and maintained by Ensembl, and language agnostic.</p>

CC BY-SA 4.0
2019-04-10T18:34:09.590Z
Hi @Emily_Ensembl, I wonder if there is a easy-to-learn kind of tutorial on Ensembl REST API. I want to use it to carry out general tasks such as (1) converting gene ids to symbol and other way around and (2) fetching a genome sequences of a particular species (assembly and ensembl release) within specific coordinates.
user345394
CC BY-SA 4.0
2019-04-11T15:32:12.207Z
We've got an [online course here](https://www.ebi.ac.uk/training/online/course/ensembl-rest-api).
Emily_Ensembl
CC BY-SA 4.0
2018-08-06T15:35:47.527Z
2018-08-06T15:35:47.527Z
Emily_Ensembl
<p>Dear bioinformaticians,</p>

<p>I could find two python APIs to mine ENSEMBL genome databases. There is a <a href="https://github.com/openvax/pyensembl" rel="nofollow noreferrer"><code>pyensembl</code></a> which is more popular and then there is <a href="https://github.com/simonvh/genomepy" rel="nofollow noreferrer"><code>genomepy</code></a> which is less popular. Following is my experience with both.</p>

<p><strong>1. <code>pyensembl</code>:</strong></p>

<p><code>pyensembl</code> is a fast and powerful API to mine ENSEMBL genome databases. 
I have been using it for a while and in my experience it works very well. The name of the package may make you believe that it is developed/maintained by ENSEMBL. That is not true. Still, being an open source package with a realistic potential to be the default API for mining ENSEMBL genome databases.</p>

<p>However, there are some issues related to it's development that users may find disconcerting.</p>

<p>For example, documentation. I could only find a comprehensive api <a href="https://media.readthedocs.org/pdf/pyensembl/latest/pyensembl.pdf" rel="nofollow noreferrer">documentation for release 0.8.10</a>. Current release is 1.1. Not even <a href="https://github.com/openvax/pyensembl/releases" rel="nofollow noreferrer">release notes are available</a>. Therefore users have to rely on few lines of documentation that is available in the <a href="https://github.com/openvax/pyensembl/blob/master/README.md" rel="nofollow noreferrer">README.md</a>. </p>

<p>Also, as far as I know, it is not peer reviewed even though it is an excellent analysis resource.</p>

<p><strong>2. <code>genomepy</code></strong></p>

<p><code>genomepy</code> loads all of the genome files into the RAM, making it immediately unusable, especially if you are working with larger genome such as human genome.</p>

<p>So my question is: Is there any other better python API for working with ENSEMBL genomes?</p>

CC BY-SA 4.0
2018-07-31T14:28:13.990Z
"That makes you slightly worried about it's reliability."  You have the source code, you can see what it does and you can copy and modify as you wish. Why do you think it is unreliable? You can improve the documentation and suggest changes, but it looks like it is documented well with docstrings although the documentation has not been rebuild in a pdf format in a couple of years.
llrs
CC BY-SA 4.0
2018-07-31T14:48:25.220Z
@Llopis I agree with both points. (1) I just wonder why it is not published. It is is a very useful resource. I will remove the *reliability*part from my question. Thanks.
(2) Conventionally, for contributing (making pull requests), a potential contributor has to understand the code and to understand the code, the he/she has to go through the  documentation (preferably the latest one). So that's why I feel documentation is an important issue. May be I will build the documentation myself and contribute.
user345394
CC BY-SA 4.0
2018-08-15T07:49:28.647Z
If we wrote papers on every tool we create we'd never have time to do anything productive. That and the limited benefit of actually submitting a paper on a tool/package is the reason that most never get published in that way.
Devon Ryan
<python><genome><sequence-analysis><ensembl>
Python API for working with ENSEMBL genomes
# Python API for working with ENSEMBL genomes

(Asked by: username_0 on 2018-07-31)

Dear bioinformaticians,

I could find two python APIs to mine ENSEMBL genome databases. There is a [`pyensembl`](https://github.com/openvax/pyensembl) which is more popular and then there is [`genomepy`](https://github.com/simonvh/genomepy) which is less popular. Following is my experience with both.

**1. `pyensembl`:**

`pyensembl` is a fast and powerful API to mine ENSEMBL genome databases.
I have been using it for a while and in my experience it works very well. The name of the package may make you believe that it is developed/maintained by ENSEMBL. That is not true. Still, being an open source package with a realistic potential to be the default API for mining ENSEMBL genome databases.

However, there are some issues related to it's development that users may find disconcerting.

For example, documentation. I could only find a comprehensive api [documentation for release 0.8.10](https://media.readthedocs.org/pdf/pyensembl/latest/pyensembl.pdf). Current release is 1.1. Not even [release notes are available](https://github.com/openvax/pyensembl/releases). Therefore users have to rely on few lines of documentation that is available in the [README.md](https://github.com/openvax/pyensembl/blob/master/README.md).

Also, as far as I know, it is not peer reviewed even though it is an excellent analysis resource.

**2. `genomepy`**

`genomepy` loads all of the genome files into the RAM, making it immediately unusable, especially if you are working with larger genome such as human genome.

So my question is: Is there any other better python API for working with ENSEMBL genomes?

**Tags:** python, genome, sequence-analysis, ensembl
> **Comments:**
> **username_1**: "That makes you slightly worried about it's reliability."  You have the source code, you can see what it does and you can copy and modify as you wish. Why do you think it is unreliable? You can improve the documentation and suggest changes, but it looks like it is documented well with docstrings although the documentation has not been rebuild in a pdf format in a couple of years.  
> **username_0**: @Llopis I agree with both points. (1) I just wonder why it is not published. It is is a very useful resource. I will remove the *reliability*part from my question. Thanks. (2) Conventionally, for contributing (making pull requests), a potential contributor has to understand the code and to understand the code, the he/she has to go through the  documentation (preferably the latest one). So that's why I feel documentation is an important issue. May be I will build the documentation myself and contribute.  
> **username_2**: If we wrote papers on every tool we create we'd never have time to do anything productive. That and the limited benefit of actually submitting a paper on a tool/package is the reason that most never get published in that way.  

---

## 2 answers

### Answer by username_5 on 2018-08-06. Score: 4 | Accepted answer

The correct API for Ensembl is the [Ensembl REST API](http://rest.ensembl.org/documentation) which is updated and maintained by Ensembl, and language agnostic.

> **Comments:**
> **username_0**: Hi @Emily_Ensembl, I wonder if there is a easy-to-learn kind of tutorial on Ensembl REST API. I want to use it to carry out general tasks such as (1) converting gene ids to symbol and other way around and (2) fetching a genome sequences of a particular species (assembly and ensembl release) within specific coordinates.  
> **username_5**: We've got an [online course here](https://www.ebi.ac.uk/training/online/course/ensembl-rest-api).  

---

### Answer by username_3 on 2019-07-06. Score: 6

Now there's another option, the `ensembl_rest` module, a thin wrapper around the [Ensembl REST API](http://rest.ensembl.org) to simplify its usage and make it more pythonic. You can find the documentation [here](https://ensemblrest.readthedocs.io).

To clarify things, I'm the creator and maintainer, but still think it's a legitimate alternative.

> **Comments:**
> **username_4**: This looks pretty neat and actually a lot more cleaner than the default python option in the EnsEMBL page. Great work!  

---

