Skip to content

Commit

Permalink
Merge pull request #107 from SMD-Bioinformatics-Lund/fix-ng50-low-qua…
Browse files Browse the repository at this point in the history
…l-bug

Fix NG50 bug that couldn't process low quality configs
  • Loading branch information
ryanjameskennedy authored Jan 8, 2025
2 parents 4c8d7fc + 015f965 commit fdca9f6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Fixed

- Fixed NG50 bug that couldn't process "-"

### Changed

## [0.11.3]
Expand Down
2 changes: 1 addition & 1 deletion prp/models/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from enum import Enum
from typing import Optional

from pydantic import BaseModel, Field
from pydantic import BaseModel

from .base import RWModel

Expand Down
8 changes: 7 additions & 1 deletion prp/models/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
from .typing import TypingSoftware


class ValidQualityStr(Enum):
"""Valid strings for qc entries."""

LOWCONTIGQUAL = "-"


class QcSoftware(Enum):
"""Valid tools."""

Expand All @@ -24,7 +30,7 @@ class QuastQcResult(BaseModel):
largest_contig: int
n_contigs: int
n50: int
ng50: int | None = None
ng50: int | ValidQualityStr | None = None
assembly_gc: float
reference_gc: float | None = None
duplication_ratio: float | None = None
Expand Down

0 comments on commit fdca9f6

Please sign in to comment.