Skip to content

Commit

Permalink
feat(scripts): add script to get distinct CPIC lookup genes
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Jan 15, 2024
1 parent 2f23784 commit 54e1ea8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions scripts/cpic_lookup_genes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import json
import requests

cpicLookupUrl = "https://api.cpicpgx.org/v1/diplotype?select=genesymbol"
response = requests.get(cpicLookupUrl)
cpicLookups = response.json()
genes = set()
for lookup in cpicLookups:
genes.add(lookup['genesymbol'])
for gene in genes:
print(gene)
3 changes: 2 additions & 1 deletion scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pymongo==3.5.1
pytest
pytest
requests

0 comments on commit 54e1ea8

Please sign in to comment.