Skip to content

Add support for searching by gene alias #105

Description

@jpfisher72

Ideally we'd have access to GeneCards alias list but for now:

On no match for symbol/id, search aliases on MyGene.info, then refetch gene info for matches

import requests

gene = "ZAK"
url = f"https://mygene.info/v3/query?q={gene}&species=human&fields=symbol,alias,ensembl.gene"

res = requests.get(url).json()

#print(res)
for hit in res["hits"]:
    print(hit.get("symbol"), hit.get("alias"))

https://mygene.info/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions