Answers.Body: <p><code>pyensembl</code> should do the job:</p>
  <pre><code>&gt;&gt;&gt; from pyensembl import EnsemblRelease
  &gt;&gt;&gt; data = EnsemblRelease(76)
  &gt;&gt;&gt; data.transcript_by_id(&quot;ENST00000506751&quot;)
  Transcript(..., contig='5', start=140861224, end=140863521, strand='+', genome='GRCh38')
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-12T15:07:20.067Z
Answers.Text: Thanks so much this is perfect. Do you happen to know if there is anything similar for NCBI?
Answers.UserDisplayName: Greg
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-12T16:16:57.707Z
Answers.Text: Maybe https://biopython.org/docs/1.75/api/Bio.Entrez.html?
Answers.UserDisplayName: haci
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-12T19:29:19.837Z
Answers.Text: I don't see a way to map coordinates with Bio.Entrez unfortunately.  Thanks though.
Answers.UserDisplayName: Greg
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-11T10:07:27.920Z
Answers.LastActivityDate: 2021-07-11T10:07:27.920Z
Answers.UserDisplayName: haci
Body: <p>Is there a python equivalent to <a href="https://bioconductor.org/packages/release/bioc/html/ensembldb.html" rel="nofollow noreferrer">ensembldb</a>? I want to get genome coordinates for a transcript (like the function <code>transcriptToGenome</code>) but need to do it in python. I wrote a R script that I'm calling from python but I was hoping there was a more direct way to do this.</p>
  <p>Thanks</p>
  
Tags: <bioconductor><python>
Title: ensembldb equivalent in python
ThreadText: # ensembldb equivalent in python
  
  (Asked by: username_0 on 2021-07-11)
  
  Is there a python equivalent to [ensembldb](https://bioconductor.org/packages/release/bioc/html/ensembldb.html)? I want to get genome coordinates for a transcript (like the function `transcriptToGenome`) but need to do it in python. I wrote a R script that I'm calling from python but I was hoping there was a more direct way to do this.
  
  Thanks
  
  **Tags:** bioconductor, python
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-07-11. Score: 4
  
  `pyensembl` should do the job:
  
  ```
  >>> from pyensembl import EnsemblRelease
  >>> data = EnsemblRelease(76)
  >>> data.transcript_by_id("ENST00000506751")
  Transcript(..., contig='5', start=140861224, end=140863521, strand='+', genome='GRCh38')
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks so much this is perfect. Do you happen to know if there is anything similar for NCBI?  
  > **username_1**: Maybe https://biopython.org/docs/1.75/api/Bio.Entrez.html?  
  > **username_0**: I don't see a way to map coordinates with Bio.Entrez unfortunately.  Thanks though.  
  
  ---
  
  