---
title: "Variant to construct to genotyping bridge"
method: POST
path: "/variant_to_construct"
tags: ["Alignment & variants"]
---

# Variant to construct to genotyping bridge

`POST /variant_to_construct`

## Request

- Base URL: `https://seqbench.com/api/v1`
- URL: `https://seqbench.com/api/v1/variant_to_construct`
- Auth: none required

Turn one variant into one buildable plan: verify the reference allele actually sits where the coordinate says, apply the edit, design site-directed mutagenesis primers to install it, design KASP/ARMS allele-specific primers to genotype it afterwards, and consolidate everything into a single oligo order table. Takes either a construct sequence with a 1-based position and ref/alt alleles (offline, deterministic), or an HGVS "c." description resolved through the MANE crosswalk and a live Ensembl exon map. A mismatched reference allele is refused with the bases that were actually found there, because a coordinate that is right for another isoform yields a perfectly valid primer set for the wrong base. Bases shared by both alleles are trimmed first, so a VCF-anchored pair is designed as the substitution or indel it actually is. Mutagenesis covers every class (a substitution, an insertion, a deletion and a multi-base replacement are all one interval replacement); KASP needs a single-base substitution's 3'-terminal base, so for an indel the genotyping half comes back as a named omission with the reason and the readout that does work, never as an empty list.

Not a workflow step (it does not take a single sequence argument), but its `editedSequence` field is the sequence to carry into the next call yourself.

## Request body

- object
  - `sequence` string: OFFLINE MODE. The reference/construct sequence the variant is described against (raw or FASTA). Mutually exclusive with "variant".
  - `position` integer: OFFLINE MODE. 1-based position of the first base of refAllele on `sequence`. For a pure insertion (empty refAllele) the alternate bases are inserted immediately BEFORE this position.
  - `refAllele` string: OFFLINE MODE. Bases replaced, as they appear on `sequence` — checked against it and refused if they differ. Use "-" or "" for a pure insertion. A VCF-style anchored pair (both alleles carrying a shared flanking base, e.g. refAllele "T" / altAllele "TGGATCC", or "TG" / "AG") is accepted and trimmed to its minimal form before anything is designed; the trimmed coordinates are reported as `minimal`.
  - `altAllele` string: OFFLINE MODE. Bases installed. Use "-" or "" for a pure deletion.
  - `variant` string: NETWORK MODE. A full HGVS "c." description, e.g. "NM_000546.6:c.215C>G" or "TP53:c.215C>G". Resolved through the bundled MANE crosswalk and a live Ensembl exon map, then a genomic window is fetched around it. Mutually exclusive with "sequence".
  - `flank` integer: NETWORK MODE. Bases of genomic context fetched either side of the variant (60-1000). Needs to cover the allele-specific core upstream and the genotyping amplicon downstream.
  - `label` string: Name stem for the ordered oligos. Defaults to the HGVS string (network mode) or a positional label like "A100G" (offline).
  - `style` 'quikchange' | 'q5': Mutagenic primer style: overlapping (QuikChange) or back-to-back (Q5/KLD).
  - `armTmTarget` number: Target Tm (°C) for each mutagenic primer's template-binding arm (45-80; the arm is grown between 10 and 30 nt, so a target outside that range is refused rather than clamped to the shortest or longest arm).
  - `targetCoreTm` number: Target Tm (°C) for the allele-specific genotyping core, before the universal tail (45-80; the core is chosen between 18 and 27 nt, so a target outside that range is refused rather than clamped).
  - `minAmplicon` integer: Minimum genotyping amplicon length, measured from the allele-specific primer's 5' end (which sits one core-length upstream of the variant) to the reverse primer's 5' end. Must not exceed maxAmplicon.
  - `maxAmplicon` integer: Maximum genotyping amplicon length. Refused below 36 bp, the shortest KASP product that can exist (an 18 nt core plus an 18 nt reverse primer), and refused below minAmplicon — both are unsatisfiable for every reference, and left unchecked they came back as "no common reverse primer could be placed; provide more 3' flanking sequence".
  - `addSecondaryMismatch` boolean: Engineer the ARMS destabilizing mismatch 3 nt from the allele-specific primer's 3' end.

## Response `200`

Tool ran successfully.

- SuccessResponse: Standard success envelope returned by every single-tool call.
  - `ok` unknown, required
  - `tool` string, required: The tool slug that ran.
  - `result` object, required: Tool-specific output object. Its shape depends on the tool — call `GET /{tool}` or see the docs for each tool's fields.
  - `gate` GateResult
    - `pass` boolean, required: True if and only if every hard check passed.
    - `checks` GateCheck[], required
      - `id` string, required
      - `label` string, required
      - `severity` 'hard' | 'soft', required
      - `pass` boolean, required
      - `message` string, required
      - `value` number
      - `threshold` string
    - `notChecked` string[], required: Honest list of what this gate does NOT verify.
  - `provenance` Provenance, required
    - `apiVersion` string, required
    - `tool` union, required: Tool slug, or an array of slugs (one per step) for a workflow.
      - string
      - string[]
    - `generatedAt` string, date-time, required: ISO 8601 timestamp of when the result was generated.

## Other responses

- `400`: Invalid argument or the tool could not run.
- `404`: Unknown tool.
- `429`: Rate limited (metered tools only). Body carries code `rate_limited` and retryable `true`; honor the Retry-After header.
- `503`: A metered tool is momentarily at capacity. The identical request should succeed after Retry-After; body carries code `upstream_unavailable`.

---

[API](https://skmtc.dev/seqbench/apis/seqbench-api.md) · [All operations](https://skmtc.dev/seqbench/apis/seqbench-api/llms.txt) · [OpenAPI document](https://skmtc.dev/seqbench/apis/seqbench-api/revisions/132575216865?raw)
