Sex Chromosome Handling
Sex Chromosome Handling
Why a Default Pipeline Encodes a Karyotype Nobody Chose
A human reference genome is a haploid representation of a diploid organism — one copy of each of the 22 autosomes, and then both X and Y. That last part is a compromise, and it is the origin of nearly everything that goes wrong on the sex chromosomes. As the point has been put in the literature, the reference is an n = 24 representation of an n = 23 genome1.
Two consequences follow immediately. Not every sample has a Y, so mapping reads to one is wrong for a large fraction of any cohort. And X and Y retain regions of 98–100% sequence identity from their shared ancestry as an autosome pair1, so where both are present in the index, reads from those regions have two equally good places to go.
Every pipeline resolves this. Almost none of them record how. The reference build, the ploidy passed to the caller, and the filter thresholds are three separate decisions, each with a default that was set by someone else for a different purpose, and none of which appears in the VCF.
Where the problem actually lives
The X and Y still recombine at their tips — the pseudoautosomal regions, PAR1 and PAR2 — and share a third block, the X-transposed region, at about 98.78% identity2. Together these amount to roughly 5% of the X chromosome. The rest of it is as distinct from the Y as any autosome is from any other.
That containment is what makes this problem tractable, and it is also what makes it invisible. Comparing a default reference against one matched to the sample’s sex chromosome complement across 49 GTEx samples annotated as female, one group found chromosome 8 essentially unchanged: 719,826 variants versus 719,824. On the X, total variants rose from 475,763 to 498,297, a 4.74% increase1.
Break that increase down by region and the picture sharpens considerably. Across the non-PAR, non-XTR bulk of the X — about 95% of the chromosome — the change was 0.01%. In the XTR it was +10.98%. In the PARs it was +730%, from 2,790 variants to 23,1611. Restricting to genic regions only, the PARs gained 564%1.
The PARs are about 1.77% of the X chromosome and, under the correct reference, carry roughly 5% of its variants. Under the default reference they carry 0.59%1. Nearly nine in ten variants that belong there simply do not appear.
What the reference decision does mechanically
The failure is not exotic. When an XX sample is aligned to a reference containing a Y chromosome, reads from PAR1 have two near-identical destinations. The aligner reports the ambiguity honestly, by assigning mapping quality zero. The variant caller then discards those reads, because MQ0 reads are correctly regarded as unreliable. Nothing malfunctions at any step, and the region goes quiet.
Masking the Y in XX samples removes the competing copy, mapping quality recovers, and the variants appear. Across the same 49 samples, the sex-chromosome-complement reference reduced MQ0 reads in every individual, by an average of about 605,000 reads1. In XY samples the analogous fix is masking the Y PARs, so PAR reads land unambiguously on the X copy — which is why several reference distributions already ship that way.
A simulation study with a known truth set confirms the direction and adds the XY case: sex-chromosome-complement alignment recovered an average of 4,909 additional true positives in the PARs in XX samples and 4,980 in XY samples, plus 748 in the XTR in XX samples3.
One result from that study is worth dwelling on, because it cuts against the obvious extension of the idea. Since the XTR is nearly identical between X and Y, masking the Y copy in XY samples ought to force those reads onto the X and improve calling there. It does the opposite: masking the Y-linked XTR produced a ten-fold higher rate of false positives in the XTR, an average of 33,344 additional false positives per sample3. The authors expected an improvement, reported the reverse, and recommend against the approach3. Masking is not a general-purpose fix; it works where one copy genuinely is absent and misfires where both copies are real but similar.
Ploidy: calling a heterozygote where only one copy exists
Outside the PARs, an XY sample has one X and one Y. A diploid caller does not know this, and will happily emit heterozygous genotypes at positions where two alleles cannot coexist.
In simulation, haploid calling on X and Y non-PARs in XY samples reduced false positives from an average of 236 to 17 on the X, and from 109 to 3 on the Y3. Expressed as a proportion of simulated variants, diploid calling on the Y gave 0.0378 — against an autosomal range of 0.0007 to 0.0028. Under haploid calling the Y fell to 0.0010, back inside the autosomal band3. An order-of-magnitude excess of false positives, produced entirely by a ploidy parameter.
What haploid calling does not fix is equally worth knowing: false negatives were essentially unchanged, 4,961 versus 4,973 on the X and 886 versus 893 on the Y3. Ploidy governs which genotypes are expressible, not which sites are visible. If your problem is that variants are missing, ploidy is the wrong lever — that is a reference and mappability problem.
Filters: a haploid chromosome fails a diploid test
This is the layer most often overlooked, and its effects are the largest in the study that measured them. Depth and allele number on a haploid chromosome are about half their autosomal values by construction. Apply an autosomally calibrated depth filter and you are asking a single-copy chromosome to clear a two-copy bar.
With a diploid-based depth threshold, XY samples retained an average of 16,082 true positives on X non-PARs and 685 on Y non-PARs. With a haploid-based threshold, the same data retained 58,662 and 1,9443. The allele-number filter is starker still: a haploid-based threshold of 10 retained 67,042 and 2,333 true positives, while the corresponding diploid threshold of 20 left none at all on either chromosome3.
Zero. Not a degraded call set — an empty one, produced by a filter that is entirely correct for the other 22 chromosomes.
| Decision | Default behaviour | Sex-aware behaviour | Effect |
|---|---|---|---|
| Reference build | 2,790 PAR variants | 23,161 PAR variants | +730% in PARs; +0.01% elsewhere on X1 |
| Ploidy, X non-PAR | 236 false positives | 17 false positives | False negatives unchanged3 |
| Ploidy, Y non-PAR | 109 false positives | 3 false positives | Y returns to the autosomal FP range3 |
| Depth filter, X non-PAR | 16,082 true positives | 58,662 true positives | Diploid threshold discards real calls3 |
| Allele-number filter | 0 true positives | 67,042 / 2,333 | AN 20 vs AN 10 on X / Y non-PARs3 |
Reference-build figures are from 49 GTEx samples annotated as female against T2T-CHM13; the remainder are from a simulation of 60 XX and 60 XY samples at 20× coverage with a known truth set. Simulated data flatter every method somewhat, since real reads carry error and structural variation that simulators approximate. The rank ordering, not the absolute counts, is what carries over.
The reference distributions disagree with each other
None of this would matter much if the community shipped one correct file. It does not. Ensembl’s human reference masks the PARs on the Y — appropriate for XY samples, but leaving the whole Y unmasked for samples that have no Y. The GENCODE reference contains full X and Y sequences. T2T-CHM13 originally contained no Y at all; the current deposited version adds one from a different individual3.
So “we aligned to GRCh38” does not specify what was in the index. Two laboratories can write the same methods sentence, use files that differ in Y masking, and produce PAR call sets that differ by hundreds of percent. Tools exist to generate complement-matched references — XYalign, or plain bedtools maskfasta34 — but the correct file is something each group has to construct rather than download. The underlying issue is one of assembly convention rather than of any one pipeline: how sex chromosomes should be represented in genome assemblies is an open question the field has addressed directly8, and it is not settled in the files most people pull down.
The cost of avoiding the problem
The usual response to all this is to drop the sex chromosomes. It is worth pricing that decision honestly, and one paper does the arithmetic directly.
The X is about 5% of the genome and carries a comparable share of the annotated genes, so excluding it introduces a 5% error rate by construction. Including it with a default reference introduces mapping errors across roughly 5% of the X — the PARs and XTR — which the authors calculate as making about 0.25% of called variants unreliable. Their conclusion: deliberately accepting a 5% error to avoid a 0.25% one is excessive, and, they add pointedly, it precludes calling most human association studies “genome-wide”1.
The X is not an arbitrary 5%. It carries more immune-response genes than any other chromosome1, and sex differences are substantial across cancer, cardiovascular disease, immune function and Alzheimer’s disease3. In the simulation study, sex-aware processing recovered variants in 45 X-linked genes with reported associations in cardiomyopathy, immunodeficiency and Alzheimer’s disease3.
And the exclusion is not a historical curiosity that has since been fixed. A 2013 commentary called for integrating the X into genome-wide association analyses; a follow-up a decade later, pointedly titled to ask where the sex chromosomes had got to, found the situation largely unchanged6. Analytic best-practice guidance for testing genetic models of sex differences in large cohorts now exists7 — which is a good reason to check whether your pipeline follows it, since defaults predate guidance and rarely get revisited.
Downstream: expression and allele-specific expression
The same reference decision propagates into RNA-seq, where the complement-matched approach was originally shown to improve the ability to detect sex differences in gene expression5. Expression differences between default and complement-matched references concentrate in PAR1, then PAR21. Allele-specific expression suffers twice over — once through the variant calls that define the sites to test, and again through RNA-seq read mapping — and correcting only one of the two recovers only part of the loss1. Allele balance ratios were inflated under the default reference, with values above 0.9 rounding up to 1.01: a monoallelic-expression call manufactured by an alignment choice.
What to do about it
- Determine sex chromosome complement from the data, not the metadata. X and Y coverage ratios answer this directly. Recorded sex is a clinical annotation, sometimes wrong and sometimes absent, and karyotypes other than XX and XY exist — treat it as a hypothesis the coverage confirms.
- Align to a reference matched to that complement. Hard-mask the whole Y for samples without one; mask the Y PARs for samples with one. Both are one
maskfastacommand34. - Do not extend masking to the XTR. It is the intuitive next step and it made false positives ten times worse3.
- Set ploidy per region, not per sample. Diploid in the PARs, haploid in X and Y non-PARs for XY samples. Joint genotyping tools handle mixed ploidy, so a cohort can still be called together3.
- Recalibrate depth and allele-number filters for haploid regions. This is the single largest effect measured, and the one most likely to be silently inherited from an autosomal template.
- Record the reference file, the masking applied, the ploidy map and the thresholds. “Aligned to GRCh38” does not distinguish between builds that produce PAR call sets differing several-fold.
- Never compare sex chromosome calls across samples processed with different complements. If XX samples were masked and XY samples were not, sex is confounded with pipeline — and the affected regions are the same ones in every sample, so the artefact will not average out.
- Report X and Y results by region. PAR, XTR, and non-PAR behave differently enough that a single chromosome-level summary hides the part that moved.
- State when the sex chromosomes were excluded, rather than reporting a genome-wide result computed on 22 chromosomes.
The shape of the error
Most of the failures in this series involve a measurement that is correct and an inference attached to it that is not. This one is a little different: the pipeline is answering a question about a genome it was never told the shape of.
A default reference asserts that every sample has a Y. A default ploidy asserts that every chromosome comes in pairs. A default filter asserts that every position should be covered like an autosome. All three assertions are true of 22 chromosomes and false of the other one or two, and because they are true of the vast majority of the genome, every validation metric a pipeline reports will look fine. The autosomes pass. The benchmark passes. The X quietly loses nine in ten of its PAR variants.
The karyotype is a property of the sample. The reference, the ploidy and the thresholds are properties of the analysis. When nobody writes the first one down, the other three decide it — and the resulting call set describes a person whose genome was assumed rather than observed.
References
- Pinto BJ, O’Connor B, Schatz MC, Zarate S, Wilson MA. Concerning the eXclusion in human genomics: the choice of sex chromosome representation in the human genome drastically affects the number of identified variants. G3 Genes|Genomes|Genetics 2023;13(10):jkad169. academic.oup.com/g3journal/13/10/jkad169
- Veerappa AM, Padakannaya P, Ramachandra NB, as cited for the ~98.78% X–Y sequence identity of the X-transposed region in ref. 3. biorxiv.org — 2025.04.29.651297 (XTR identity, Methods)
- Taravella Oill AM, Plaisier SB, Phung TN, Wilson MA. Best practices for improving alignment and variant calling on human sex chromosomes. American Journal of Human Genetics 2026 (published online March 2026); figures cited here are from the openly available preprint version, bioRxiv 2025.04.29.651297. cell.com/ajhg — S0002-9297(26)00083-2
- Webster TH, Couse M, Grande BM, et al. Identifying, understanding, and correcting technical artifacts on the sex chromosomes in next-generation sequencing data (XYalign). GigaScience 2019;8(7):giz074. pubmed.ncbi.nlm.nih.gov/31289836
- Olney KC, Brotman SM, Andrews JP, Valverde-Vesling VA, Wilson MA. Reference genome and transcriptome informed by the sex chromosome complement of the sample increase ability to detect sex differences in gene expression from RNA-seq data. Biology of Sex Differences 2020;11:42. pubmed.ncbi.nlm.nih.gov/32693839
- Sun L, Wang Z, Lu T, Manolio TA, Paterson AD. eXclusionary: ten years later, where are the sex chromosomes in GWAS? American Journal of Human Genetics 2023;110(6):903–912. pubmed.ncbi.nlm.nih.gov/37267899
- Khramtsova EA, Wilson MA, Martin J, et al. Quality control and analytic best practices for testing genetic models of sex differences in large populations. Cell 2023;186(10):2044–2061. pubmed.ncbi.nlm.nih.gov/37172561
- Carey SB, Lovell JT, Jenkins J, et al. Representing sex chromosomes in genome assemblies. Cell Genomics 2022;2(5):100132. pubmed.ncbi.nlm.nih.gov/35720975

