From variant to clinical research report in seconds: AI-Assisted genomic variant classification with Amazon Quick
Learn how to use the Variant Classification API along with Quick to quickly received structured clinical reports on variant classification.
The problem: Variant classification is slow and manual
You have a list of genomic variants from a sequencing run. Each one requires a multitude of steps:
-
Looking up the functional consequence in Ensembl VEP.
-
Checking the population frequency in gnomAD.
-
Pulling gene constraint scores (pLI, LOEUF).
-
Manually evaluating each ACMG/AMP criterion.
-
Applying combining rules to reach a 5-tier classification.
-
Writing up the interpretation with supporting evidence.
For a single variant, the process can take 15–30 minutes. For a panel of 50 variants, it's a full day of manual curation—and that's before you write the clinical report.
What if you could type one sentence and get the variant classification back in seconds?
The result: Ask a question, get a clinical report
To view the complete open-source solution, see Variant Classification API on the GitHub website.
With this solution deployed, you open Quick and type:
"Classify variant 1-55039870-G-A"
Seconds later, Quick returns a structured clinical report. No manual lookups. No spreadsheets. No copying and pasting between gnomAD, VEP, and your notes. The entire ACMG evaluation, clinical interpretation, and literature search happens automatically.
Example report:
🟡 VUS — PCSK9 | 1-55039870-G-A
| Metric | Value | Interpretation |
|---|---|---|
| gnomAD r4 AF | 7.09 × 10⁻⁷ | Ultra-rare |
| CADD Phred | 36.0 | Highly deleterious |
| SpliceAI Max | 0.0 | No splice impact |
| pLI | ~0.0 | Gene NOT constrained |
| LOEUF | 1.144 | Tolerant of LoF |
.
| gnomAD r4 AF | 7.09 × 10⁻⁷ | Ultra-rare |
|---|---|---|
| CADD Phred | 36.0 | Highly deleterious |
| SpliceAI Max | 0.0 | No splice impact |
| pLI | ~0.0 | Gene NOT constrained |
| LOEUF | 1.144 | Tolerant of LoF |
.
| CADD Phred | 36.0 | Highly deleterious |
|---|---|---|
| SpliceAI Max | 0.0 | No splice impact |
| pLI | ~0.0 | Gene NOT constrained |
| LOEUF | 1.144 | Tolerant of LoF |
.
| SpliceAI Max | 0.0 | No splice impact |
|---|---|---|
| pLI | ~0.0 | Gene NOT constrained |
| LOEUF | 1.144 | Tolerant of LoF |
.
| pLI | ~0.0 | Gene NOT constrained |
|---|---|---|
| LOEUF | 1.144 | Tolerant of LoF |
.
| LOEUF | 1.144 | Tolerant of LoF |
|---|
ACMG Criteria Evaluated:
| Criterion | Strength | Met? | Reason |
|---|---|---|---|
| PVS1 | Very Strong | ❌ | Gene not constrained (pLI≈0, LOEUF=1.14) |
| PM2 | Moderate | ✅ | Ultra-rare: AF=7.09×10⁻⁷ |
| PP3 | Supporting | ✅ | CADD phred=36.0 (≥20) |
| BA1 | Stand-alone | ❌ | AF does not exceed 5% |
| BS1 | Strong | ❌ | AF does not meet threshold |
| ... | (all 10 criteria shown) |
.
| PVS1 | Very Strong | ❌ | Gene not constrained (pLI≈0, LOEUF=1.14) |
|---|---|---|---|
| PM2 | Moderate | ✅ | Ultra-rare: AF=7.09×10⁻⁷ |
| PP3 | Supporting | ✅ | CADD phred=36.0 (≥20) |
| BA1 | Stand-alone | ❌ | AF does not exceed 5% |
| BS1 | Strong | ❌ | AF does not meet threshold |
| ... | (all 10 criteria shown) |
.
| PVS1 | Very Strong | ❌ | Gene not constrained (pLI≈0, LOEUF=1.14) |
|---|---|---|---|
| PM2 | Moderate | ✅ | Ultra-rare: AF=7.09×10⁻⁷ |
| PP3 | Supporting | ✅ | CADD phred=36.0 (≥20) |
| BA1 | Stand-alone | ❌ | AF does not exceed 5% |
| BS1 | Strong | ❌ | AF does not meet threshold |
| ... | (all 10 criteria shown) |
.
| PM2 | Moderate | ✅ | Ultra-rare: AF=7.09×10⁻⁷ |
|---|---|---|---|
| PP3 | Supporting | ✅ | CADD phred=36.0 (≥20) |
| BA1 | Stand-alone | ❌ | AF does not exceed 5% |
| BS1 | Strong | ❌ | AF does not meet threshold |
| ... | (all 10 criteria shown) |
.
| PP3 | Supporting | ✅ | CADD phred=36.0 (≥20) |
|---|---|---|---|
| BA1 | Stand-alone | ❌ | AF does not exceed 5% |
| BS1 | Strong | ❌ | AF does not meet threshold |
| ... | (all 10 criteria shown) |
.
| BA1 | Stand-alone | ❌ | AF does not exceed 5% |
|---|---|---|---|
| BS1 | Strong | ❌ | AF does not meet threshold |
| ... | (all 10 criteria shown) |
.
| BS1 | Strong | ❌ | AF does not meet threshold |
|---|---|---|---|
| ... | (all 10 criteria shown) |
.
| ... | (all 10 criteria shown) |
|---|
Why VUS? This is a stop-gained (nonsense) variant—normally strong pathogenic evidence. But PCSK9 is not constrained against loss-of-function (pLI≈0), so PVS1 cannot be applied. With only PM2 (Moderate) + PP3 (Supporting), the evidence is insufficient for "Likely Pathogenic."
Clinical Context: PCSK9 loss-of-function variants are well-established as protective against cardiovascular disease, associated with reduced LDL cholesterol and up to 88% reduction in coronary events (Cohen et al., 2006).
Relevant Literature:
- Cohen et al. — Sequence variations in PCSK9, low LDL, and protection against CHD (PubMed)
- PCSK9: From Nature's Loss to Patient's Gain (2024) (AHA Journals)
⚠️ This classification is computational and based on 10 of 28 ACMG-AMP criteria. Clinical interpretation requires review by a qualified geneticist.
How it works: the science
Behind the scenes, this solution implements the ACMG/AMP 2015 guidelines (Richards et al., Genetics in Medicine), the standard framework that's used worldwide for clinical variant interpretation. The framework defines 28 criteria. The solution automates the 10 criteria that can be computationally evaluated from two public data sources.
Data sources
| Source | What it provides | What it’s used for |
|---|---|---|
| Ensembl VEP (European Bioinformatics Institute) | Functional consequence, CADD score, SpliceAI splice predictions, exon position, NMD flags | PVS1, PM4, PP2, PP3, BP1, BP4, BP7 |
| gnomAD r4 (Broad Institute) | Population allele frequency across 730k+ individuals, gene constraint scores (pLI, LOEUF, oe_mis, mis_z) | PVS1, PM2, BA1, BS1 |
The 10 automated ACMG criteria
| Criterion | Strength | What it asks | How it's answered |
|---|---|---|---|
| PVS1 | Very Strong (Pathogenic) | Is this a null variant in a gene intolerant to loss-of-function (LoF)? | Stop-gained/frameshift + pLI ≥ 0.9 or LOEUF ≤ 0.35 |
| PM2 | Moderate (Pathogenic) | Is this variant absent or ultra-rare in the population? | gnomAD AF < 0.01% |
| PM4 | Moderate (Pathogenic) | Does this change protein length? | In-frame indel or stop-loss |
| PP2 | Supporting (Pathogenic) | Is this a missense in a gene that doesn't tolerate missense? | mis_z ≥ 3.09 or oe_mis ≤ 0.8 |
| PP3 | Supporting (Pathogenic) | Do computational tools predict damage? | CADD phred ≥ 20 or SpliceAI ≥ 0.2 |
| BA1 | Stand-alone (Benign) | Is this too common to cause disease? | gnomAD AF > 5% |
| BS1 | Strong (Benign) | Is the frequency higher than expected? | gnomAD AF between 0.01% and 1% |
| BP1 | Supporting (Benign) | Is this a missense in a gene where only LoF causes disease? | Missense + high pLI + tolerant oe_mis |
| BP4 | Supporting (Benign) | Do computational tools predict benign? | CADD phred < 10 |
| BP7 | Supporting (Benign) | Is this a synonymous variant with no splice impact? | Synonymous + SpliceAI < 0.1 |
Combining rules
After the criteria are evaluated, the ACMG combining rules determine the final classification:
| Classification | Required Evidence |
|---|---|
| Pathogenic | 1 Very Strong + ≥1 Strong, or 1 Very Strong + ≥2 Moderate, or ≥2 Strong |
| Likely Pathogenic | 1 Very Strong + 1 Moderate, or 1 Strong + 1–2 Moderate, or ≥3 Moderate |
| Benign | 1 Stand-alone, or ≥2 Strong benign |
| Likely Benign | 1 Strong + 1 Supporting, or ≥2 Supporting benign |
| VUS | Everything else — insufficient evidence in either direction |
What's NOT automated and why
The remaining 18 ACMG criteria require data can't be computationally derived for the following reasons:
-
Functional studies (PS3/BS3) require wet-lab experimental results.
-
Segregation (PP1/BS4) requires family pedigree data.
-
De novo status (PS2/PM6) requires parental sequencing.
-
Literature evidence (PP4) requires expert curation.
-
ClinVar cross-references (PS1/PM5/PP5/BP6) are possible to automate in future versions.
The tool is designed for triage and prioritization. It identifies which variants need human expert review, not which variants are definitively pathogenic.
How it works: the technology
Architecture
What each layer does
| Layer | Role | Key point |
|---|---|---|
| Amazon Quick | Provides natural-language interface, orchestrates workflow, searches literature, formats report | The LLM never makes biological predictions. It only interprets structured results. |
| AWS Lambda | Hosts the classification API, fetches data, evaluates ACMG criteria deterministically | Same variant always produces same classification. It's fully reproducible. |
| Ensembl VEP | Predicts functional consequence of a variant on genes and proteins | Public API, no credentials needed. |
| gnomAD r4 | Provides population allele frequency and gene constraint metrics | Public API, most current release. |
The primary design principle
All classification logic is deterministic. The ACMG criteria engine uses fixed thresholds and combining rules with no AI inference. The role of Quick is purely interpretive, translating between human language and structured API calls. This results in the following outcomes:
-
The same variant always gets the same classification.
-
Results are auditable. Every criterion shows exactly why it was or wasn't met.
-
The AI can't hallucinate a classification. It can only report what the engine computed.
Deploy the solution yourself
Before you deploy the solution, make sure that your environment meets the solution’s prerequisites. For a list of prerequisites, see Setup on the GitHub website.
To deploy the solution, complete the following steps:
- Run the following command to clone the repository:
git clone https://github.com/aws-samples/sample-genomic-variant-classification-serverless.git
cd sample-genomic-variant-classification-serverless - Run the following command to set up the Python environment:
python3 -m venv .venv && source .venv/bin/activate
pip install -r lambda/requirements.txt - Run the following command to deploy to AWS:
cp samconfig.example.toml samconfig.toml
# edit region if needed
sam build
sam deploy
The entire solution deploys in under 5 minutes. AWS Serverless Application Model (AWS SAM) creates the Lambda function, Amazon API Gateway resource, and AWS Identity and Access Management (IAM) role. The API is live and ready to classify variants.
To immediately test the solution, run the following commands:
API_URL=\$(aws cloudformation describe-stacks \
--stack-name variant-classification-v2 --region us-east-1 \
--query "Stacks\[0\].Outputs\[?OutputKey=='ApiUrl'\].OutputValue" --output text)
curl -s -X POST "\$API_URL/classify" \
-H "Content-Type: application/json" \
-d '{"variant_id": "1-55039870-G-A"}' \| python3 -m json.tool
For more information, see Setup on the GitHub website.
For information about costs, see AWS Lambda pricing and Amazon API Gateway pricing.
What Quick brings to this solution
Quick transforms a JSON API into a tool that researchers actually want to use. Without Quick, you'd need to write curl commands or build a custom frontend.
With Quick, you get the following capabilities:
| Capability | What it does |
|---|---|
| Custom Action Connectors | Registers the classification API so that the AI agent can call it. You upload the OpenAPI spec and set the base URL. |
| Quick Flows | Parses the input, calls the API, searches the literature, and generates report. |
| Chat Agents | Interprets the 10-criteria ACMG evaluation into plain English, explains why criteria were or weren't met, and adds clinical context. |
| Web Search | Automatically finds relevant PubMed papers about the gene/variant and includes links in the report. |
| Formatted Reports | Produces publication-ready output with tables, evidence summaries, and literature citations. |
Set up the Quick integration
After you deploy the solution, complete the following steps to connect the API to Quick:
- Register the connector: Upload the openapi.json from the repository as a custom action connector. Set the base URL to your deployed API Gateway endpoint.
- Create a Quick Flow: The repository README includes a complete flow definition that you can enter directly into the Quick console. It sets up the full pipeline: from input, route, and classify to literature search, report, and follow-up options.
- Run the API: Type a variant ID and get back a full clinical report with ACMG criteria, evidence, and literature in seconds.
Batch classification
For larger panels, run the following command to classify up to 20 variants in a single request:
curl -s -X POST "\$API_URL/classify/batch" \
-H "Content-Type: application/json" \
-d '{"variants": [
{"variant_id": "1-55039870-G-A"},
{"variant_id": "17-43045682-T-C"},
{"variant_id": "1-55039774-C-T"}
]}' | python3 -m json.tool
Note: Replace the values for variant_id with the variant IDs.
Or, enter the following prompt in Quick: "Classify these three variants: 1-55039870-G-A, 17-43045682-T-C, 1-55039774-C-T". The Quick flow automatically uses the batch endpoint and generates a summary table with variant-level detail blocks.
Limitations
| Limitation | Implication |
|---|---|
| 10 of 28 ACMG criteria automated | Functional studies, segregation, de novo status, and ClinVar require manual review. |
| Research-grade only | Not validated for clinical diagnostic reporting because it requires geneticist review. |
| Public API rate limits | VEP and gnomAD might throttle under heavy load. The tool retries automatically, but might time out on large batches. |
| GRCh38 default | For GRCh37 coordinates, specify dataset: "gnomad_r2_1". |
What's next
The following features are next for the tool:
-
ClinVar integration: Automatically cross-reference known pathogenic or benign classifications.
-
VCF file upload: Accept a VCF, classify all variants, return annotated results.
-
Local VEP deployment: Deploy a containerized VEP for high throughput without rate limits.
-
AWS Step Functions: Orchestrate classification of thousands of variants in parallel.
Conclusion
Variant classification doesn't have to be a manual, time-consuming process. By combining a deterministic ACMG criteria engine with the natural-language interface of Quick, researchers can go from a variant ID to a fully interpreted clinical report—with evidence, literature, and next steps—in seconds rather than minutes.
The classification logic is transparent, auditable, and reproducible. The AI adds interpretation and context without making biological predictions. And it all runs serverless on AWS.
Get started: Variant classifications API on the GitHub website.
References
-
Richards S, et al. "Standards and guidelines for the interpretation of sequence variants." Genetics in Medicine. 2015;17(5):405-424. doi:10.1038/gim.2015.30
-
Kircher M, et al. "A general framework for estimating the relative pathogenicity of human genetic variants." Nature Genetics. 2014;46(3):310-315.
-
Jaganathan K, et al. "Predicting splicing from primary sequence with deep learning." Cell. 2019;176(3):535-548.
-
Karczewski KJ, et al. "The mutational constraint spectrum quantified from variation in 141,456 humans." Nature. 2020;581:434-443.
-
Cohen JC, et al. "Sequence variations in PCSK9, low LDL, and protection against coronary heart disease." New England Journal of Medicine. 2006;354(12):1264-1272.
- Topics
- ServerlessFront-End Web & MobileComputeBusiness ApplicationsEducationNetworking & Content Delivery
- Language
- English

Relevant content
asked 10 months ago
- Accepted Answer
asked 6 years ago