Skip to content

Commit

Permalink
Add models for parsing quality metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
seallard committed Dec 11, 2023
1 parent cca1d73 commit 09830e6
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions cg/meta/workflow/microsalt/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
from typing import List, Dict
from pydantic import BaseModel


class BlastPubmlst(BaseModel):
sequence_type: str
thresholds: str


class QuastAssembly(BaseModel):
estimated_genome_length: int
gc_percentage: str
n50: int
necessary_contigs: int


class PicardMarkduplicate(BaseModel):
insert_size: int
duplication_rate: float


class MicrosaltSamtoolsStats(BaseModel):
total_reads: int
mapped_rate: float
average_coverage: float
coverage_10x: float
coverage_30x: float
coverage_50x: float
coverage_100x: float


class Sample(BaseModel):
blast_pubmlst: BlastPubmlst
quast_assembly: QuastAssembly
blast_resfinder_resistence: List[str]
picard_markduplicate: PicardMarkduplicate
microsalt_samtools_stats: MicrosaltSamtoolsStats


class QualityMetrics(BaseModel):
samples: Dict[str, Sample]

0 comments on commit 09830e6

Please sign in to comment.