Skip to content

Commit 28f3e9c

Browse files
authored
refactor: update to lastest version of gene-normalizer (#146)
* gene-normalizer versions allowed: >= 0.1.34 OR >= 0.2.9 * QueryHandler now accepts Database instance in the latest version * CoolSeqTool now has a gene_query_handler instance var
1 parent 7d78e6c commit 28f3e9c

File tree

7 files changed

+52
-45
lines changed

7 files changed

+52
-45
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ hgvs = "*"
1414
pydantic = "*"
1515
fastapi = "*"
1616
uvicorn = "*"
17-
gene-normalizer = "*"
17+
gene-normalizer = ">=0.1.34, != 0.2.0, != 0.2.1, != 0.2.2, != 0.2.3, != 0.2.4, != 0.2.5, != 0.2.6, != 0.2.7, != 0.2.8"
1818
"ga4gh.vrs" = "*"
1919

2020
[dev-packages]

cool_seq_tool/cool_seq_tool.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def __init__(
5959
self.uta_db = UTADatabase(db_url=db_url, db_pwd=db_pwd)
6060
gene_normalizer = GeneNormalizer(gene_query_handler, gene_db_url,
6161
gene_db_region)
62+
self.gene_query_handler = gene_normalizer.query_handler
6263
self.alignment_mapper = AlignmentMapper(
6364
self.seqrepo_access, self.transcript_mappings, self.uta_db)
6465
self.mane_transcript = MANETranscript(

cool_seq_tool/data_sources/gene_normalizer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Module for accessing Gene Normalizer"""
22
from typing import Dict
33

4+
from gene.database.dynamodb import DynamoDbDatabase
45
from gene.query import QueryHandler
56
from gene.schemas import SourceName
67

@@ -27,7 +28,8 @@ def __init__(
2728
if query_handler:
2829
self.query_handler = query_handler
2930
else:
30-
self.query_handler = QueryHandler(db_url, db_region)
31+
ddb = DynamoDbDatabase(db_url=db_url, region_name=db_region)
32+
self.query_handler = QueryHandler(ddb)
3133

3234
def get_hgnc_data(self, gene: str) -> Dict:
3335
"""Return HGNC data for a given gene

cool_seq_tool/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.11"
1+
__version__ = "0.1.12"

requirements-dev.txt

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ appdirs==1.4.4
55
appnope==0.1.3 ; sys_platform == 'darwin'
66
asttokens==2.2.1
77
asyncpg==0.27.0
8-
attrs==22.2.0 ; python_version >= '3.6'
8+
attrs==23.1.0 ; python_version >= '3.7'
99
backcall==0.2.0
10-
beautifulsoup4==4.12.0 ; python_full_version >= '3.6.0'
10+
beautifulsoup4==4.12.2 ; python_full_version >= '3.6.0'
1111
biocommons.seqrepo==0.6.5
1212
bioutils==0.5.7 ; python_version >= '3.6'
13-
boto3==1.26.103
14-
botocore==1.29.103 ; python_version >= '3.7'
13+
boto3==1.26.115
14+
botocore==1.29.115 ; python_version >= '3.7'
1515
bs4==0.0.1
1616
canonicaljson==2.0.0 ; python_version >= '3.7'
1717
certifi==2022.12.7 ; python_version >= '3.6'
@@ -22,78 +22,79 @@ coloredlogs==15.0.1 ; python_version >= '2.7' and python_version not in '3.0, 3.
2222
comm==0.1.3 ; python_version >= '3.6'
2323
configparser==5.3.0 ; python_version >= '3.7'
2424
-e .
25-
coverage[toml]==7.2.2 ; python_version >= '3.7'
25+
coverage[toml]==7.2.3 ; python_version >= '3.7'
2626
cssselect==1.2.0 ; python_version >= '3.7'
27-
debugpy==1.6.6 ; python_version >= '3.7'
27+
cython==0.29.34 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'
28+
debugpy==1.6.7 ; python_version >= '3.7'
2829
decorator==5.1.1 ; python_version >= '3.5'
2930
distlib==0.3.6
3031
exceptiongroup==1.1.1 ; python_version < '3.11'
3132
executing==1.2.0
3233
fake-useragent==1.1.3
33-
fastapi==0.95.0
34-
filelock==3.10.7 ; python_version >= '3.7'
34+
fastapi==0.95.1
35+
filelock==3.12.0 ; python_version >= '3.7'
3536
flake8==6.0.0
3637
flake8-annotations==3.0.0
3738
flake8-docstrings==1.7.0
3839
flake8-import-order==0.18.2
3940
flake8-quotes==3.3.2
4041
ga4gh.vrs==0.9.0.dev0
4142
ga4gh.vrsatile.pydantic==0.1.0.dev7 ; python_version >= '3.8'
42-
gene-normalizer==0.2.8
43+
gene-normalizer==0.2.9
4344
h11==0.14.0 ; python_version >= '3.7'
4445
hgvs==1.5.4
4546
humanfriendly==10.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
4647
identify==2.5.22 ; python_version >= '3.7'
4748
idna==3.4 ; python_version >= '3.5'
48-
importlib-metadata==6.1.0 ; python_version >= '3.7'
49+
importlib-metadata==6.5.0 ; python_version >= '3.7'
4950
inflection==0.5.1 ; python_version >= '3.5'
5051
iniconfig==2.0.0 ; python_version >= '3.7'
5152
ipykernel==6.22.0
5253
ipython==8.12.0 ; python_version >= '3.8'
5354
jedi==0.18.2 ; python_version >= '3.6'
5455
jmespath==1.0.1 ; python_version >= '3.7'
5556
jsonschema==3.2.0
56-
jupyter-client==8.1.0 ; python_version >= '3.8'
57+
jupyter-client==8.2.0 ; python_version >= '3.8'
5758
jupyter-core==5.3.0 ; python_version >= '3.8'
5859
lxml==4.9.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
5960
markdown==3.4.3 ; python_version >= '3.7'
6061
matplotlib-inline==0.1.6 ; python_version >= '3.5'
6162
mccabe==0.7.0 ; python_version >= '3.6'
62-
mock==5.0.1
63+
mock==5.0.2
6364
nest-asyncio==1.5.6 ; python_version >= '3.5'
6465
nodeenv==1.7.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
6566
numpy==1.24.2 ; python_version >= '3.8'
66-
packaging==23.0 ; python_version >= '3.7'
67-
pandas==1.5.3
67+
packaging==23.1 ; python_version >= '3.7'
68+
pandas==2.0.0
6869
parse==1.19.0
6970
parsley==1.3
7071
parso==0.8.3 ; python_version >= '3.6'
7172
pexpect==4.8.0 ; sys_platform != 'win32'
7273
pickleshare==0.7.5
7374
platformdirs==3.2.0 ; python_version >= '3.7'
7475
pluggy==1.0.0 ; python_version >= '3.6'
75-
pre-commit==3.2.1
76+
pre-commit==3.2.2
7677
prompt-toolkit==3.0.38 ; python_full_version >= '3.7.0'
77-
psutil==5.9.4 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
78-
psycopg2==2.9.5 ; python_version >= '3.6'
79-
psycopg2-binary==2.9.5
78+
psutil==5.9.5 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
79+
psycopg2==2.9.6 ; python_version >= '3.6'
80+
psycopg2-binary==2.9.6
8081
ptyprocess==0.7.0
8182
pure-eval==0.2.2
8283
pycodestyle==2.10.0 ; python_version >= '3.6'
8384
pydantic==1.10.7
8485
pydocstyle==6.3.0 ; python_version >= '3.6'
8586
pyee==8.2.2
8687
pyflakes==3.0.1 ; python_version >= '3.6'
87-
pygments==2.14.0 ; python_version >= '3.6'
88+
pygments==2.15.1 ; python_version >= '3.7'
8889
pyliftover==0.4
8990
pyppeteer==1.0.2 ; python_version >= '3.7' and python_version < '4.0'
9091
pyquery==2.0.0
9192
pyrsistent==0.19.3 ; python_version >= '3.7'
92-
pysam==0.20.0
93-
pytest==7.2.2
93+
pysam==0.21.0 ; python_version >= '3.6'
94+
pytest==7.3.1
9495
pytest-asyncio==0.18.3
9596
pytest-cov==4.0.0
96-
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
97+
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
9798
python-jsonschema-objects==0.4.1
9899
pytz==2023.3
99100
pyyaml==6.0 ; python_version >= '3.6'
@@ -102,19 +103,20 @@ requests==2.28.2 ; python_version >= '3.7' and python_version < '4'
102103
requests-html==0.10.0 ; python_full_version >= '3.6.0'
103104
s3transfer==0.6.0 ; python_version >= '3.7'
104105
setuptools==67.6.1 ; python_version >= '3.7'
105-
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
106+
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
106107
sniffio==1.3.0 ; python_version >= '3.7'
107108
snowballstemmer==2.2.0
108-
soupsieve==2.4 ; python_version >= '3.7'
109-
sqlparse==0.4.3 ; python_version >= '3.5'
109+
soupsieve==2.4.1 ; python_version >= '3.7'
110+
sqlparse==0.4.4 ; python_version >= '3.5'
110111
stack-data==0.6.2
111112
starlette==0.26.1 ; python_version >= '3.7'
112113
tabulate==0.9.0 ; python_version >= '3.7'
113114
tomli==2.0.1 ; python_version < '3.11'
114-
tornado==6.2 ; python_version >= '3.7'
115+
tornado==6.3 ; python_version >= '3.8'
115116
tqdm==4.65.0 ; python_version >= '3.7'
116117
traitlets==5.9.0 ; python_version >= '3.7'
117118
typing-extensions==4.5.0 ; python_version >= '3.7'
119+
tzdata==2023.3 ; python_version >= '2'
118120
urllib3==1.26.15 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
119121
uvicorn==0.21.1
120122
virtualenv==20.21.0 ; python_version >= '3.7'

requirements.txt

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ appdirs==1.4.4
55
appnope==0.1.3 ; sys_platform == 'darwin'
66
asttokens==2.2.1
77
asyncpg==0.27.0
8-
attrs==22.2.0 ; python_version >= '3.6'
8+
attrs==23.1.0 ; python_version >= '3.7'
99
backcall==0.2.0
10-
beautifulsoup4==4.12.0 ; python_full_version >= '3.6.0'
10+
beautifulsoup4==4.12.2 ; python_full_version >= '3.6.0'
1111
biocommons.seqrepo==0.6.5
1212
bioutils==0.5.7 ; python_version >= '3.6'
13-
boto3==1.26.103
14-
botocore==1.29.103 ; python_version >= '3.7'
13+
boto3==1.26.115
14+
botocore==1.29.115 ; python_version >= '3.7'
1515
bs4==0.0.1
1616
canonicaljson==2.0.0 ; python_version >= '3.7'
1717
certifi==2022.12.7 ; python_version >= '3.6'
@@ -20,18 +20,19 @@ click==8.1.3 ; python_version >= '3.7'
2020
coloredlogs==15.0.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
2121
configparser==5.3.0 ; python_version >= '3.7'
2222
cssselect==1.2.0 ; python_version >= '3.7'
23+
cython==0.29.34 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'
2324
decorator==5.1.1 ; python_version >= '3.5'
2425
executing==1.2.0
2526
fake-useragent==1.1.3
26-
fastapi==0.95.0
27+
fastapi==0.95.1
2728
ga4gh.vrs==0.9.0.dev0
2829
ga4gh.vrsatile.pydantic==0.1.0.dev7 ; python_version >= '3.8'
29-
gene-normalizer==0.2.8
30+
gene-normalizer==0.2.9
3031
h11==0.14.0 ; python_version >= '3.7'
3132
hgvs==1.5.4
3233
humanfriendly==10.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
3334
idna==3.4 ; python_version >= '3.5'
34-
importlib-metadata==6.1.0 ; python_version >= '3.7'
35+
importlib-metadata==6.5.0 ; python_version >= '3.7'
3536
inflection==0.5.1 ; python_version >= '3.5'
3637
ipython==8.12.0 ; python_version >= '3.8'
3738
jedi==0.18.2 ; python_version >= '3.6'
@@ -41,42 +42,43 @@ lxml==4.9.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2,
4142
markdown==3.4.3 ; python_version >= '3.7'
4243
matplotlib-inline==0.1.6 ; python_version >= '3.5'
4344
numpy==1.24.2 ; python_version >= '3.8'
44-
pandas==1.5.3
45+
pandas==2.0.0
4546
parse==1.19.0
4647
parsley==1.3
4748
parso==0.8.3 ; python_version >= '3.6'
4849
pexpect==4.8.0 ; sys_platform != 'win32'
4950
pickleshare==0.7.5
5051
prompt-toolkit==3.0.38 ; python_full_version >= '3.7.0'
51-
psycopg2==2.9.5 ; python_version >= '3.6'
52+
psycopg2==2.9.6 ; python_version >= '3.6'
5253
ptyprocess==0.7.0
5354
pure-eval==0.2.2
5455
pydantic==1.10.7
5556
pyee==8.2.2
56-
pygments==2.14.0 ; python_version >= '3.6'
57+
pygments==2.15.1 ; python_version >= '3.7'
5758
pyliftover==0.4
5859
pyppeteer==1.0.2 ; python_version >= '3.7' and python_version < '4.0'
5960
pyquery==2.0.0
6061
pyrsistent==0.19.3 ; python_version >= '3.7'
61-
pysam==0.20.0
62-
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
62+
pysam==0.21.0 ; python_version >= '3.6'
63+
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
6364
python-jsonschema-objects==0.4.1
6465
pytz==2023.3
6566
pyyaml==6.0 ; python_version >= '3.6'
6667
requests==2.28.2 ; python_version >= '3.7' and python_version < '4'
6768
requests-html==0.10.0 ; python_full_version >= '3.6.0'
6869
s3transfer==0.6.0 ; python_version >= '3.7'
6970
setuptools==67.6.1 ; python_version >= '3.7'
70-
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
71+
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
7172
sniffio==1.3.0 ; python_version >= '3.7'
72-
soupsieve==2.4 ; python_version >= '3.7'
73-
sqlparse==0.4.3 ; python_version >= '3.5'
73+
soupsieve==2.4.1 ; python_version >= '3.7'
74+
sqlparse==0.4.4 ; python_version >= '3.5'
7475
stack-data==0.6.2
7576
starlette==0.26.1 ; python_version >= '3.7'
7677
tabulate==0.9.0 ; python_version >= '3.7'
7778
tqdm==4.65.0 ; python_version >= '3.7'
7879
traitlets==5.9.0 ; python_version >= '3.7'
7980
typing-extensions==4.5.0 ; python_version >= '3.7'
81+
tzdata==2023.3 ; python_version >= '2'
8082
urllib3==1.26.15 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
8183
uvicorn==0.21.1
8284
w3lib==2.1.1 ; python_version >= '3.7'

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ install_requires =
2323
pydantic
2424
uvicorn
2525
fastapi
26-
gene-normalizer
26+
gene-normalizer >=0.1.34, != 0.2.0, != 0.2.1, != 0.2.2, != 0.2.3, != 0.2.4, != 0.2.5, != 0.2.6, != 0.2.7, != 0.2.8
2727
ga4gh.vrs
2828

2929
[options.package_data]

0 commit comments

Comments
 (0)