LEVIATHAN SYSTEMS

AI Infrastructure

Which VCF Alleles Belong Together Across Two Loci?

Technical contentPublished Updated

For two diploid biallelic sites in one sample and chromosome, phased GT values in a shared phase set preserve which alleles are assigned together to one copy. GT 0|1 at both sites pairs REF with REF and ALT with ALT; changing the second GT to 1|0 changes that association. Both arrangements have the same unordered genotype at each site. A genomics AI input requiring the cross-locus association needs that distinction preserved. An input defined only by per-site ALT counts can require less.

A phase set connects the alleles across markers

Begin with the receiving input's required feature. Does it need each locus's genotype, or whether specified alleles at different loci are assigned to the same copy? A feature asking whether G at one marker and T at another share a copy depends on the second kind of information. Counting one ALT allele at each marker leaves that question open.

This explanation uses VCFv4.5 and BCFv2.2, printing e821e4f dated February 25, 2026. For the ordinary biallelic sequence records here, allele index 0 identifies REF and 1 identifies the single ALT. In these diploid examples, GT 0|1 is phased, while 0/1 is unphased.

For an individual, phased genotypes on the same chromosome with the same PS value belong to one phase set. That set specifies multi-marker haplotypes. The ordered GT entries can therefore carry a relationship between markers, beyond the alleles called separately at each marker.

References: [VCF]

PHASE2: the same two genotypes permit different pairings

PHASE2 is a fictional comparison for sample PHASE2_SAMPLE on declared reference PHASE2_REFERENCE, chromosome SYNTH1. Both loci are ordinary diploid biallelic single-nucleotide variants. POS 101 has REF A and ALT G; POS 202 has REF C and ALT T. Both records explicitly carry PS 101 in each of the two exports.

Export A supplies GT 0|1 at POS 101 and GT 0|1 at POS 202. Follow the first entry across the shared block: 0 at the first locus means A, and 0 at the second means C. That copy's two-site tuple is (A,C). Following the second entries gives (G,T). Thus A represents the pair (A,C)/(G,T).

Export B supplies GT 0|1 at POS 101 and GT 1|0 at POS 202, retaining PS 101 on both. The first entries now give (A,T), and the second give (G,C). B represents (A,T)/(G,C). G and T are assigned together in A and to different copies in B.

At POS 101, both exports call one A and one G. At POS 202, both call one C and one T. Their per-site unordered genotypes and ALT counts agree completely. The distinction appears only when the alleles are followed across loci within the phase set.

Each tuple lists alleles at the two supplied positions, in the order 101 then 202. It is not a contiguous sequence spanning those positions: no intervening sequence is supplied. These stipulated assignments are an explanatory construction, with no sequencing run, biological truth comparison, phasing confidence or parental origin provided.

References: [VCF]

See exactly what a phase-free export discards

Now stipulate a projection that retains each locus's unordered allele pair, sorts its indices in ascending order and writes an unphased GT. Under that explicit rule, both A and B become 0/1 at POS 101 and 0/1 at POS 202.

The recipient receives identical projected calls from the two different inputs. Those calls cannot identify whether the supplied pairing was (A,C)/(G,T) or (A,T)/(G,C). Retaining the sample and both positions does not restore the discarded association; both original arrangements already share that context.

Sorting is part of this example's premise. Merely replacing bars with slashes in B would leave its second genotype printed as 1/0. That differs literally from A's 0/1, although both express the same unphased allele pair. The claim of identical text follows from the declared sorting rule, rather than from changing the separator alone.

If an export retains allele order for some additional purpose, that purpose needs an explicit interpretation. An unphased genotype's printed order alone does not carry the shared-block association demonstrated by phased GT and PS.

References: [VCF]

Copy labels can change while the association stays the same

Within A's shared block, exchanging the two copy labels at every marker changes both GT values from 0|1 to 1|0. Following the new first entries gives (G,T); following the second gives (A,C). The unordered pair of two-site haplotypes is unchanged, and G still shares a copy with T.

This whole-block exchange is different from reversing only the second locus while retaining the shared phase set, as B does. Reversing one locus changes which first-locus allele travels with which second-locus allele.

Consequently, a consumer that needs the association should not depend on one arbitrary copy being printed first. Its required distinction can be expressed as whether the identified alleles share a copy. Neither the first/second labels nor their exchange identifies a maternal or paternal chromosome.

References: [VCF]

Different explicit phase sets leave a different question open

Change the PHASE2 premise: keep GT 0|1 at both loci, but supply explicit PS 101 at POS 101 and explicit PS 202 at POS 202. The loci now belong to different declared phase sets.

The first listed copy in the first block has no specified correspondence to the first listed copy in the second block. Matching first with first would produce (A,C)/(G,T); matching first with second would produce (A,T)/(G,C). These separate blocks do not choose between those associations. Bars at both loci establish phased entries within their respective sets, without supplying the cross-block orientation.

A separate rule applies when phased genotypes have no PS subfield: the specification assumes those genotypes belong to the same phase set. For the same sample and chromosome used here, omitting PS therefore must not be treated as equivalent to supplying two different explicit PS values. A review of the input needs to distinguish those cases.

Conversely, if GT is unphased, its corresponding PS is ignored. Adding PS 101 beside GT 0/1 does not establish PHASE2's shared-copy assignment.

PS membership is scoped to the individual's chromosome. Reusing the number 101 on another chromosome or for another sample does not establish the connection in this example. Using the first variant's position as the identifier is a recommended convention, so PHASE2's shared value 101 is convenient; its digits do not themselves encode the allele pairing.

References: [VCF]

Compare the delivered input against the required association

Stipulate a consumer whose required feature is whether G at SYNTH1:101 and T at SYNTH1:202 are assigned to the same copy for PHASE2_SAMPLE. For the supplied representations, A answers together, B answers apart, and the explicit separate-block case leaves the relationship unspecified. Collapsing unspecified into apart would erase another distinction the feature needs.

An offer preserving only the sorted unphased calls cannot supply those different answers from its delivered representation. An offer preserving phased allele order and the applicable phase-set relationships can preserve them, provided the receiving input retains their meaning. That evaluation needs the sample, reference, chromosome, positions, REF/ALT mapping and diploidy fixed as in PHASE2.

The required feature could also arrive in a derived representation. An explicitly defined together/apart/unspecified value attached to these exact alleles and loci would preserve this narrow relationship. It would not retain every phased allele assignment for other markers. Adequacy follows the consumer's declared requirement and evidence about the delivered interpretation.

If the consumer instead uses only the count of ALT alleles at each of these loci, A and B both supply (1,1). That narrower requirement can be met without retaining their different pairings. Preserving phase is a meaningful requirement for a phase-sensitive feature, rather than an automatic demonstration of better model performance.

The related genotype-likelihood guide addresses another distinction: a called genotype versus its likelihood contrasts. The nucleotide-ambiguity guide explains per-position alternative sets. Neither one-locus likelihoods nor unaligned ambiguity letters supplies the cross-locus phase-set assignment worked through here.

Connect an independently needed equipment installation

If the selected compute and storage equipment also needs physical installation, Leviathan's Rack-and-Stack & Colocation Installation service provides a route to discuss agreed equipment mounting, IT cabling, labels and physical handoff records.

Use the related service and project inquiry with a nonconfidential equipment, rack, site and connection outline to establish scope and availability. Bioinformatics, phase interpretation, data preparation and AI input acceptance remain with the appointed data and software specialists.

References: [L1]

Primary sources

  1. [VCF] Variant Call Format specification: VCFv4.5 and BCFv2.2, printing e821e4f, February 25, 2026Checked 2026-10-21. Section 1.6.2 defines GT and PS, including shared phase-set membership, the no-PS-subfield default and ignored PS for unphased GT. The adjacent PSL definition distinguishes PS's chromosome scope. PHASE2 applies these meanings to stipulated diploid biallelic sequence alleles.
  2. [L1] Leviathan Systems: Rack-and-Stack & Colocation InstallationChecked 2026-10-21. Agreed equipment mounting, IT cabling, labels and physical installation records support an independently scoped equipment-installation inquiry.

Does the selected equipment need physical installation?

Share a nonconfidential equipment, rack, site and IT connection outline to discuss the physical installation scope, handoff requirements and availability.

Discuss a ProjectEmail Project Scope