---
title: "Get variants grouped by gene"
method: GET
path: "/sessions/{session_id}/variants/by-gene"
tags: ["variants"]
---

# Get variants grouped by gene

`GET /sessions/{session_id}/variants/by-gene`

## Request

- Base URL: `https://api.helena.bio` (the document declares no server; this is the origin it was published from)
- URL: `https://api.helena.bio/sessions/{session_id}/variants/by-gene`
- Auth: none declared

Returns variants aggregated by gene with summary statistics

## Path parameters

- `session_id` string, uuid, required

## Query parameters

- `acmg_class` string[], nullable: Filter by ACMG classifications
- `impact` string[], nullable: Filter by impact levels
- `gene_symbol` string, nullable: Filter by gene symbol (partial match)
- `page` integer, nullable: Page number (optional, returns all if not provided)
- `page_size` integer, nullable: Genes per page (optional)

## Response `200`

Successful Response

- GeneAggregatedResponse: Response for gene-aggregated variants endpoint. Returns variants grouped by gene, sorted by clinical significance. Supports pagination at the gene level.
  - `genes` GeneAggregated[], required: Gene-aggregated variant data
    - `gene_symbol` string, required: Gene symbol
    - `variant_count` integer, required: Total variants in gene
    - `best_acmg_class` string, nullable: Most pathogenic ACMG class
    - `best_acmg_priority` integer: ACMG priority (1=P, 2=LP, 3=VUS, 4=LB, 5=B)
    - `best_impact` string, nullable: Highest impact level
    - `best_priority_score` number, nullable: Highest priority score
    - `pathogenic_count` integer: Pathogenic variants
    - `likely_pathogenic_count` integer: Likely Pathogenic variants
    - `vus_count` integer: VUS variants
    - `likely_benign_count` integer: Likely Benign variants
    - `benign_count` integer: Benign variants
    - `variants` object[]: Variants in this gene
    - `mtdna_variant_count` integer: Count of mtDNA variants (classification_framework=mmdwg_2020)
  - `total_genes` integer, required: Total number of genes
  - `total_variants` integer, required: Total number of variants across all genes
  - `page` integer, required: Current page number
  - `page_size` integer, required: Genes per page
  - `total_pages` integer, required: Total number of pages
  - `has_next_page` boolean, required: Whether there is a next page
  - `has_previous_page` boolean, required: Whether there is a previous page

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/helena/apis/helix-insight-variant-analysis-service.md) · [All operations](https://skmtc.dev/helena/apis/helix-insight-variant-analysis-service/llms.txt) · [OpenAPI document](https://skmtc.dev/helena/apis/helix-insight-variant-analysis-service/revisions/fe51fd20cdf1?raw)
