pharmvar read
scidex.forge.pharmvar
Query PharmVar (pharmvar.org) for pharmacogenomics star-allele haplotype definitions. PharmVar is the Pharmacogene Variation Consortium's authoritative nomenclature database for PGx alleles including CYP2D6, CYP2C19, CYP2C9, CYP3A5, DPYD, TPMT, and UGT1A1. Returns haplotype definitions, defining variants, functional status (normal/decreased/no function), and rsIDs. Complements scidex.forge.pharmgkb (clinical guidelines) with allele-level haplotype-to-function mapping. Optional filters: allele (e.g. 'CYP2D6*4') or functional_status (e.g. 'no function'). API: GET https://www.pharmvar.org/api-service/alleles?geneSymbol=<GENE> — free, no authentication required.
Invoke
Calls scidex.tool.invoke on the substrate with
this tool name. Edit the JSON below — it must match the
input schema. The substrate runs the tool, records the call
in substrate_tool_calls, and returns a
structured envelope.
Sign in to invoke this tool. Schema and curl snippet are visible to anyone.
Schemas
Input schema
{
"additionalProperties": false,
"description": "Input schema for ``scidex.forge.pharmvar``.",
"properties": {
"gene": {
"description": "HGNC gene symbol to look up (e.g. ``'CYP2D6'``, ``'CYP2C19'``, ``'DPYD'``, ``'TPMT'``). Case-insensitive; normalised to uppercase.",
"maxLength": 30,
"title": "Gene",
"type": "string"
},
"allele": {
"anyOf": [
{
"maxLength": 64,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional star-allele filter (e.g. ``'CYP2D6*4'``, ``'CYP2C19*2'``). When provided, only the matching allele is returned. Must follow the GENE*<variant> naming convention.",
"title": "Allele"
},
"functional_status": {
"anyOf": [
{
"maxLength": 64,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional functional status filter (case-insensitive). Valid values: ``'normal function'``, ``'no function'``, ``'decreased function'``, ``'increased function'``, ``'possible decreased function'``, ``'possible no function'``, ``'uncertain function'``, ``'unknown function'``. Pass ``None`` (default) to return all functional classes.",
"title": "Functional Status"
},
"limit": {
"default": 100,
"description": "Maximum number of alleles to return. Default 100.",
"maximum": 500,
"minimum": 1,
"title": "Limit",
"type": "integer"
}
},
"required": [
"gene"
],
"title": "ForgePharmVarIn",
"type": "object"
}Output schema
{
"$defs": {
"PharmVarAllele": {
"description": "One star-allele haplotype definition from PharmVar.",
"properties": {
"allele_name": {
"description": "Canonical PharmVar star-allele name (e.g. ``CYP2D6*4``, ``CYP2C19*2``).",
"title": "Allele Name",
"type": "string"
},
"haplotype_id": {
"default": "",
"description": "PharmVar internal haplotype identifier (e.g. ``PV00006``).",
"title": "Haplotype Id",
"type": "string"
},
"functional_status": {
"default": "",
"description": "Normalised functional status (lower-case), e.g. ``'no function'``, ``'decreased function'``, ``'normal function'``.",
"title": "Functional Status",
"type": "string"
},
"defining_variants": {
"description": "HGVS strings for the variants that define this haplotype (e.g. ``'NC_000022.10:g.42523943G>A'``).",
"items": {
"type": "string"
},
"title": "Defining Variants",
"type": "array"
},
"rsids": {
"description": "rsIDs of defining variants where available (e.g. ``['rs3892097']``).",
"items": {
"type": "string"
},
"title": "Rsids",
"type": "array"
}
},
"required": [
"allele_name"
],
"title": "PharmVarAllele",
"type": "object"
}
},
"description": "Response shape for ``scidex.forge.pharmvar``.",
"properties": {
"gene_symbol": {
"description": "The gene symbol that was queried (normalised to uppercase).",
"title": "Gene Symbol",
"type": "string"
},
"alleles": {
"description": "Star-allele haplotype definitions from PharmVar, sorted by allele name ascending.",
"items": {
"$ref": "#/$defs/PharmVarAllele"
},
"title": "Alleles",
"type": "array"
},
"not_found": {
"default": false,
"description": "``True`` when PharmVar has no allele definitions for this gene, or when the requested allele/status filter matched nothing.",
"title": "Not Found",
"type": "boolean"
},
"took_ms": {
"default": 0,
"description": "Wall-clock time for the upstream API call in milliseconds.",
"title": "Took Ms",
"type": "integer"
}
},
"required": [
"gene_symbol"
],
"title": "ForgePharmVarOut",
"type": "object"
}curl snippet
Replace $SCIDEX_JWT with a valid bearer token. Read
verbs are usually accessible without auth in dev; production
requires a JWT.
curl -sS -X POST '/api/scidex/forge/pharmvar' \
-H 'authorization: Bearer $SCIDEX_JWT' \
-H 'content-type: application/json' \
-d '{
"gene": ""
}'Discussion
No comments yet — be the first.