What is the best way to convert gene symbols into ensembl and other ids in Python?
1
1
Entering edit mode
23 months ago
Timofei ▴ 10

One of the solutions I've tried was using biomart (with pybiomart wrapper), which generally works, but the problem is that they don't have gene symbols, so often the ids are not found.

Ensembl API has a function, which can take synonymous gene symbols into account:

api_request = f'{server}/xrefs/symbol/homo_sapiens/{symbol}?'

However, it also works not in any case, for example:

  • When some protein has multiple subunits (so only these subunits have id, not the protein itself), it doesn't find the subunits ids (like CD3)
  • Not all the synonyms are found (like CD45R)

Do you know any other alternatives for this task?

Here is my notebook with pybiomart and ensembl API: First look CITEseq GSE148127

ensembl biomart • 1.2k views
ADD COMMENT
0
Entering edit mode
23 months ago

MyGene.py works well.

ADD COMMENT

Login before adding your answer.

Traffic: 2794 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