Why Coordinate Harmonization Comes First
A credible set identifies variants with posterior support for explaining a genetic association signal. To interpret those variants alongside functional tracks, each variant must be matched to the same genomic location and allele representation used by the annotation source. A failed match can mean the variant is absent from a track, but it can also mean that the two files describe the same biological site in incompatible ways.
The practical task is to determine what each file means by its chromosome, position, reference allele, alternate allele, strand, and variant representation. These fields are related, but none can safely be inferred from a variant label alone. In particular, a chromosome and position are meaningful only relative to a genome build and a coordinate convention.
Builds and Coordinate Conventions
A genome build assigns reference sequence and coordinates to chromosomes. The same biological region can have different coordinates in different builds because sequence content, gaps, and assembly decisions differ. Therefore, equal chromosome and position values in two files do not establish that the records refer to the same sequence. Conversely, a real variant can have different positions in two builds.
Coordinates also differ in their conventions. VCF records use 1-based positions: position 1 is the first base of a chromosome. BED intervals use 0-based, half-open coordinates: the start is included and the end is excluded. An interval with BED start \(s\) and end \(e\) covers the 1-based bases \(s+1\) through \(e\), inclusive. Thus a one-base BED interval \([s,s+1)\) refers to 1-based position \(s+1\), not \(s\).
This relationship follows directly from the conventions: BED counts the number of bases before its start coordinate, while a 1-based coordinate numbers the first base as 1. A BED interval from 0 to 1 contains the first base, whose 1-based position is 1; shifting both BED boundaries up by 1 gives the corresponding inclusive 1-based endpoints. For a one-base variant, checking this conversion explicitly prevents a frequent one-base error.
When a variant file and annotation file use different builds, conversion between builds is usually attempted with a mapping procedure such as liftOver. This is not a universal arithmetic offset. A source interval may map to a different position, map to more than one target interval, or fail to map. Even a successful coordinate conversion should be checked against the target reference sequence and allele representation. A build label should be recorded for each input, rather than assumed from a file's appearance or filename.
Worked Example: Resolving a Build and BED Offset Mismatch
Suppose a hypothetical credible-set record is reported as GRCh38 chr7:55,123,456 A>G. A functional track is a GRCh37 BED file with the row chr7, start 55,090,040, end 55,090,041. A direct comparison of positions finds no overlap. Assume, for this example, that a validated build conversion maps the variant to GRCh37 chr7 position 55,090,041.
Step 1: Convert the track interval. The BED row covers 1-based position \(55{,}090{,}040+1=55{,}090{,}041\), because it is a one-base interval with end one greater than start.
Step 2: Compare in the same build. After conversion, the variant position is GRCh37 chr7:55,090,041, which is the single base covered by the BED interval. The positions now agree. The original GRCh38 coordinate should not be compared directly with the GRCh37 BED coordinate.
Conclusion. Under the stated hypothetical mapping, the variant overlaps the track. The match is supported by the build conversion and the BED-to-1-based conversion, not by the unconverted position values. In an actual analysis, the target-build reference allele would also need validation before assigning the final variant key.
Reference and Alternate Alleles
For a small variant represented in VCF, REF is the reference sequence at the reported site and ALT is the alternate sequence. The reference allele is defined against a particular genome build and sequence orientation. It is not simply the allele that is common in a population, nor does REF imply the ancestral allele. A record whose REF does not match the specified reference sequence is a warning of a possible build, strand, position, or file-format problem.
For an allele-specific match, a useful key includes at least build, chromosome, normalized position, REF, and ALT. A locus-level track may report only an interval and thus support a positional overlap without distinguishing alleles. That kind of overlap is not evidence that the track refers specifically to the alternate allele. Keep the distinction clear: a position match can be adequate for a non-allele-specific interval query, but it is not an allele-resolved match.
The strand convention matters when alleles are reported relative to opposite DNA strands. To express an allele on the opposite strand, take its reverse complement: complement each base and reverse the sequence order. For a single-base substitution, A pairs with T and C pairs with G. Thus a C>T change on one strand corresponds to G>A when written on the opposite strand. The genomic position is unchanged by this orientation switch, provided the coordinate system itself has not changed.
Worked Example: Harmonizing Opposite-Strand Alleles
A hypothetical variant file gives GRCh38 chr3:18,240,510 C>T, with alleles written on the reference-forward strand. An annotation source reports a substitution at the same build and position as G>A, explicitly written on the opposite strand.
Step 1: Reverse-complement the annotation alleles. The complement of G is C, and the complement of A is T. Since these are single bases, reversing their order makes no further change: G>A on the opposite strand becomes C>T on the reference-forward strand.
Step 2: Compare the harmonized records. Both records now specify GRCh38 chr3:18,240,510 C>T. The build, position, REF, and ALT agree, so they describe the same oriented substitution under the stated conventions.
Important limitation. For A>T and C>G substitutions, the two alleles are complements of one another, so an allele pair alone cannot reveal which strand convention was used. These are called palindromic allele pairs. If strand orientation is undocumented, do not infer it from a palindromic pair; use reliable metadata or mark the orientation as unresolved.
Variant Representation and Normalization
A variant can have more than one textual representation, particularly an insertion or deletion in a repeated sequence. VCF uses an anchor base so that REF and ALT are nonempty. For example, an insertion may be encoded by including the base immediately before the inserted sequence. In a repeat, the same biological insertion can sometimes be placed at different nearby positions while preserving the same resulting sequence. A literal comparison of position and allele strings can therefore fail even when two records describe the same event.
Normalization applies consistent representation rules, commonly trimming redundant shared sequence from alleles and left-aligning indels as far as possible against the reference sequence. These operations require the correct reference build. Normalization does not make two different biological events equivalent; it gives equivalent representations a consistent form when the reference and rules agree. Multiallelic records also need care: splitting a record with multiple ALT alleles into separate variant records must preserve the correct REF, ALT, and any associated annotations.
For a VCF record with position \(p\) and REF length \(r\), the reference span occupies 1-based positions \(p\) through \(p+r-1\). For a simple substitution, this is one base. For an indel, the represented REF span and the biological insertion or deletion event are not interchangeable concepts. An annotation pipeline should specify whether it tests the VCF anchor, the REF span, or a normalized event position when querying intervals. In particular, an insertion occurs between reference bases; a one-base anchor overlap is a convention for matching, not proof that the inserted bases themselves occupy that reference position.
Worked Example: An Indel That Fails an Exact-String Match
Consider a hypothetical reference sequence in which positions 100 through 104 are G-A-A-A-C. One file represents insertion of an A within the run of A bases as chr2:100 G>GA. A second file represents the same insertion as chr2:101 A>AA. An exact comparison of position and alleles says the records differ.
Step 1: Interpret each representation. The first record retains the G at position 100 and adds an A after it. The second retains the A at position 101 and adds another A after that base. Because the reference contains a run of consecutive A bases, inserting one more A at either location produces the same local sequence.
Step 2: Apply a shared representation rule. Left-aligning against the stated reference places the insertion at the left edge of the repeat. Under that convention, the second representation is shifted to the first representation, chr2:100 G>GA.
Conclusion. The original strings were not identical, but the normalized records agree in this hypothetical example. Without the reference sequence and a stated normalization convention, the apparent equivalence should not be assumed from nearby positions alone.
A Practical Harmonization Workflow
For credible-set annotation, harmonize records before interpreting whether a variant overlaps a functional track. The goal is not to manufacture a match. It is to determine whether the inputs make a match identifiable, and to retain an explicit unresolved status when they do not.
For every input, identify the genome build, coordinate system, chromosome naming scheme, strand convention, and variant format. Treat missing metadata as uncertainty, not as a detail to guess.
Use a documented conversion when builds differ. Check unmapped, multiply mapped, or otherwise ambiguous records, and validate converted positions against the target reference.
Convert BED intervals and variant positions according to their definitions. For a BED interval \([s,e)\), the corresponding inclusive 1-based bases are \(s+1\) through \(e\).
Confirm that REF matches the chosen reference sequence. Reverse-complement alleles only when the source strand convention requires it, and flag ambiguous palindromic pairs when orientation cannot be established.
Normalize indels against the same reference and rules. Decide whether the question is an allele-specific match or a positional interval overlap, and retain enough fields to reproduce that decision.
Diagnosing Failed and Misleading Overlaps
When a credible-set variant appears not to overlap a track, inspect the matching inputs in a fixed order. First compare build labels, then coordinate conventions, then chromosome and position, and finally alleles, strand, and indel representation. A useful record of the result includes the original values, harmonized values, conversion or normalization applied, and a status such as matched, not matched, or unresolved. This makes it possible to distinguish a genuine absence from a technical mismatch.
Harmonization also prevents false confidence. A position-only interval overlap does not establish that a track distinguishes the credible-set ALT allele from REF. Nor does successful coordinate conversion establish functional relevance. These checks answer whether the records can be compared at the intended level; they do not establish a molecular mechanism or show that a variant causes a trait.
- Wrong reasoning: “The chromosome and number look close, so the records must refer to the same variant.” Correction: Require compatible builds and coordinate conventions before comparing positions.
- Wrong reasoning: “The alleles differ, so the records cannot match.” Correction: Check whether one source reports the opposite strand, and reverse-complement only when supported by metadata.
- Wrong reasoning: “Different indel strings prove different events.” Correction: Normalize against the same reference before deciding whether representations are equivalent.
- Wrong reasoning: “The variant overlaps the track, so the track supports the ALT allele.” Correction: State whether the track is allele-specific; a position-only overlap usually does not resolve REF versus ALT.
Check Your Understanding
Use the definitions and workflow above to explain each answer.
- A BED row has start 250 and end 251. Which 1-based genomic position does this one-base interval cover?
- Why is it unsafe to compare the same chromosome and position from GRCh37 and GRCh38 without checking the build?
- A source reports G>A on the opposite strand from a reference-forward C>T record at the same build and position. What comparison should be made after harmonization?
- Why can two different position-and-allele strings describe the same indel in a repeated sequence, and what information is needed to normalize them?
- A variant position overlaps a functional interval, but the interval track has no allele information. What can the overlap establish, and what can it not establish?