Skip to content

Commit

Permalink
Merge pull request #206 from opentargets/vh-3405
Browse files Browse the repository at this point in the history
feat: added variantId to pydantic_models/pharmacogenomics.py and upda…
  • Loading branch information
vivienho authored Aug 8, 2024
2 parents 3d6391f + 5be48ce commit c925389
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pydantic_models/pharmacogenomics.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ class Pharmacogenomics(BaseModel):
],
regex=r"^[0-9YX]{1,2}_\d+_[GATC]+_([GATC]+,)?[GATC]+$",
)
variantId: Optional[str] = Field(
description="Identifier in chr_pos_ref_alt notation of the disease-causing variant",
examples=[
"19_38499645_GGAG_G",
"20_54156202_T_C",
"X_12885540_A_A"
],
regex=r"^[0-9YX]{1,2}_\d+_[GATC]+_[GATC]+$",
)
variantRsId: Optional[str] = Field(
description="RS identifier of the variant.",
examples=["rs12354"],
Expand Down
11 changes: 11 additions & 0 deletions schemas/pharmacogenomics.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@
],
"type": "string"
},
"variantId": {
"title": "Variantid",
"description": "Identifier in chr_pos_ref_alt notation of the disease-causing variant",
"pattern": "^[0-9YX]{1,2}_\\d+_[GATC]+_[GATC]+$",
"examples": [
"19_38499645_GGAG_G",
"20_54156202_T_C",
"X_12885540_A_A"
],
"type": "string"
},
"variantRsId": {
"title": "Variantrsid",
"description": "RS identifier of the variant.",
Expand Down

0 comments on commit c925389

Please sign in to comment.