biothings / mygene.info

MyGene.info: A BioThings API for gene annotations
http://mygene.info
Other
113 stars 20 forks source link

Ensembl gene annotations not uniform #138

Closed aiqc closed 2 months ago

aiqc commented 11 months ago

If it's possible for multiple ensembl values to be returned, then they should always be a list.

When using fields="symbol,ensembl.type_of_gene"

[
{
    'query': 'ENSG00000283341',
    '_id': 'ENSG00000283341',
    '_version': 1,
    'ensembl': {'type_of_gene': 'lncRNA'}
},
{
    'query': 'ENSG00000199352', 
    '_id': '100169751',
    '_version': 2, 
    'ensembl': [{'type_of_gene': 'rRNA'}, {'type_of_gene': 'rRNA'}], 
    'symbol': 'RNA5S1'
}
]
aiqc commented 11 months ago

Also, why no null value for symbol?

This forces the user to do parsing like checking for the existence of keys. just return all of the data

if 'symbol' not in list(entry.keys()):
newgene commented 9 months ago

@aiqc I think this issue can be resolved as described in #42, particularly this comment.