Skip to content

Commit

Permalink
Merge branch 'main' into version_1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
northwestwitch authored Mar 26, 2024
2 parents bfb30b8 + 0c6f38e commit 0f2173c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Avoid MySQLdb.OperationalError `Server has gone away` by modifying by setting `pool_pre_ping=True` when creating the engine
- Coverage report screenshot displayed on README page and on the documenattion to reflect true statistics from the demo samples
- Coverage report/overview page crashing when transcripts or exons intervals are required only genes are loaded
- Coverage overview over a gene should return transcript statistics if D4 file contains WGS data

## [1.5]
### Added
Expand Down
7 changes: 7 additions & 0 deletions src/chanjo2/models/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,13 @@ def coverage_thresholds_validator(cls, completeness_thresholds: str):
thresholds: List[str] = completeness_thresholds.split(",")
return [int(threshold.strip()) for threshold in thresholds]

@field_validator("interval_type", mode="before")
def interval_type_validator(cls, interval_type: IntervalType) -> IntervalType:
"""Make sure that gene stats include transcript data even if it's a WGS analysis."""
if interval_type == IntervalType.GENES:
return IntervalType.TRANSCRIPTS
return interval_type


class SampleSexRow(BaseModel):
sample: str
Expand Down

0 comments on commit 0f2173c

Please sign in to comment.