Description
Resolve a supplied VCF allele index.
VCF represents reference/alternate alleles and sample genotypes with distinct tokens for sequence, symbolic variants, missing values and phasing. A restricted token parser can expose one part of that notation without validating the header, allele relationships, sample ploidy or the whole variant record.
Resolve a supplied VCF allele index.
When to use this tool
Use VCF Allele Index Reference Alternate Token when checking the stated restricted VCF allele or genotype convention.
How to use the tool and how it works
- Enter reference, alternates, alleleIndex. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read allele, kind. Use the output convention below.
Resolve a supplied VCF allele index. Require whole index in [-1,alternates.length] and nonempty allele strings; -1 returns dot/missing, zero returns reference, positive n returns alternates[n-1].1
VCF distinguishes allele representations, missing values and genotype separators. This helper implements only the restricted token operation described above, rather than full-file or biological validation.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| reference | Reference | Required. Text; maximum UTF-16 length 8192. |
| alternates | Alternates | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| alleleIndex | -1 for local missing sentinel, 0 for reference, 1..alternates.length for alternate position. | Required. Safe integer; minimum -1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| allele | Allele | Required. Text; maximum UTF-16 length 8192. |
| kind | Kind | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"reference": "A",
"alternates": [
"C",
"G"
],
"alleleIndex": 2
},
"output": {
"allele": "G",
"kind": "alternate"
}
} Limitations and assumptions
- Allele sequence syntax and biological validity are not checked; the missing index is a local numeric sentinel.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Validate the complete file against the intended VCF version and reference, and use appropriate variant normalization or interpretation methods for biological conclusions.
References
-
Calculation and input contract: bioinformatics/vcf-allele-index-reference-alternate-token — tool.io
-
VCF version 4.5 specification — GA4GH and SAMtools maintainers
Similar or alternative tools
- VCF Missing Genotype Ploidy Token
Return allele count, missingness and phasing from a genotype token.
- Phased Genotype Missing Count
Count missing alleles in a restricted genotype token.