2
$\begingroup$

Is there a python equivalent to ensembldb? 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

$\endgroup$

1 Answer 1

4
$\begingroup$

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')
$\endgroup$
3
  • $\begingroup$ Thanks so much this is perfect. Do you happen to know if there is anything similar for NCBI? $\endgroup$
    – Greg
    Jul 12, 2021 at 15:07
  • $\begingroup$ Maybe biopython.org/docs/1.75/api/Bio.Entrez.html? $\endgroup$
    – haci
    Jul 12, 2021 at 16:16
  • $\begingroup$ I don't see a way to map coordinates with Bio.Entrez unfortunately. Thanks though. $\endgroup$
    – Greg
    Jul 12, 2021 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.