Convert from transcripts coordinates to genomic coordinates in python
1
0
Entering edit mode
2.1 years ago
bio_elle ▴ 10

I have a list with transcripts and two coordinates, for example, ENST00000490680_1_550.

Is it possible to convert them to genomic coordinates in python, is there a package for it?

I know that, in R, I can use the ensembldb package and the function transcriptToGenome, but I would like to keep everything in python.

With the pyensembl package, I can use the transcript_by_id function to get the start and end points of the transcript in genomic coordinates, but the coordinates I have usually are the start and a breakpoint in the middle of the transcript, so I only get half of the job done.

On a similar question there is an answer with python code that I think should do it but I am unable to install one of the packages needed (cgat), but maybe I should ask a different question for that.

conversion python coordinates pyensembl • 1.5k views
ADD COMMENT
1
Entering edit mode
2.1 years ago
Emily 24k

Ensembl REST API has an endpoint that does this. There's a training course on using this with Python.

ADD COMMENT
0
Entering edit mode

Ah

I regularly use the ensembl rest API to convert from GRCh37 to GRCh38, it is literally in the same section of the documentation. I have no idea how I missed it.

Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2187 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6