Skip to content

Commit 6419b01

Browse files
authored
Merge pull request #528 from VariantEffect/release-2025.4.1
Release 2025.4.1
2 parents d088e1a + fb5e657 commit 6419b01

25 files changed

+833
-323
lines changed

alembic/manual_migrations/migrate_consolidated_score_ranges_and_calibrations.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from sqlalchemy.orm import Session
1010

1111
from mavedb.models.score_set import ScoreSet
12-
from mavedb.view_models.score_range import ScoreSetRangesCreate, InvestigatorScoreRangesCreate, PillarProjectScoreRangesCreate, PillarProjectScoreRangeCreate
12+
from mavedb.view_models.score_range import ScoreSetRangesCreate, InvestigatorScoreRangesCreate, ZeibergCalibrationScoreRangesCreate, ZeibergCalibrationScoreRangeCreate
1313

1414

1515
from mavedb.db.session import SessionLocal
@@ -47,11 +47,11 @@ def do_migration(db: Session):
4747
investigator_ranges = None
4848

4949
if score_set.score_calibrations is not None:
50-
thresholds = score_set.score_calibrations.get("pillar_project", {}).get("thresholds", [])
51-
evidence_strengths = score_set.score_calibrations.get("pillar_project", {}).get("evidence_strengths", [])
52-
positive_likelihood_ratios = score_set.score_calibrations.get("pillar_project", {}).get("positive_likelihood_ratios", [])
53-
prior_probability_pathogenicity = score_set.score_calibrations.get("pillar_project", {}).get("prior_probability_pathogenicity", None)
54-
parameter_sets = score_set.score_calibrations.get("pillar_project", {}).get("parameter_sets", [])
50+
thresholds = score_set.score_calibrations.get("zeiberg_calibration", {}).get("thresholds", [])
51+
evidence_strengths = score_set.score_calibrations.get("zeiberg_calibration", {}).get("evidence_strengths", [])
52+
positive_likelihood_ratios = score_set.score_calibrations.get("zeiberg_calibration", {}).get("positive_likelihood_ratios", [])
53+
prior_probability_pathogenicity = score_set.score_calibrations.get("zeiberg_calibration", {}).get("prior_probability_pathogenicity", None)
54+
parameter_sets = score_set.score_calibrations.get("zeiberg_calibration", {}).get("parameter_sets", [])
5555

5656
ranges = []
5757
boundary_direction = -1 # Start with a negative sign to indicate the first range has the lower boundary appearing prior to the threshold
@@ -60,7 +60,7 @@ def do_migration(db: Session):
6060

6161
if idx == 0:
6262
calculated_range = (None, threshold)
63-
ranges.append(PillarProjectScoreRangeCreate(
63+
ranges.append(ZeibergCalibrationScoreRangeCreate(
6464
range=(None, threshold),
6565
classification="normal" if evidence_strength < 0 else "abnormal",
6666
label=str(evidence_strength),
@@ -71,7 +71,7 @@ def do_migration(db: Session):
7171
))
7272
elif idx == len(thresholds) - 1:
7373
calculated_range = (threshold, None)
74-
ranges.append(PillarProjectScoreRangeCreate(
74+
ranges.append(ZeibergCalibrationScoreRangeCreate(
7575
range=(threshold, None),
7676
classification="normal" if evidence_strength < 0 else "abnormal",
7777
evidence_strength=evidence_strength,
@@ -86,7 +86,7 @@ def do_migration(db: Session):
8686
else:
8787
calculated_range = (threshold, thresholds[idx + 1])
8888

89-
ranges.append(PillarProjectScoreRangeCreate(
89+
ranges.append(ZeibergCalibrationScoreRangeCreate(
9090
range=calculated_range,
9191
classification="normal" if evidence_strength < 0 else "abnormal",
9292
label=str(evidence_strength),
@@ -100,17 +100,17 @@ def do_migration(db: Session):
100100
if idx != len(evidence_strengths) - 1 and (evidence_strengths[idx + 1] * evidence_strength < 0):
101101
boundary_direction = -boundary_direction
102102

103-
pillar_project_ranges = PillarProjectScoreRangesCreate(
103+
zeiberg_calibration_ranges = ZeibergCalibrationScoreRangesCreate(
104104
prior_probability_pathogenicity=prior_probability_pathogenicity,
105105
parameter_sets=parameter_sets,
106106
ranges=ranges,
107107
)
108108
else:
109-
pillar_project_ranges = None
109+
zeiberg_calibration_ranges = None
110110

111111
score_set.score_ranges = ScoreSetRangesCreate(
112112
investigator_provided=investigator_ranges if investigator_ranges else None,
113-
pillar_project=pillar_project_ranges if pillar_project_ranges else None,
113+
zeiberg_calibration=zeiberg_calibration_ranges if zeiberg_calibration_ranges else None,
114114
).model_dump()
115115
db.add(score_set)
116116

docker-compose-dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ services:
6767
- settings/.env.dev
6868
depends_on:
6969
- redis
70+
- seqrepo
7071
ports:
7172
- "8006:8000"
73+
volumes:
74+
- mavedb-seqrepo-dev:/usr/local/share/seqrepo
7275

7376
db:
7477
image: postgres:14

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "mavedb"
7-
version = "2025.3.0"
7+
version = "2025.4.1"
88
description = "API for MaveDB, the database of Multiplexed Assays of Variant Effect."
99
license = "AGPL-3.0-only"
1010
readme = "README.md"

src/mavedb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
logger = module_logging.getLogger(__name__)
77

88
__project__ = "mavedb-api"
9-
__version__ = "2025.3.0"
9+
__version__ = "2025.4.1"
1010

1111
logger.info(f"MaveDB {__version__}")

src/mavedb/lib/annotation/agent.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ def mavedb_user_agent(user: User) -> Agent:
5858

5959

6060
# XXX: Ideally, this becomes versioned software.
61-
def pillar_project_calibration_agent() -> Agent:
61+
def zeiberg_calibration_agent() -> Agent:
6262
"""
6363
Create a [VA Agent](https://va-ga4gh.readthedocs.io/en/latest/core-information-model/entities/agent.html)
64-
object for the pillar project calibration software.
64+
object for the Zeiberg calibration software.
6565
"""
6666
return Agent(
67-
name="Pillar Project Variant Calibrator",
67+
name="Zeiberg Variant Calibrator",
6868
agentType="Software",
6969
# XXX - version?
70-
description="Pillar project variant calibrator, see https://github.com/Dzeiberg/mave_calibration",
70+
description="Zeiberg variant calibrator, see https://github.com/Dzeiberg/mave_calibration",
7171
)

src/mavedb/lib/annotation/classification.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ga4gh.va_spec.base.enums import StrengthOfEvidenceProvided
77

88
from mavedb.models.mapped_variant import MappedVariant
9-
from mavedb.lib.annotation.constants import PILLAR_PROJECT_CALIBRATION_STRENGTH_OF_EVIDENCE_MAP
9+
from mavedb.lib.annotation.constants import ZEIBERG_CALIBRATION_CALIBRATION_STRENGTH_OF_EVIDENCE_MAP
1010
from mavedb.lib.validation.utilities import inf_or_float
1111
from mavedb.view_models.score_range import ScoreSetRanges
1212

@@ -33,7 +33,7 @@ def functional_classification_of_variant(
3333
# This view model object is much simpler to work with.
3434
score_ranges = ScoreSetRanges(**mapped_variant.variant.score_set.score_ranges).investigator_provided
3535

36-
if not score_ranges:
36+
if not score_ranges or not score_ranges.ranges:
3737
raise ValueError(
3838
f"Variant {mapped_variant.variant.urn} does not have investigator-provided score ranges."
3939
" Unable to classify functional impact."
@@ -60,7 +60,7 @@ def functional_classification_of_variant(
6060
return ExperimentalVariantFunctionalImpactClassification.INDETERMINATE
6161

6262

63-
def pillar_project_clinical_classification_of_variant(
63+
def zeiberg_calibration_clinical_classification_of_variant(
6464
mapped_variant: MappedVariant,
6565
) -> tuple[VariantPathogenicityEvidenceLine.Criterion, Optional[StrengthOfEvidenceProvided]]:
6666
if mapped_variant.variant.score_set.score_ranges is None:
@@ -69,9 +69,9 @@ def pillar_project_clinical_classification_of_variant(
6969
" Unable to classify clinical impact."
7070
)
7171

72-
score_ranges = ScoreSetRanges(**mapped_variant.variant.score_set.score_ranges).pillar_project
72+
score_ranges = ScoreSetRanges(**mapped_variant.variant.score_set.score_ranges).zeiberg_calibration
7373

74-
if not score_ranges:
74+
if not score_ranges or not score_ranges.ranges:
7575
raise ValueError(
7676
f"Variant {mapped_variant.variant.urn} does not have pillar project score ranges."
7777
" Unable to classify clinical impact."
@@ -88,6 +88,6 @@ def pillar_project_clinical_classification_of_variant(
8888
for range in score_ranges.ranges:
8989
lower_bound, upper_bound = inf_or_float(range.range[0], lower=True), inf_or_float(range.range[1], lower=False)
9090
if functional_score > lower_bound and functional_score <= upper_bound:
91-
return PILLAR_PROJECT_CALIBRATION_STRENGTH_OF_EVIDENCE_MAP[range.evidence_strength]
91+
return ZEIBERG_CALIBRATION_CALIBRATION_STRENGTH_OF_EVIDENCE_MAP[range.evidence_strength]
9292

93-
return PILLAR_PROJECT_CALIBRATION_STRENGTH_OF_EVIDENCE_MAP[0]
93+
return ZEIBERG_CALIBRATION_CALIBRATION_STRENGTH_OF_EVIDENCE_MAP[0]

src/mavedb/lib/annotation/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
GENERIC_DISEASE_MEDGEN_CODE = "C0012634"
55
MEDGEN_SYSTEM = "https://www.ncbi.nlm.nih.gov/medgen/"
66

7-
PILLAR_PROJECT_CALIBRATION_STRENGTH_OF_EVIDENCE_MAP = {
7+
ZEIBERG_CALIBRATION_CALIBRATION_STRENGTH_OF_EVIDENCE_MAP = {
88
# No evidence
99
0: (VariantPathogenicityEvidenceLine.Criterion.PS3, None),
1010
# Supporting evidence
@@ -31,4 +31,4 @@
3131

3232
# TODO#493
3333
FUNCTIONAL_RANGES = ["investigator_provided"]
34-
CLINICAL_RANGES = ["pillar_project"]
34+
CLINICAL_RANGES = ["zeiberg_calibration"]

src/mavedb/lib/annotation/contribution.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
mavedb_api_agent,
1111
mavedb_vrs_agent,
1212
mavedb_user_agent,
13-
pillar_project_calibration_agent,
13+
zeiberg_calibration_agent,
1414
)
1515
from mavedb.lib.types.annotation import ResourceWithCreationModificationDates
1616

@@ -46,15 +46,15 @@ def mavedb_vrs_contribution(mapped_variant: MappedVariant) -> Contribution:
4646
)
4747

4848

49-
def pillar_project_calibration_contribution() -> Contribution:
49+
def zeiberg_calibration_contribution() -> Contribution:
5050
"""
5151
Create a [VA Contribution](https://va-ga4gh.readthedocs.io/en/latest/core-information-model/entities/activities/contribution.html#contribution)
5252
object for a sofware agent which performs calibrations on an arbitrary data set.
5353
"""
5454
return Contribution(
55-
name="MaveDB Pillar Project Calibration",
56-
description="Contribution from the MaveDB Pillar Project Calibration software",
57-
contributor=pillar_project_calibration_agent(),
55+
name="Zeiberg Calibration",
56+
description="Contribution from the Zeiberg Calibration software",
57+
contributor=zeiberg_calibration_agent(),
5858
activityType="variant specific calibration software",
5959
)
6060

src/mavedb/lib/annotation/evidence_line.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
VariantPathogenicityProposition,
1313
)
1414

15-
from mavedb.lib.annotation.classification import pillar_project_clinical_classification_of_variant
15+
from mavedb.lib.annotation.classification import zeiberg_calibration_clinical_classification_of_variant
1616
from mavedb.lib.annotation.contribution import (
1717
mavedb_api_contribution,
1818
mavedb_vrs_contribution,
19-
pillar_project_calibration_contribution,
19+
zeiberg_calibration_contribution,
2020
mavedb_creator_contribution,
2121
mavedb_modifier_contribution,
2222
)
2323
from mavedb.lib.annotation.document import score_set_to_document
2424
from mavedb.lib.annotation.method import (
25-
pillar_project_calibration_method,
25+
zeiberg_calibration_method,
2626
publication_identifiers_to_method,
2727
)
2828
from mavedb.models.mapped_variant import MappedVariant
@@ -33,7 +33,7 @@ def acmg_evidence_line(
3333
proposition: VariantPathogenicityProposition,
3434
evidence: list[Union[StudyResult, EvidenceLineType, StatementType, iriReference]],
3535
) -> Optional[VariantPathogenicityEvidenceLine]:
36-
evidence_outcome, evidence_strength = pillar_project_clinical_classification_of_variant(mapped_variant)
36+
evidence_outcome, evidence_strength = zeiberg_calibration_clinical_classification_of_variant(mapped_variant)
3737

3838
if not evidence_strength:
3939
evidence_outcome_code = f"{evidence_outcome.value}_not_met"
@@ -59,7 +59,7 @@ def acmg_evidence_line(
5959

6060
return VariantPathogenicityEvidenceLine(
6161
description=f"Pathogenicity evidence line {mapped_variant.variant.urn}.",
62-
specifiedBy=pillar_project_calibration_method(evidence_outcome),
62+
specifiedBy=zeiberg_calibration_method(evidence_outcome),
6363
evidenceOutcome={
6464
"primaryCoding": Coding(
6565
code=evidence_outcome_code,
@@ -72,7 +72,7 @@ def acmg_evidence_line(
7272
contributions=[
7373
mavedb_api_contribution(),
7474
mavedb_vrs_contribution(mapped_variant),
75-
pillar_project_calibration_contribution(),
75+
zeiberg_calibration_contribution(),
7676
mavedb_creator_contribution(mapped_variant.variant, mapped_variant.variant.score_set.created_by),
7777
mavedb_modifier_contribution(mapped_variant.variant, mapped_variant.variant.score_set.modified_by),
7878
],

src/mavedb/lib/annotation/method.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,22 +86,22 @@ def mavedb_vrs_as_method() -> Method:
8686
return Method(name="Software version", reportedIn=mavedb_vrs_releases_as_iri())
8787

8888

89-
def pillar_project_calibrations_as_iri() -> IRI:
89+
def zeiberg_calibrations_as_iri() -> IRI:
9090
"""
9191
Create an IRI as described in <https://datatracker.ietf.org/doc/html/rfc3986#section-4.1> for the software used to generate pillar project calibrations. Within
9292
the context of VA-Spec, this IRI can be used interchangeably with an equivalent method object for brevity.
9393
"""
9494
return IRI("https://github.com/Dzeiberg/mave_calibration")
9595

9696

97-
def pillar_project_calibration_method(method: Optional[VariantPathogenicityEvidenceLine.Criterion]) -> Method:
97+
def zeiberg_calibration_method(method: Optional[VariantPathogenicityEvidenceLine.Criterion]) -> Method:
9898
"""
9999
Generate a [VA Method](https://va-ga4gh.readthedocs.io/en/latest/core-information-model/entities/information-entities/method.html#method)
100100
object for the pillar project calibration software distribution.
101101
"""
102102
return Method(
103103
name="Software version",
104-
reportedIn=pillar_project_calibrations_as_iri(),
104+
reportedIn=zeiberg_calibrations_as_iri(),
105105
methodType=method.value if method else None,
106106
)
107107

0 commit comments

Comments
 (0)