Three endpoints answer three different questions about a variant. None of them needs a case.
| Question | Endpoint |
|---|---|
| What is this variant, normalized? | GET /v1/variant/search |
| What does Franklin know about it: annotation, frequencies, predictions, ClinVar, ACMG? | GET /v2/search/snp/ |
| Has my lab classified it before? | POST /v1/variant/org_assessments |
All three accept reference_version of HG19 (the default) or HG38. Always send it explicitly.
search_text accepts HGVS (NM_000546.5:c.215C>G), protein notation (TP53 p.R72P), coordinates (chr17-7577120-C-G) or an rsID (rs28934576):
r = client.request("GET", "/v1/variant/search", params={
"search_text": "NM_000546.5:c.215C>G",
"reference_version": "HG38",
})The response lists the matching variants with gene, HGVS c. and p., chromosomal location, dbSNP ID and a link to the variant in Franklin. A notation can match more than one variant, so check the count before taking the first.
r = client.request("GET", "/v2/search/snp/", params={
"search_text": "chr17-7577120-C-G",
"reference_version": "HG19",
})The trailing slash in /v2/search/snp/ is part of the path. The response covers transcripts (Ensembl and RefSeq), gnomAD frequencies, predictions (SIFT, PolyPhen2, REVEL, SpliceAI and more), ClinVar and UniProt evidence, and Franklin's automated ACMG classification with the rules that fired.
A 400 means the text couldn't be parsed, or the variant wasn't found.
r = client.request("POST", "/v1/variant/org_assessments", json={"variants": [
{"chromosome": "chr17", "position": 7577120, "reference": "C", "alternative": "G", "reference_version": "HG19"},
{"chromosome": "13", "position": 32914438, "reference": "T", "alternative": "C", "reference_version": "HG19"},
]})
for item in r.json()["variants_assessments"]:
a = item["assessments"]
print(item["variant"]["position"],
a["classification"] if a else "not classified",
a and a["classified_by"])assessments is null for a variant your organization hasn't classified. Only your organization's own assessments are returned, never other labs' or public ones.