Skip to content

Commit

Permalink
refactor: update to lastest version of gene-normalizer (#146)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
korikuzma authored Apr 19, 2023
1 parent 7d78e6c commit 28f3e9c
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ hgvs = "*"
pydantic = "*"
fastapi = "*"
uvicorn = "*"
gene-normalizer = "*"
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"
"ga4gh.vrs" = "*"

[dev-packages]
Expand Down
1 change: 1 addition & 0 deletions cool_seq_tool/cool_seq_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def __init__(
self.uta_db = UTADatabase(db_url=db_url, db_pwd=db_pwd)
gene_normalizer = GeneNormalizer(gene_query_handler, gene_db_url,
gene_db_region)
self.gene_query_handler = gene_normalizer.query_handler
self.alignment_mapper = AlignmentMapper(
self.seqrepo_access, self.transcript_mappings, self.uta_db)
self.mane_transcript = MANETranscript(
Expand Down
4 changes: 3 additions & 1 deletion cool_seq_tool/data_sources/gene_normalizer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Module for accessing Gene Normalizer"""
from typing import Dict

from gene.database.dynamodb import DynamoDbDatabase
from gene.query import QueryHandler
from gene.schemas import SourceName

Expand All @@ -27,7 +28,8 @@ def __init__(
if query_handler:
self.query_handler = query_handler
else:
self.query_handler = QueryHandler(db_url, db_region)
ddb = DynamoDbDatabase(db_url=db_url, region_name=db_region)
self.query_handler = QueryHandler(ddb)

def get_hgnc_data(self, gene: str) -> Dict:
"""Return HGNC data for a given gene
Expand Down
2 changes: 1 addition & 1 deletion cool_seq_tool/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.11"
__version__ = "0.1.12"
54 changes: 28 additions & 26 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ appdirs==1.4.4
appnope==0.1.3 ; sys_platform == 'darwin'
asttokens==2.2.1
asyncpg==0.27.0
attrs==22.2.0 ; python_version >= '3.6'
attrs==23.1.0 ; python_version >= '3.7'
backcall==0.2.0
beautifulsoup4==4.12.0 ; python_full_version >= '3.6.0'
beautifulsoup4==4.12.2 ; python_full_version >= '3.6.0'
biocommons.seqrepo==0.6.5
bioutils==0.5.7 ; python_version >= '3.6'
boto3==1.26.103
botocore==1.29.103 ; python_version >= '3.7'
boto3==1.26.115
botocore==1.29.115 ; python_version >= '3.7'
bs4==0.0.1
canonicaljson==2.0.0 ; python_version >= '3.7'
certifi==2022.12.7 ; python_version >= '3.6'
Expand All @@ -22,78 +22,79 @@ coloredlogs==15.0.1 ; python_version >= '2.7' and python_version not in '3.0, 3.
comm==0.1.3 ; python_version >= '3.6'
configparser==5.3.0 ; python_version >= '3.7'
-e .
coverage[toml]==7.2.2 ; python_version >= '3.7'
coverage[toml]==7.2.3 ; python_version >= '3.7'
cssselect==1.2.0 ; python_version >= '3.7'
debugpy==1.6.6 ; python_version >= '3.7'
cython==0.29.34 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'
debugpy==1.6.7 ; python_version >= '3.7'
decorator==5.1.1 ; python_version >= '3.5'
distlib==0.3.6
exceptiongroup==1.1.1 ; python_version < '3.11'
executing==1.2.0
fake-useragent==1.1.3
fastapi==0.95.0
filelock==3.10.7 ; python_version >= '3.7'
fastapi==0.95.1
filelock==3.12.0 ; python_version >= '3.7'
flake8==6.0.0
flake8-annotations==3.0.0
flake8-docstrings==1.7.0
flake8-import-order==0.18.2
flake8-quotes==3.3.2
ga4gh.vrs==0.9.0.dev0
ga4gh.vrsatile.pydantic==0.1.0.dev7 ; python_version >= '3.8'
gene-normalizer==0.2.8
gene-normalizer==0.2.9
h11==0.14.0 ; python_version >= '3.7'
hgvs==1.5.4
humanfriendly==10.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
identify==2.5.22 ; python_version >= '3.7'
idna==3.4 ; python_version >= '3.5'
importlib-metadata==6.1.0 ; python_version >= '3.7'
importlib-metadata==6.5.0 ; python_version >= '3.7'
inflection==0.5.1 ; python_version >= '3.5'
iniconfig==2.0.0 ; python_version >= '3.7'
ipykernel==6.22.0
ipython==8.12.0 ; python_version >= '3.8'
jedi==0.18.2 ; python_version >= '3.6'
jmespath==1.0.1 ; python_version >= '3.7'
jsonschema==3.2.0
jupyter-client==8.1.0 ; python_version >= '3.8'
jupyter-client==8.2.0 ; python_version >= '3.8'
jupyter-core==5.3.0 ; python_version >= '3.8'
lxml==4.9.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
markdown==3.4.3 ; python_version >= '3.7'
matplotlib-inline==0.1.6 ; python_version >= '3.5'
mccabe==0.7.0 ; python_version >= '3.6'
mock==5.0.1
mock==5.0.2
nest-asyncio==1.5.6 ; python_version >= '3.5'
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'
numpy==1.24.2 ; python_version >= '3.8'
packaging==23.0 ; python_version >= '3.7'
pandas==1.5.3
packaging==23.1 ; python_version >= '3.7'
pandas==2.0.0
parse==1.19.0
parsley==1.3
parso==0.8.3 ; python_version >= '3.6'
pexpect==4.8.0 ; sys_platform != 'win32'
pickleshare==0.7.5
platformdirs==3.2.0 ; python_version >= '3.7'
pluggy==1.0.0 ; python_version >= '3.6'
pre-commit==3.2.1
pre-commit==3.2.2
prompt-toolkit==3.0.38 ; python_full_version >= '3.7.0'
psutil==5.9.4 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
psycopg2==2.9.5 ; python_version >= '3.6'
psycopg2-binary==2.9.5
psutil==5.9.5 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
psycopg2==2.9.6 ; python_version >= '3.6'
psycopg2-binary==2.9.6
ptyprocess==0.7.0
pure-eval==0.2.2
pycodestyle==2.10.0 ; python_version >= '3.6'
pydantic==1.10.7
pydocstyle==6.3.0 ; python_version >= '3.6'
pyee==8.2.2
pyflakes==3.0.1 ; python_version >= '3.6'
pygments==2.14.0 ; python_version >= '3.6'
pygments==2.15.1 ; python_version >= '3.7'
pyliftover==0.4
pyppeteer==1.0.2 ; python_version >= '3.7' and python_version < '4.0'
pyquery==2.0.0
pyrsistent==0.19.3 ; python_version >= '3.7'
pysam==0.20.0
pytest==7.2.2
pysam==0.21.0 ; python_version >= '3.6'
pytest==7.3.1
pytest-asyncio==0.18.3
pytest-cov==4.0.0
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
python-jsonschema-objects==0.4.1
pytz==2023.3
pyyaml==6.0 ; python_version >= '3.6'
Expand All @@ -102,19 +103,20 @@ requests==2.28.2 ; python_version >= '3.7' and python_version < '4'
requests-html==0.10.0 ; python_full_version >= '3.6.0'
s3transfer==0.6.0 ; python_version >= '3.7'
setuptools==67.6.1 ; python_version >= '3.7'
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
sniffio==1.3.0 ; python_version >= '3.7'
snowballstemmer==2.2.0
soupsieve==2.4 ; python_version >= '3.7'
sqlparse==0.4.3 ; python_version >= '3.5'
soupsieve==2.4.1 ; python_version >= '3.7'
sqlparse==0.4.4 ; python_version >= '3.5'
stack-data==0.6.2
starlette==0.26.1 ; python_version >= '3.7'
tabulate==0.9.0 ; python_version >= '3.7'
tomli==2.0.1 ; python_version < '3.11'
tornado==6.2 ; python_version >= '3.7'
tornado==6.3 ; python_version >= '3.8'
tqdm==4.65.0 ; python_version >= '3.7'
traitlets==5.9.0 ; python_version >= '3.7'
typing-extensions==4.5.0 ; python_version >= '3.7'
tzdata==2023.3 ; python_version >= '2'
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'
uvicorn==0.21.1
virtualenv==20.21.0 ; python_version >= '3.7'
Expand Down
32 changes: 17 additions & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ appdirs==1.4.4
appnope==0.1.3 ; sys_platform == 'darwin'
asttokens==2.2.1
asyncpg==0.27.0
attrs==22.2.0 ; python_version >= '3.6'
attrs==23.1.0 ; python_version >= '3.7'
backcall==0.2.0
beautifulsoup4==4.12.0 ; python_full_version >= '3.6.0'
beautifulsoup4==4.12.2 ; python_full_version >= '3.6.0'
biocommons.seqrepo==0.6.5
bioutils==0.5.7 ; python_version >= '3.6'
boto3==1.26.103
botocore==1.29.103 ; python_version >= '3.7'
boto3==1.26.115
botocore==1.29.115 ; python_version >= '3.7'
bs4==0.0.1
canonicaljson==2.0.0 ; python_version >= '3.7'
certifi==2022.12.7 ; python_version >= '3.6'
Expand All @@ -20,18 +20,19 @@ click==8.1.3 ; python_version >= '3.7'
coloredlogs==15.0.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
configparser==5.3.0 ; python_version >= '3.7'
cssselect==1.2.0 ; python_version >= '3.7'
cython==0.29.34 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'
decorator==5.1.1 ; python_version >= '3.5'
executing==1.2.0
fake-useragent==1.1.3
fastapi==0.95.0
fastapi==0.95.1
ga4gh.vrs==0.9.0.dev0
ga4gh.vrsatile.pydantic==0.1.0.dev7 ; python_version >= '3.8'
gene-normalizer==0.2.8
gene-normalizer==0.2.9
h11==0.14.0 ; python_version >= '3.7'
hgvs==1.5.4
humanfriendly==10.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
idna==3.4 ; python_version >= '3.5'
importlib-metadata==6.1.0 ; python_version >= '3.7'
importlib-metadata==6.5.0 ; python_version >= '3.7'
inflection==0.5.1 ; python_version >= '3.5'
ipython==8.12.0 ; python_version >= '3.8'
jedi==0.18.2 ; python_version >= '3.6'
Expand All @@ -41,42 +42,43 @@ lxml==4.9.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2,
markdown==3.4.3 ; python_version >= '3.7'
matplotlib-inline==0.1.6 ; python_version >= '3.5'
numpy==1.24.2 ; python_version >= '3.8'
pandas==1.5.3
pandas==2.0.0
parse==1.19.0
parsley==1.3
parso==0.8.3 ; python_version >= '3.6'
pexpect==4.8.0 ; sys_platform != 'win32'
pickleshare==0.7.5
prompt-toolkit==3.0.38 ; python_full_version >= '3.7.0'
psycopg2==2.9.5 ; python_version >= '3.6'
psycopg2==2.9.6 ; python_version >= '3.6'
ptyprocess==0.7.0
pure-eval==0.2.2
pydantic==1.10.7
pyee==8.2.2
pygments==2.14.0 ; python_version >= '3.6'
pygments==2.15.1 ; python_version >= '3.7'
pyliftover==0.4
pyppeteer==1.0.2 ; python_version >= '3.7' and python_version < '4.0'
pyquery==2.0.0
pyrsistent==0.19.3 ; python_version >= '3.7'
pysam==0.20.0
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
pysam==0.21.0 ; python_version >= '3.6'
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
python-jsonschema-objects==0.4.1
pytz==2023.3
pyyaml==6.0 ; python_version >= '3.6'
requests==2.28.2 ; python_version >= '3.7' and python_version < '4'
requests-html==0.10.0 ; python_full_version >= '3.6.0'
s3transfer==0.6.0 ; python_version >= '3.7'
setuptools==67.6.1 ; python_version >= '3.7'
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
sniffio==1.3.0 ; python_version >= '3.7'
soupsieve==2.4 ; python_version >= '3.7'
sqlparse==0.4.3 ; python_version >= '3.5'
soupsieve==2.4.1 ; python_version >= '3.7'
sqlparse==0.4.4 ; python_version >= '3.5'
stack-data==0.6.2
starlette==0.26.1 ; python_version >= '3.7'
tabulate==0.9.0 ; python_version >= '3.7'
tqdm==4.65.0 ; python_version >= '3.7'
traitlets==5.9.0 ; python_version >= '3.7'
typing-extensions==4.5.0 ; python_version >= '3.7'
tzdata==2023.3 ; python_version >= '2'
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'
uvicorn==0.21.1
w3lib==2.1.1 ; python_version >= '3.7'
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install_requires =
pydantic
uvicorn
fastapi
gene-normalizer
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
ga4gh.vrs

[options.package_data]
Expand Down

0 comments on commit 28f3e9c

Please sign in to comment.