Skip to content

Commit 7af73af

Browse files
authored
feat!: Apply VRS 1.3 Changes (#409)
- Copy Number Changes - Absolute Copy Number --> Copy Number Count - Relative Copy Number --> Copy Number Change - vac --> cn - vrc --> cx - abs_cnv -> cn_var - rel_cnv -> cx_var - EFO Changes - complete loss --> efo:0030069 - partial loss --> efo:0030067 - copy neutral --> efo:0030064 - low-level gain --> efo:0030071 - high-level gain —> efo:0030072 - Default Characteristics (this follows what is in staging) - partial loss --> efo:0030067 - low-level gain --> efo:0030071 - license-file --> license_file in setup.cfg - Update ga4gh.vrs, ga4gh.vrsatile.pydantic, gene-normalizer, and cool-seq-tool versions for VRS 1.3 - The classifier tests were failing, so I removed the `ConfidenceRating` prefix in `confidence` in the classifier fixtures
1 parent 9f23878 commit 7af73af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1916
-2046
lines changed

Pipfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ psycopg2-binary = "*"
2323
fastapi = "*"
2424
uvicorn = "*"
2525
pydantic = "*"
26-
"ga4gh.vrs" = {version = "~=0.8.1.dev0", extras = ["extras"]}
27-
gene-normalizer = "~=0.1.32"
26+
"ga4gh.vrs" = {version = "~=0.8.1", extras = ["extras"]}
27+
gene-normalizer = "~=0.1.35"
2828
pyliftover = "*"
2929
boto3 = "*"
30-
"ga4gh.vrsatile.pydantic" = "~=0.0.11"
31-
cool-seq-tool = ">=0.1.11"
30+
"ga4gh.vrsatile.pydantic" = "~=0.0.12"
31+
cool-seq-tool = ">=0.1.13"

docs/hgvs_dup_del_mode.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# HGVS Dup Del Mode
22

33
This mode helps us interpret deletions and duplications that are represented as HGVS expressions.\
4-
The mode can be set to `default`, `absolute_cnv`, `relative_cnv`, `repeated_seq_expr`, or `literal_seq_expr`.
4+
The mode can be set to `default`, `copy_number_count`, `copy_number_change`, `repeated_seq_expr`, or `literal_seq_expr`.
55

66

77
## Default Characteristics
88

99
- if baseline_copies is not set and endpoints are ambiguous:
10-
- relative_cnv
11-
- if relative_copy_class not provided:
12-
- relative_copy_class = `partial loss` if del, `low-level gain` if dup
10+
- copy_number_change
11+
- if copy_change not provided:
12+
- copy_change = `efo:0030067` (loss) if del, `efo:0030070` (gain) if dup
1313
- elif baseline_copies is provided:
14-
- absolute_cnv
14+
- copy_number_count
1515
- copies are baseline_copies + 1 for dup, baseline_copies - 1 for del
1616
- elif len del or dup > 100bp: (use outermost coordinates)
1717
- repeated_seq_expr with a derived_seq_expr subject (Allele)

requirements-dev.txt

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,63 @@ argon2-cffi==21.3.0 ; python_version >= '3.6'
77
argon2-cffi-bindings==21.2.0 ; python_version >= '3.6'
88
asttokens==2.2.1
99
asyncpg==0.27.0 ; python_full_version >= '3.7.0'
10-
attrs==22.2.0 ; python_version >= '3.6'
10+
attrs==23.1.0 ; python_version >= '3.7'
1111
backcall==0.2.0
12-
beautifulsoup4==4.12.0 ; python_full_version >= '3.6.0'
12+
beautifulsoup4==4.12.2 ; python_full_version >= '3.6.0'
1313
biocommons.seqrepo==0.6.5
1414
bioutils==0.5.7 ; python_version >= '3.6'
1515
bleach==6.0.0 ; python_version >= '3.7'
16-
boto3==1.26.105
17-
botocore==1.29.105 ; python_version >= '3.7'
16+
boto3==1.26.123
17+
botocore==1.29.123 ; python_version >= '3.7'
1818
bs4==0.0.1
1919
canonicaljson==2.0.0 ; python_version >= '3.7'
2020
certifi==2022.12.7 ; python_version >= '3.6'
2121
cffi==1.15.1
2222
cfgv==3.3.1 ; python_full_version >= '3.6.1'
2323
charset-normalizer==3.1.0 ; python_full_version >= '3.7.0'
24-
click==8.1.3 ; python_version >= '3.7'
24+
click==8.1.3
2525
coloredlogs==15.0.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
2626
comm==0.1.3 ; python_version >= '3.6'
2727
configparser==5.3.0 ; python_version >= '3.7'
28-
cool-seq-tool==0.1.10
29-
coverage[toml]==7.2.2 ; python_version >= '3.7'
28+
cool-seq-tool==0.1.13
29+
coverage[toml]==7.2.5 ; python_version >= '3.7'
3030
cssselect==1.2.0 ; python_version >= '3.7'
31-
debugpy==1.6.6 ; python_version >= '3.7'
31+
cython==0.29.34 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'
32+
debugpy==1.6.7 ; python_version >= '3.7'
3233
decorator==5.1.1 ; python_version >= '3.5'
3334
defusedxml==0.7.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
3435
distlib==0.3.6
35-
exceptiongroup==1.1.1 ; python_version < '3.11'
3636
executing==1.2.0
3737
fake-useragent==1.1.3
38-
fastapi==0.95.0
38+
fastapi==0.95.1
3939
fastjsonschema==2.16.3
40-
filelock==3.10.7 ; python_version >= '3.7'
40+
filelock==3.12.0 ; python_version >= '3.7'
4141
flake8==6.0.0
4242
flake8-annotations==3.0.0
4343
flake8-docstrings==1.7.0
4444
flake8-import-order==0.18.2
4545
flake8-quotes==3.3.2
46-
ga4gh.vrs[extras]==0.8.1.dev0
47-
ga4gh.vrsatile.pydantic==0.0.11
48-
gene-normalizer==0.1.32
46+
ga4gh.vrs[extras]==0.8.1
47+
ga4gh.vrsatile.pydantic==0.0.12
48+
gene-normalizer==0.1.35
4949
h11==0.14.0 ; python_version >= '3.7'
5050
hgvs==1.5.4 ; python_version >= '3.6'
5151
humanfriendly==10.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
52-
identify==2.5.22 ; python_version >= '3.7'
52+
identify==2.5.23 ; python_version >= '3.7'
5353
idna==3.4 ; python_version >= '3.5'
54-
importlib-metadata==6.1.0 ; python_version >= '3.7'
54+
importlib-metadata==6.6.0 ; python_version >= '3.7'
5555
inflection==0.5.1 ; python_version >= '3.5'
5656
iniconfig==2.0.0 ; python_version >= '3.7'
5757
ipykernel==6.22.0
58-
ipython==8.12.0 ; python_version >= '3.8'
58+
ipython==8.13.1 ; python_version >= '3.9'
5959
ipython-genutils==0.2.0
6060
ipywidgets==8.0.6 ; python_version >= '3.7'
6161
jedi==0.18.2 ; python_version >= '3.6'
6262
jinja2==3.1.2 ; python_version >= '3.7'
6363
jmespath==1.0.1 ; python_version >= '3.7'
6464
jsonschema==3.2.0
6565
jupyter==1.0.0
66-
jupyter-client==8.1.0 ; python_version >= '3.8'
66+
jupyter-client==8.2.0 ; python_version >= '3.8'
6767
jupyter-console==6.6.3 ; python_version >= '3.7'
6868
jupyter-core==5.3.0 ; python_version >= '3.8'
6969
jupyter-events==0.6.3 ; python_version >= '3.7'
@@ -77,29 +77,29 @@ markupsafe==2.1.2 ; python_version >= '3.7'
7777
matplotlib-inline==0.1.6 ; python_version >= '3.5'
7878
mccabe==0.7.0 ; python_version >= '3.6'
7979
mistune==2.0.5
80-
nbclassic==0.5.4 ; python_version >= '3.7'
81-
nbclient==0.7.3 ; python_full_version >= '3.7.0'
82-
nbconvert==7.3.0 ; python_version >= '3.7'
80+
nbclassic==0.5.6 ; python_version >= '3.7'
81+
nbclient==0.7.4 ; python_full_version >= '3.7.0'
82+
nbconvert==7.3.1 ; python_version >= '3.7'
8383
nbformat==5.8.0 ; python_version >= '3.7'
8484
nest-asyncio==1.5.6 ; python_version >= '3.5'
8585
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'
86-
notebook==6.5.3 ; python_version >= '3.7'
87-
notebook-shim==0.2.2 ; python_version >= '3.7'
88-
numpy==1.24.2 ; python_version >= '3.8'
89-
packaging==23.0 ; python_version >= '3.7'
90-
pandas==2.0.0 ; python_version >= '3.8'
86+
notebook==6.5.4 ; python_version >= '3.7'
87+
notebook-shim==0.2.3 ; python_version >= '3.7'
88+
numpy==1.24.3 ; python_version >= '3.8'
89+
packaging==23.1 ; python_version >= '3.7'
90+
pandas==2.0.1 ; python_version >= '3.8'
9191
pandocfilters==1.5.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
9292
parse==1.19.0
9393
parsley==1.3
9494
parso==0.8.3 ; python_version >= '3.6'
9595
pexpect==4.8.0 ; sys_platform != 'win32'
9696
pickleshare==0.7.5
97-
platformdirs==3.2.0 ; python_version >= '3.7'
97+
platformdirs==3.5.0 ; python_version >= '3.7'
9898
pluggy==1.0.0 ; python_version >= '3.6'
9999
pre-commit==3.2.2
100100
prometheus-client==0.16.0 ; python_version >= '3.6'
101101
prompt-toolkit==3.0.38 ; python_full_version >= '3.7.0'
102-
psutil==5.9.4 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
102+
psutil==5.9.5 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
103103
psycopg2==2.9.6 ; python_version >= '3.6'
104104
psycopg2-binary==2.9.6
105105
ptyprocess==0.7.0
@@ -110,13 +110,13 @@ pydantic==1.10.7
110110
pydocstyle==6.3.0 ; python_version >= '3.6'
111111
pyee==8.2.2
112112
pyflakes==3.0.1 ; python_version >= '3.6'
113-
pygments==2.14.0 ; python_version >= '3.6'
113+
pygments==2.15.1 ; python_version >= '3.7'
114114
pyliftover==0.4
115115
pyppeteer==1.0.2 ; python_version >= '3.7' and python_version < '4.0'
116116
pyquery==2.0.0
117117
pyrsistent==0.19.3 ; python_version >= '3.7'
118-
pysam==0.20.0
119-
pytest==7.2.2
118+
pysam==0.21.0 ; python_version >= '3.6'
119+
pytest==7.3.1
120120
pytest-asyncio==0.21.0
121121
pytest-cov==4.0.0
122122
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
@@ -127,33 +127,32 @@ pyyaml==6.0 ; python_version >= '3.6'
127127
pyzmq==25.0.2 ; python_version >= '3.6'
128128
qtconsole==5.4.2 ; python_version >= '3.7'
129129
qtpy==2.3.1 ; python_version >= '3.7'
130-
requests==2.28.2 ; python_version >= '3.7' and python_version < '4'
130+
requests==2.29.0 ; python_version >= '3.7'
131131
requests-html==0.10.0 ; python_full_version >= '3.6.0'
132132
rfc3339-validator==0.1.4 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
133133
rfc3986-validator==0.1.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
134134
s3transfer==0.6.0 ; python_version >= '3.7'
135-
send2trash==1.8.0
136-
setuptools==67.6.1 ; python_version >= '3.7'
135+
send2trash==1.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
136+
setuptools==67.7.2 ; python_version >= '3.7'
137137
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
138138
sniffio==1.3.0 ; python_version >= '3.7'
139139
snowballstemmer==2.2.0
140-
soupsieve==2.4 ; python_version >= '3.7'
141-
sqlparse==0.4.3 ; python_version >= '3.5'
140+
soupsieve==2.4.1 ; python_version >= '3.7'
141+
sqlparse==0.4.4 ; python_version >= '3.5'
142142
stack-data==0.6.2
143143
starlette==0.26.1 ; python_version >= '3.7'
144144
tabulate==0.9.0 ; python_version >= '3.7'
145145
terminado==0.17.1 ; python_version >= '3.7'
146146
tinycss2==1.2.1 ; python_version >= '3.7'
147-
tomli==2.0.1 ; python_version < '3.11'
148-
tornado==6.2 ; python_version >= '3.7'
147+
tornado==6.3.1 ; python_version >= '3.8'
149148
tqdm==4.65.0 ; python_version >= '3.7'
150149
traitlets==5.9.0 ; python_version >= '3.7'
151150
typing-extensions==4.5.0 ; python_version >= '3.7'
152151
tzdata==2023.3 ; python_version >= '2'
153152
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'
154-
uvicorn==0.21.1
153+
uvicorn==0.22.0
155154
-e .
156-
virtualenv==20.21.0 ; python_version >= '3.7'
155+
virtualenv==20.23.0 ; python_version >= '3.7'
157156
w3lib==2.1.1 ; python_version >= '3.7'
158157
wcwidth==0.2.6
159158
webencodings==0.5.1

requirements.txt

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,45 @@ appdirs==1.4.4
55
appnope==0.1.3 ; sys_platform == 'darwin'
66
asttokens==2.2.1
77
asyncpg==0.27.0 ; python_full_version >= '3.7.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.105
14-
botocore==1.29.105 ; python_version >= '3.7'
13+
boto3==1.26.123
14+
botocore==1.29.123 ; 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'
1818
charset-normalizer==3.1.0 ; python_full_version >= '3.7.0'
19-
click==8.1.3 ; python_version >= '3.7'
19+
click==8.1.3
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'
22-
cool-seq-tool==0.1.10
22+
cool-seq-tool==0.1.13
2323
cssselect==1.2.0 ; python_version >= '3.7'
24+
cython==0.29.34 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'
2425
decorator==5.1.1 ; python_version >= '3.5'
2526
executing==1.2.0
2627
fake-useragent==1.1.3
27-
fastapi==0.95.0
28-
ga4gh.vrs[extras]==0.8.1.dev0
29-
ga4gh.vrsatile.pydantic==0.0.11
30-
gene-normalizer==0.1.32
28+
fastapi==0.95.1
29+
ga4gh.vrs[extras]==0.8.1
30+
ga4gh.vrsatile.pydantic==0.0.12
31+
gene-normalizer==0.1.35
3132
h11==0.14.0 ; python_version >= '3.7'
3233
hgvs==1.5.4 ; python_version >= '3.6'
3334
humanfriendly==10.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
3435
idna==3.4 ; python_version >= '3.5'
35-
importlib-metadata==6.1.0 ; python_version >= '3.7'
36+
importlib-metadata==6.6.0 ; python_version >= '3.7'
3637
inflection==0.5.1 ; python_version >= '3.5'
37-
ipython==8.12.0 ; python_version >= '3.8'
38+
ipython==8.13.1 ; python_version >= '3.9'
3839
jedi==0.18.2 ; python_version >= '3.6'
3940
jmespath==1.0.1 ; python_version >= '3.7'
4041
jsonschema==3.2.0
4142
lxml==4.9.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
4243
markdown==3.4.3 ; python_version >= '3.7'
4344
matplotlib-inline==0.1.6 ; python_version >= '3.5'
44-
numpy==1.24.2 ; python_version >= '3.8'
45-
pandas==2.0.0 ; python_version >= '3.8'
45+
numpy==1.24.3 ; python_version >= '3.8'
46+
pandas==2.0.1 ; python_version >= '3.8'
4647
parse==1.19.0
4748
parsley==1.3
4849
parso==0.8.3 ; python_version >= '3.6'
@@ -55,24 +56,24 @@ ptyprocess==0.7.0
5556
pure-eval==0.2.2
5657
pydantic==1.10.7
5758
pyee==8.2.2
58-
pygments==2.14.0 ; python_version >= '3.6'
59+
pygments==2.15.1 ; python_version >= '3.7'
5960
pyliftover==0.4
6061
pyppeteer==1.0.2 ; python_version >= '3.7' and python_version < '4.0'
6162
pyquery==2.0.0
6263
pyrsistent==0.19.3 ; python_version >= '3.7'
63-
pysam==0.20.0
64+
pysam==0.21.0 ; python_version >= '3.6'
6465
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
6566
python-jsonschema-objects==0.4.1
6667
pytz==2023.3
6768
pyyaml==6.0 ; python_version >= '3.6'
68-
requests==2.28.2 ; python_version >= '3.7' and python_version < '4'
69+
requests==2.29.0 ; python_version >= '3.7'
6970
requests-html==0.10.0 ; python_full_version >= '3.6.0'
7071
s3transfer==0.6.0 ; python_version >= '3.7'
71-
setuptools==67.6.1 ; python_version >= '3.7'
72+
setuptools==67.7.2 ; python_version >= '3.7'
7273
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
7374
sniffio==1.3.0 ; python_version >= '3.7'
74-
soupsieve==2.4 ; python_version >= '3.7'
75-
sqlparse==0.4.3 ; python_version >= '3.5'
75+
soupsieve==2.4.1 ; python_version >= '3.7'
76+
sqlparse==0.4.4 ; python_version >= '3.5'
7677
stack-data==0.6.2
7778
starlette==0.26.1 ; python_version >= '3.7'
7879
tabulate==0.9.0 ; python_version >= '3.7'
@@ -81,7 +82,7 @@ traitlets==5.9.0 ; python_version >= '3.7'
8182
typing-extensions==4.5.0 ; python_version >= '3.7'
8283
tzdata==2023.3 ; python_version >= '2'
8384
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'
84-
uvicorn==0.21.1
85+
uvicorn==0.22.0
8586
w3lib==2.1.1 ; python_version >= '3.7'
8687
wcwidth==0.2.6
8788
websockets==10.4 ; python_version >= '3.7'

setup.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description = VICC normalization routine for variations
66
long_description = file:README.md
77
long_description_content_type = text/markdown
88
home-page = https://github.com/cancervariants/variation-normalization
9-
license-file = LICENSE
9+
license_files = LICENSE
1010
license = MIT
1111

1212
classifiers =
@@ -29,12 +29,12 @@ install_requires =
2929
fastapi
3030
uvicorn
3131
pydantic
32-
ga4gh.vrs[extras] ~= 0.8.1.dev0
33-
gene-normalizer ~= 0.1.32
32+
ga4gh.vrs[extras] ~= 0.8.1
33+
gene-normalizer ~= 0.1.35
3434
pyliftover
3535
boto3
36-
ga4gh.vrsatile.pydantic ~= 0.0.11
37-
cool-seq-tool >= 0.1.11
36+
ga4gh.vrsatile.pydantic ~= 0.0.12
37+
cool-seq-tool >= 0.1.13
3838

3939
tests_require =
4040
pytest

tests/classifiers/classifier_base.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""A module for testing classifier classes."""
22
import yaml
3+
from gene.database.dynamodb import DynamoDbDatabase
34
from gene.query import QueryHandler as GeneQueryHandler
45

6+
from variation.schemas.classification_response_schema import ConfidenceRating
57
from variation.tokenizers import Tokenize
68
from variation.tokenizers import GeneSymbol
79
from tests import PROJECT_ROOT
@@ -19,7 +21,7 @@ def setUp(self):
1921
{"should_match": [], "should_not_match": []}
2022
)
2123
self.classifier = self.classifier_instance()
22-
self.tokenizer = Tokenize(GeneSymbol(GeneQueryHandler()))
24+
self.tokenizer = Tokenize(GeneSymbol(GeneQueryHandler(DynamoDbDatabase())))
2325

2426
def classifier_instance(self):
2527
"""Check that the classifier_instance method is implemented."""
@@ -35,8 +37,8 @@ def test_matches(self):
3537
tokens = self.tokenizer.perform(x["query"], [])
3638
classification = self.classifier.match(tokens)
3739
self.assertIsNotNone(classification, msg=x)
38-
self.assertEqual(x["confidence"],
39-
str(classification.confidence),
40+
self.assertEqual(getattr(ConfidenceRating, x["confidence"]),
41+
classification.confidence,
4042
msg=x)
4143

4244
def test_not_matches(self):

0 commit comments

Comments
 (0)