apply_variant_call
Substitute one called ALT allele into a sequence and return the edited bases, the range the edit occupies and the length change. The REF allele is checked against the sequence first and a mismatch REFUSES naming both: applying a call from a different assembly would produce a construct that looks fine and is wrong. Symbolic and breakend alleles are refused for what they are: they name a rearrangement rather than replacement bases.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pos | Yes | the POS of the record to apply, 1-based as VCF writes it. | |
| file | No | which call set the variant comes from, by name. Unset, it is the project's only one. | |
| _files | No | The project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name. | |
| contig | Yes | the contig of the record to apply, as the file names it. | |
| offset | No | the coordinate this sequence's FIRST base has in the call set's contig. Default 1, meaning the sequence starts at the contig's start. A plasmid extracted from a genome sets this to where it was cut from, which is what lets a genomic call be applied to it at all. | |
| _subject | No | The record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several. | |
| sequence | Yes | the sequence to edit. | |
| alt_index | No | which ALT of a multiallelic record to apply, counting from 1 as the file lists them. Default the first. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| delta | Yes | signed length change, which is what any annotation downstream of the edit must shift by | |
| applied | Yes | the record as applied: chrom, pos, ref, the ALT chosen and its index, so a run record says which allele of a multiallelic site was taken | |
| summary | Yes | the edit in one sentence, generated from this run | |
| sequence | Yes | the sequence with this ALT substituted for the REF, ready to wire into a next step. Every base outside the edited range is unchanged, and the length differs from the input by `delta`, so any coordinate downstream of `edited_start` has moved by that much | |
| edited_end | Yes | 0-based INCLUSIVE end of the edited range in the new sequence. Inclusive, not half-open, because it is the end of a selection a reader is meant to see highlighted rather than a slice bound | |
| edited_start | Yes | 0-based inclusive start of the range the edit occupies in the NEW sequence, for selecting it |