Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NG50 bug that couldn't process low quality configs #107

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading