Skip to content

Commit

Permalink
Merge pull request #184 from opentargets/il-pgx
Browse files Browse the repository at this point in the history
feat(pgx): add haplotypeId
  • Loading branch information
DSuveges authored Jan 23, 2024
2 parents cc9b929 + 04e5816 commit 6973c68
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion pydantic_models/pharmacogenomics.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class Pharmacogenomics(BaseModel):
literature: List[str] = Field(
description="List of PMIDs of supporting publications.",
)
haplotypeId: Optional[str] = Field(
description="Combination of genetic variants that constitute a particular allele of a gene.",
examples=["CYP2C9*3"],
)
genotypeId: Optional[str] = Field(
description="VCF-style (chr_pos_ref_allele1,allele2) identifier of genotype; computed as described here: https://github.com/apriltuesday/opentargets-pharmgkb/tree/issue-18#variant-coordinate-computation.",
examples=[
Expand Down Expand Up @@ -109,7 +113,7 @@ class Config:


def main() -> None:
with open("pharmacogenomics.json", "wt") as f:
with open("schemas/pharmacogenomics.json", "wt") as f:
f.write(Pharmacogenomics.schema_json(indent=2))
f.write('\n')

Expand Down
14 changes: 11 additions & 3 deletions schemas/pharmacogenomics.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@
"type": "string"
}
},
"haplotypeId": {
"title": "Haplotypeid",
"description": "Combination of genetic variants that constitute a particular allele of a gene.",
"examples": [
"CYP2C9*3"
],
"type": "string"
},
"genotypeId": {
"title": "Genotypeid",
"description": "VCF-style (chr_pos_ref_allele1,allele2) identifier of genotype; computed as described here: https://github.com/apriltuesday/opentargets-pharmgkb/tree/issue-18#variant-coordinate-computation.",
Expand Down Expand Up @@ -89,7 +97,7 @@
},
"genotype": {
"title": "Genotype",
"description": "Genotype string",
"description": "Genotype string.",
"examples": [
"(CA)16/(CA)17",
"TA",
Expand All @@ -107,15 +115,15 @@
},
"drugFromSource": {
"title": "Drugfromsource",
"description": "Drug name",
"description": "Drug name.",
"examples": [
"succinylcholine"
],
"type": "string"
},
"drugId": {
"title": "Drugid",
"description": "CHEBI ID of drug, mapped through OLS",
"description": "CHEBI ID of drug, mapped through OLS.",
"pattern": "^CHEBI_\\d+$",
"examples": [
"CHEBI_45652"
Expand Down

0 comments on commit 6973c68

Please sign in to comment.