Why Define a Functional Mask?
A gene-level analysis must specify not only which gene is being studied, but also which variants count as relevant to that gene. A functional mask makes that choice explicit by defining a set of variants using their genomic location, annotated consequence, and, when desired, other functional annotation evidence. The resulting set is an analysis input, not a claim that every included variant alters gene function or that every excluded variant is harmless.
This tutorial focuses on functional inclusion rules. Frequency and call-quality criteria may also be applied when constructing an analysis set, but they are separate choices: keep them fixed while comparing functional masks. A transparent mask lets another analyst determine exactly why each variant was included, and shows how changing the biological definition changes the set.
From Annotation to an Inclusion Rule
A consequence annotation describes a variant’s predicted relationship to a transcript or gene feature. Examples include a protein-truncating consequence, a splice-region consequence, or a missense consequence. The same genomic variant can receive different annotations for different transcripts, so a mask needs a transcript policy as well as a list of consequence categories. Earlier material on functional consequence labels and transcript choice establishes why these labels depend on annotation context; a mask turns those annotations into a reproducible yes-or-no rule.
A useful way to specify the rule is to separate its components. First decide which gene or genes may receive a variant. Next decide which transcript annotations are considered. Then identify the consequence classes that qualify. Finally, state any additional evidence rule, such as requiring a specified prediction label. Each choice changes what the mask means.
Here each term is an indicator equal to 0 or 1: \(G_{gk}(v)\) represents the gene-assignment rule; \(T_{gk}(v)\) the transcript policy; \(C_{gk}(v)\) whether the consequence belongs to the selected categories; and \(A_{gk}(v)\) any additional annotation-evidence rule. If the mask has no extra evidence requirement, set \(A_{gk}(v)=1\). The product is 1 only when every required component is satisfied. More complex rules can use unions, such as including a variant when it has either a qualifying splice consequence or a qualifying missense annotation.
Transcript and Gene-Boundary Choices
A gene may have multiple transcripts with different exon structures and coding sequences. A variant can therefore be protein-altering in one transcript, intronic in another, and outside a third. A mask might use one designated transcript, such as a versioned canonical transcript, or include a variant if it meets the consequence rule in any transcript selected as relevant. These policies answer different questions; neither is universally correct.
The gene-assignment rule also matters. A coding-only mask may assign a variant based on its overlap with a selected transcript’s coding sequence. A broader rule might include selected untranslated, splice-adjacent, or regulatory regions. A variant near a gene boundary may overlap one transcript but not another, while a variant in a shared region may be annotated for multiple genes. The specification should say whether such a variant enters one gene’s set, several sets, or neither. It should also distinguish the genomic coordinates used for the gene from the transcript coordinates used for consequence annotation.
| Mask choice | Example rule | Likely consequence for inclusion |
|---|---|---|
| Transcript policy | Use only a specified transcript, or any selected transcript | A variant with differing transcript consequences may switch from excluded to included |
| Gene boundary | Use coding coordinates only, or add explicitly defined neighboring features | Variants outside coding coordinates may be excluded or included |
| Functional category | Include protein-truncating consequences, or also include missense consequences | A broader category set generally adds variants |
| Annotation evidence | Require a stated prediction criterion for missense variants | Some variants in a consequence class may be further excluded |
Worked Example: Two Transcript Policies
Suppose a hypothetical gene \(G\) has two selected transcripts, \(t_1\) and \(t_2\). For illustration, the functional rule includes protein-truncating and missense consequences. Five hypothetical variants have these annotations:
| Variant | Consequence in \(t_1\) | Consequence in \(t_2\) |
|---|---|---|
| v1 | protein-truncating | intronic |
| v2 | synonymous | missense |
| v3 | intronic | intronic |
| v4 | missense | missense |
| v5 | outside transcript | protein-truncating |
Under the \(t_1\)-only policy, qualifying consequences occur for v1 and v4, so \(M_{G,t_1}=\{v1,v4\}\), with \(|M_{G,t_1}|=2\). Under an “any selected transcript” policy, v1 qualifies through \(t_1\), v2 and v5 qualify through \(t_2\), and v4 qualifies through both. Variant v3 qualifies under neither. Thus \(M_{G,\mathrm{any}}=\{v1,v2,v4,v5\}\), with \(|M_{G,\mathrm{any}}|=4\).
The difference is not a change in the variants’ sequence data; it follows from the transcript policy. The broader policy includes two additional variants, and the reason for each inclusion can be traced to its annotation on \(t_2\).
Functional Categories and Evidence Rules
A mask may target one functional category or combine several. For example, a narrower mask could include only protein-truncating consequences, while a broader mask could include those plus missense consequences. A splice-focused mask could select specified splice consequences, either alone or alongside other categories. Category labels must be defined using a stated annotation source and version; similar labels from different annotation systems need not be interchangeable without checking their definitions.
Annotation evidence can further refine a category. For example, a mask may include all qualifying protein-truncating variants but include a missense variant only if at least two of three named prediction tools classify it as damaging. The rule should identify the tools, required output, handling of missing predictions, and the relevant software or database versions. Such a criterion makes the decision reproducible, but it does not turn predictions into certain evidence of effect. The uncertainty of in silico predictions remains relevant when interpreting the resulting set.
Worked Example: Narrow and Broad Consequence Categories
Consider six hypothetical variants already assigned to a gene under one fixed transcript and boundary policy. Their annotations are: v1 protein-truncating, v2 missense, v3 synonymous, v4 splice-region, v5 missense, and v6 intronic. For this example, a narrow mask includes only protein-truncating consequences; a broad mask includes protein-truncating, missense, and splice-region consequences.
The narrow rule gives \(M_{\mathrm{narrow}}=\{v1\}\), so \(|M_{\mathrm{narrow}}|=1\). The broad rule gives \(M_{\mathrm{broad}}=\{v1,v2,v4,v5\}\), so \(|M_{\mathrm{broad}}|=4\). Variants v3 and v6 remain excluded because their consequences are not in either rule’s category list.
Because the narrow categories are a subset of the broad categories and the other rules are fixed, \(M_{\mathrm{narrow}}\subseteq M_{\mathrm{broad}}\). The broader mask therefore has three more variants in this hypothetical set. This count describes inclusion only; it does not establish that the additional variants affect the phenotype.
Worked Example: Applying an Annotation-Evidence Requirement
Suppose four hypothetical missense variants, v1 through v4, meet the same gene, transcript, and boundary rules. A mask requires a damaging classification from at least two of three named prediction tools. Their hypothetical damaging-call counts are 3, 2, 1, and 0, respectively. Assume the rule excludes variants with missing tool results; none are missing here.
For each variant, compare the count with the required minimum of 2. Variant v1 has \(3\geq2\) damaging calls and is included. Variant v2 has \(2\geq2\) and is included. Variant v3 has \(1<2\) and is excluded; v4 has \(0<2\) and is excluded. Thus the missense subset of the mask is \(M=\{v1,v2\}\), with \(|M|=2\).
If the evidence requirement were removed while all other rules remained fixed, the missense subset would contain all four variants. The comparison isolates the effect of the prediction rule. It does not mean v3 and v4 are known to be benign; it means only that they do not satisfy this particular prespecified inclusion criterion.
A Simple Set-Inclusion Justification
Comparing masks can clarify which choices are responsible for changes in the analysis set. Suppose two masks use the same gene assignment, transcript policy, and evidence rule, but one includes consequence categories \(C_1\) and the other includes categories \(C_2\), where \(C_1\subseteq C_2\). If a variant qualifies under the first mask, its consequence is in \(C_1\), and therefore also in \(C_2\). All other requirements are unchanged, so it qualifies under the second mask as well.
This result depends on holding the other rules fixed. If the broader category rule also changes transcript selection or imposes a stricter prediction requirement, set inclusion need not follow. For example, adding missense consequences while switching from an any-transcript policy to a single-transcript policy can remove variants as well as add them. To understand a difference, change one rule at a time where possible, or report the complete specifications being compared.
Documenting and Auditing a Mask
A mask is reproducible only if its implementation choices are sufficiently precise. Record the reference genome build, gene identifier and coordinates, transcript identifiers and versions, annotation software and database versions, consequence categories, gene-boundary rule, and any evidence rule. State how multigene variants are handled, how missing annotations are treated, and whether inclusion is based on one transcript or any selected transcript. Preserve the resulting variant list or a reproducible rule for regenerating it.
An audit table can make the decisions easy to inspect. For each candidate variant, it can record the gene assignment, transcript-level consequence, selected category, evidence result, and final inclusion indicator. This separates the underlying annotation from the rule applied to it. If two analysts obtain different masks, those fields help locate whether the disagreement arose from transcript choice, coordinates, consequence mapping, or evidence handling.
Common Mistakes and Why Masks Matter
- Treating “most severe” as self-explanatory. A severity ordering does not state which transcripts are considered or which categories qualify. Specify the transcript set and category rule.
- Assuming a variant belongs to exactly one gene. Overlapping genes and shared genomic regions can lead to a variant being assigned to multiple genes. State the assignment policy rather than silently forcing one label.
- Calling a prediction a confirmed functional effect. Prediction-based inclusion is a rule based on annotation evidence, not experimental confirmation. Describe it accordingly.
- Changing several mask components at once. A change in the variant set then cannot be attributed to one choice. Compare one component at a time when the goal is to understand its effect.
- Leaving versions or boundaries unspecified. Annotation outputs can differ across transcript sets, reference builds, or software versions. Record them so the mask can be reconstructed.
Functional masks matter because they define the variants that a later gene-level analysis will summarize or test. A narrow mask may be easier to interpret but omit variants under a broader functional definition; a broad mask can include more variants whose evidence is less direct. The mask is therefore part of the scientific question, not just a clerical preprocessing step. Its choices should be stated before interpreting an association result.
Check Your Understanding
Answer each question by referring to the mask rule, not by assuming that an annotation label guarantees a biological effect.
- Why can the same variant be included under an any-selected-transcript mask but excluded under a single-transcript mask?
- A mask’s consequence categories are expanded while transcript and evidence rules are held fixed. What relationship should hold between the old and new variant sets?
- What information should be recorded when a mask uses a prediction requirement for missense variants?
- How should a mask specification address a variant annotated for two overlapping genes?
- Why does inclusion in a functional mask not establish that a variant is causal for a phenotype?