Tutorials › High-Dimensional Genomic Data Analysis › X-Chromosome Dosage for Sex Checks

Variant-Level and Sample-Level Quality Control · Tutorial 32 of 795

X-Chromosome Dosage for Sex Checks

Use X-chromosome heterozygosity and dosage patterns to screen for discordance between genetic patterns and recorded sex, while accounting for ploidy encoding.

Intermediate 11 min read

What You'll Learn

  • Identify why pseudoautosomal regions must be separated from non-pseudoautosomal X markers for this check.
  • Calculate a sample’s X-chromosome heterozygosity rate and an expected-heterozygosity-based \(F_X\) statistic.
  • Explain how haploid and diploid genotype encodings affect the statistic.
  • Check whether marker quality, allele frequencies, and missingness make an X-based result interpretable.
  • Use reference patterns to flag a possible mismatch without treating the flag as a definitive determination.

Why X-Chromosome Patterns Can Support a Sex Check

A genotype file records alleles, but the same chromosome can be represented with different ploidy conventions for different samples. On the non-pseudoautosomal part of chromosome X, an individual with two X copies can have heterozygous genotypes at variable sites. An individual with one X copy cannot have a true heterozygous genotype there. Across many well-measured markers, this difference can support a check of whether the X-chromosome pattern agrees with the sex category recorded in the sample metadata.

This is a screening check, not a determination of identity or a complete description of an individual’s chromosomes. The recorded field must be interpreted according to its data dictionary. Here, “XX-like” and “XY-like” refer only to the expected pattern under those chromosome complements, not to a person’s gender or identity. An unexpected result should be treated as a flag for further review rather than as a conclusion about why the discrepancy occurred.

Definition: For an X-chromosome sex check, non-pseudoautosomal X markers are markers outside the pseudoautosomal regions, where X and Y chromosomes can pair and where a one-X-copy sample may have a diploid pattern. X heterozygosity is the presence of two different alleles at a diploid X marker. On non-pseudoautosomal X, the expected pattern is appreciable heterozygosity across informative markers for two-copy samples and little or none for one-copy samples.

The region restriction matters. Including pseudoautosomal markers can make a one-X-copy sample appear to have ordinary diploid genotypes at those sites, weakening the contrast the check relies on. Use a well-defined non-pseudoautosomal marker set and verify that the genome build and region annotations match the data.

Two Summaries of the X Pattern

A direct summary is the sample’s observed heterozygosity rate: the number of called heterozygous genotypes divided by the number of eligible, called markers. It is easy to interpret, but depends on which markers were selected. A second summary compares observed heterozygosity with the amount expected from allele frequencies in a two-copy reference group.

Definition: At marker \(j\), let \(p_j\) be the frequency of one allele in an appropriate two-copy reference group. Under diploid Hardy–Weinberg proportions, the expected heterozygote probability is \(2p_j(1-p_j)\). For a sample with observed heterozygote count \(O\) across eligible called markers, define $$ F_X = 1-\frac{O}{E}, \qquad E=\sum_{j \in C}2p_j(1-p_j), $$ where \(C\) is the set of eligible called markers. When \(E>0\), \(F_X\) near zero indicates observed heterozygosity near expectation, while a value near one indicates very little observed heterozygosity relative to expectation.

The allele frequencies should come from an appropriate two-copy reference set, commonly samples with an XX-like pattern, rather than being estimated indiscriminately from a mixture of one-copy and two-copy samples. The calculation assumes reliable diploid genotypes at the included markers, a suitable reference for \(p_j\), and enough informative loci that \(E\) is not close to zero. Frequencies near zero or one contribute little expected heterozygosity; markers with no variation add no useful information.

The statistic is related to the heterozygosity-based inbreeding summary introduced in earlier material, but its purpose here is different: the X-chromosome pattern is used to screen for ploidy-related groups. A negative \(F_X\) is possible when observed heterozygosity exceeds the reference expectation; it is not automatically an error. Neither \(F_X\) nor a raw heterozygosity rate has a universal cutoff that applies to every dataset.

Worked Calculations

Worked Example: Calculating \(F_X\) for a Two-Copy Pattern

Suppose a hypothetical sample has called diploid genotypes at eight non-pseudoautosomal X markers. For these markers, the reference allele frequencies are \(0.20, 0.50, 0.30, 0.40, 0.25, 0.35, 0.45,\) and \(0.15\). The sample is heterozygous at three of the eight markers. Calculate \(F_X\).

At each marker, calculate the expected heterozygote probability as \(2p_j(1-p_j)\). The eight contributions are \(0.32, 0.50, 0.42, 0.48, 0.375, 0.455, 0.495,\) and \(0.255\). Thus $$ E=0.32+0.50+0.42+0.48+0.375+0.455+0.495+0.255=3.30. $$

The observed count is \(O=3\), so $$ F_X=1-\frac{3}{3.30}=0.0909. $$

The sample has three heterozygous calls out of eight eligible calls, for a raw rate of \(3/8=0.375\), or 37.5%. Its \(F_X\) is close to zero relative to this reference expectation, consistent with a two-copy-like pattern in this small hypothetical example. Eight markers are far too few to make a robust operational decision; the calculation illustrates the statistic, not a recommended marker count or threshold.

Worked Example: How Haploid Encoding Changes the Calculation

Consider a hypothetical sample with one X copy and calls at the same eight non-pseudoautosomal markers. A genotype file may store each call as a single allele, such as \(0\) or \(1\). Another software convention may represent the same haploid allele as a diploid homozygote, \(0/0\) or \(1/1\). Under either convention, there are no true heterozygous calls at these markers.

If the eight calls are all present, the expected count from the reference frequencies remains \(E=3.30\). With \(O=0\), $$ F_X=1-\frac{0}{3.30}=1.000. $$

The raw heterozygosity rate is \(0/8=0\). These summaries show a one-copy-like pattern under the stated conventions. The key is not to mistake the file’s representation for biological ploidy: a haploid call written as \(0/0\) is not evidence of a diploid sample, and a single-allele call should not be parsed as missing merely because it lacks a second allele. The software’s handling of haploid genotypes must be checked before calculating either summary.

Worked Example: Comparing Patterns With a Recorded Field

In a hypothetical dataset, a QC team has established, using a large set of clean samples processed with the same pipeline, that two-copy reference samples usually have \(F_X\) between \(-0.20\) and \(0.25\), while one-copy reference samples usually have \(F_X\) between \(0.85\) and \(1.00\). These are dataset-specific reference ranges, not universal thresholds. Three samples have \(F_X\) values of \(0.12\), \(0.96\), and \(0.58\), respectively. Their recorded categories are expected, under the data dictionary, to correspond to two-copy, two-copy, and one-copy patterns.

The first sample’s value, \(0.12\), lies in the two-copy reference range and agrees with its recorded category. The second sample’s value, \(0.96\), lies in the one-copy range and does not agree with the expected two-copy pattern. It should be flagged for review, not automatically relabelled. The third sample’s value, \(0.58\), lies between the reference ranges. It is not well classified by these ranges and should be treated as indeterminate for this screen.

This comparison depends on valid reference ranges, a consistent genotype pipeline, and adequate marker quality. The observed result alone does not identify the cause of a mismatch or establish which recorded value should change.

Deriving the Expected Heterozygosity

The expected-heterozygosity component follows directly from diploid allele sampling. If the two alleles at a marker are sampled independently from a population with allele frequencies \(p\) and \(1-p\), a heterozygote occurs in either of two orders: first allele of type one and second of type two, or vice versa. Each order has probability \(p(1-p)\). Therefore,

$$ P(\text{heterozygote})=p(1-p)+(1-p)p=2p(1-p). $$

Summing these probabilities across markers gives the expected number \(E\) of heterozygous calls for a two-copy sample under the reference frequencies. If the sample has \(O\) observed heterozygous calls, then \(O/E\) compares observed with expected heterozygosity. Subtracting that ratio from one gives \(F_X=1-O/E\): when \(O=E\), \(F_X=0\); when \(O=0\) and \(E>0\), \(F_X=1\). This is a per-sample summary, not a hypothesis test or a probability that a sample belongs to a category.

Assumptions, Diagnostics, and Alternatives

Before interpreting a result, verify the analysis set and the call representation. Include non-pseudoautosomal markers with reliable genotype calls, and exclude or investigate markers with poor quality, ambiguous location, or very low expected heterozygosity. Assess missingness as well: a sample with few called markers may have an unstable summary, and comparing samples with very different marker sets can be misleading. If a marker is missing for a sample, omit it from both that sample’s observed count and its expected sum.

Look at the distribution of heterozygosity or \(F_X\) across samples, not just one value. Clear clusters can support a screening interpretation; a broad or overlapping distribution may indicate that the marker set, reference frequencies, or genotype processing is inadequate for a sharp separation. Unexpected heterozygous calls in samples otherwise showing a one-copy-like pattern warrant checking ploidy coding and genotype quality. A high missingness rate, few informative markers, or inconsistent results across marker subsets are reasons to withhold a confident flag.

The raw heterozygosity rate is transparent and does not require allele-frequency estimates, but it can change substantially with marker selection and allele-frequency spectrum. \(F_X\) adjusts for the expected heterozygosity of the selected markers, but depends on a suitable reference set and can be unstable when \(E\) is small. Both use genotype calls and can be affected by genotyping errors or an incorrect ploidy convention. Comparing per-sample summaries with reference distributions is usually more informative than applying a fixed universal cutoff. These checks do not replace review of sample metadata or other QC evidence.

Common pitfall: “The file stores a one-X-copy genotype as \(0/0\), so I will count it as an ordinary diploid homozygote and interpret the sample as having two X copies.” The correction is to establish the ploidy convention first. A homozygous diploid encoding may be a software representation of a haploid call; it does not by itself establish the biological copy number.

The X-based screen is useful because it can identify samples whose non-pseudoautosomal genotype pattern differs from the pattern expected for their recorded category. Its limitations are just as important: marker quality and processing affect the signal, reference ranges are dataset-dependent, and intermediate patterns do not have a unique interpretation. Record a discordance as a QC flag for follow-up rather than treating this statistic as a final classification.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. Why should pseudoautosomal X markers generally be excluded from this heterozygosity-based check?
  2. At a marker with reference allele frequency \(p=0.25\), what is the expected heterozygote probability under the diploid model?
  3. A sample has \(O=2\) observed heterozygous calls and \(E=2.5\). Calculate \(F_X\) and interpret its direction.
  4. Why must haploid genotype encoding be checked before interpreting a sample with no observed X heterozygotes?
  5. A sample’s statistic falls between the dataset’s two reference ranges. What is the appropriate QC interpretation?

Solutions. (1) Pseudoautosomal regions can have a diploid pattern even in a one-X-copy sample, reducing the contrast in non-pseudoautosomal X. (2) \(2(0.25)(0.75)=0.375\), or 37.5%. (3) \(F_X=1-2/2.5=0.20\), indicating observed heterozygosity below expectation but not, by itself, a classification. (4) Some software represents a haploid allele as a diploid homozygote; the absence of heterozygotes must be interpreted in light of the actual encoding and marker quality. (5) Treat the result as indeterminate under those reference ranges and flag it for review rather than forcing it into either group.

Clinical Biostats