Related Experiment Video
Updated: Feb 15, 2026

A Fast and Quantitative Method for Post-translational Modification and Variant Enabled Mapping of Peptides to Genomes
Published on: May 22, 2018
PyMSQ: a Python package for fast Mendelian sampling (co)variance and haplotype-based similarity in genomic selection
Abdulraheem Arome Musa1, Norbert Reinsch2
1Research Institute for Farm Animal Biology (FBN), Wilhelm-Stahl-Allee 2, 18196, Dummerstorf, Germany.
Background:
While genomic selection boosts rapid genetic gains by leveraging dense marker data for genomic estimated breeding values (GEBVs), prolonged application can reduce haplotype diversity and increase inbreeding. To address these risks, recent studies indicate that selecting on Mendelian sampling variance (MSV) and covariance (MSC) can partly mitigate the loss of genetic variation by exploiting within-family (co)segregation not captured by GEBVs alone. In parallel, theoretical advances have introduced a haplotype-based similarity measure that targets shared heterozygous segments, enabling more direct control over haplotype diversity, either standalone or in combination with conventional coancestry-based and genomic relationship matrices.
Results:
We present PyMSQ, an open-source Python package for estimating Mendelian sampling-related quantities that implements two key developments: (1) a matrix-based approach for computing MSV and MSC in single-trait, multi-trait, and zygotic contexts, and (2) a haplotype-based similarity matrix between parental Mendelian sampling terms. By combining this matrix-based framework with optimized scientific libraries, PyMSQ achieves up to 332-fold faster computations than gamevar, a publicly available alternative, while preserving numerical accuracy. Using a Holstein-Friesian dataset, we demonstrate PyMSQ's effectiveness in deriving MSV and MSC, as well as its novel similarity measure, which complements standard genomic relationship matrices by explicitly quantifying shared heterozygous segments rather than overall allele sharing, thereby providing additional insights for balancing immediate gains with long-term diversity.
Conclusion:
By facilitating the practical use of MSV, MSC, and a haplotype-based similarity metric, PyMSQ enables breeders and quantitative geneticists to adopt haplotype diversity constraints, whether as a standalone criterion or in synergy with optimal contribution selection. This framework opens new possibilities for preserving key haplotypic segments, ultimately supporting more sustainable genomic selection strategies. PyMSQ is freely available under an MIT License at https://github.com/aromemusa/PyMSQ .
Related Concept Videos
Variance
The standard deviation measures the spread in the same units as the data....
DNA Packaging
Causes of Similarity-Dissimilarity Effect
Chromatin Packaging
Chromatin Packaging
The chromatin
In combination with specialized DNA binding protein called Histones, the DNA double helix forms a compact DNA: protein complex called chromatin. The chromatin itself is further compacted into higher-order...
Chromatin Packaging

