Files
rarelens/api/app/schemas.py
T
kemal 5463f489a3
ci / api (push) Failing after 10s
ci / terraform (push) Failing after 11s
ci / web (push) Failing after 35s
ci / pipeline (push) Failing after 2m29s
ci / images (api) (push) Skipped
ci / images (ml) (push) Skipped
ci / images (pipeline) (push) Skipped
ci / images (web) (push) Skipped
Initial release: rarelens platform skeleton (AGPL-3.0)
End-to-end variant interpretation platform for rare genetic disease research:
SvelteKit UI, FastAPI + PostgreSQL API, Nextflow/Ensembl VEP pipeline,
LightGBM pathogenicity scoring with MLflow, K8s/ArgoCD/GCP infrastructure.
Public test data only; no clinical claims.
2026-09-11 16:55:35 +01:00

64 lines
1.1 KiB
Python

from datetime import datetime
import uuid
from pydantic import BaseModel, ConfigDict, Field
from app.models import JobStatus
class ORMModel(BaseModel):
model_config = ConfigDict(from_attributes=True)
class SampleCreate(BaseModel):
name: str = Field(min_length=1, max_length=120)
vcf_uri: str
assembly: str = "GRCh38"
class SampleOut(ORMModel):
id: uuid.UUID
name: str
vcf_uri: str
assembly: str
created_at: datetime
class JobOut(ORMModel):
id: uuid.UUID
sample_id: uuid.UUID
status: JobStatus
workflow_ref: str | None
vep_version: str | None
created_at: datetime
finished_at: datetime | None
class PredictionOut(ORMModel):
model_name: str
model_version: str
score: float
class VariantOut(ORMModel):
id: int
chrom: str
pos: int
ref: str
alt: str
gene: str | None
consequence: str | None
impact: str | None
hgvsc: str | None
hgvsp: str | None
gnomad_af: float | None
clinvar_sig: str | None
prediction: PredictionOut | None = None
class VariantPage(BaseModel):
items: list[VariantOut]
total: int
limit: int
offset: int