NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

GRAPE: Genomic Relatedness Detection Pipeline

Aleksandr Medvedev, Mikhail Lebedev, Andrew Ponomarev, Mikhail Kosaretskiy, Dmitriy Osipenko, Alexander Tischenko, Egor Kosaretskiy, Hui Wang, Dmitry Kolobkov, Vitalina Chamberlain-Evans, Ruslan Vakhitov, Pavel NikonorovbioRxiv 2022

TL;DR

This paper introduces GRAPE, a novel open-source, end-to-end pipeline for accurately detecting genomic relatedness. GRAPE addresses the critical need for reliable kinship estimation in both scientific research (like GWAS) and commercial applications (like direct-to-consumer genetic testing), offering a fast, flexible, and production-ready solution.

What Problem Does This Paper Address?

Accurately determining the degree of relatedness between individuals is crucial for various applications. In genomics research, unrecognized population structure can lead to false positives in Genome-Wide Association Studies (GWAS), especially with the rise of large-cohort studies. Similarly, identifying disease-associated loci often relies on precise relationship classification. Commercially, DNA-based ancestry and relationship matching services are booming, driving demand for accurate kinship inference. While methods and tools exist, there's a significant gap in a comprehensive, open-source, end-to-end pipeline that is fast, reliable across various kinship degrees, handles real-world data heterogeneity, and is ready for production deployment. Assembling such a system requires substantial research and development effort.

Methods

GRAPE tackles this challenge by integrating several key components into a unified pipeline. It starts with robust data preprocessing, including quality control (QC) for SNPs (filtering by minor allele frequency and missingness) and samples (checking for unusual heterozygosity). It also handles inconsistencies in strand and SNP IDs. Optionally, it can perform liftOver to standardize genome builds, phasing (crucial for some IBD detection tools), and imputation to fill in missing genotype data.

The core of GRAPE lies in its Identity-by-Descent (IBD) segment detection and relationship estimation workflows. It offers multiple options for IBD detection, including the fast, unphased-data-compatible IBIS and the more precise, phased-data-required GERMLINE. Relationship degrees are then estimated using the ERSA algorithm, with the KING tool optionally used for inferring closer relationships (up to the third degree). GRAPE also incorporates an innovative IBD segments weighing approach, which down-weights IBD segments in regions with high background matching, aiming to reduce false positives.

The pipeline is built with best practices in software development, utilizing Snakemake for workflow management, Conda for environment management, and Docker for containerization, ensuring reproducibility and ease of use. It also adheres to GA4GH standards.

Datasets

GRAPE's development and evaluation utilized several datasets:

  • 1000 Genomes Project: Used for reference data (phasing, imputation) and as a source of unrelated founders for simulations.
  • Allen Ancient DNA Resource (AADR): Used as a sanity check to ensure GRAPE doesn't produce kinship matches between ancient and present-day individuals.
  • Khazar origins dataset: A dataset of 1770 samples from 106 Jewish and non-Jewish populations, used to test GRAPE on data from small, homogeneous populations.
  • Atlas Biomed customer database: A real-world dataset of over 100,000 customers, used to demonstrate GRAPE's ability to handle heterogeneous data from various chips and inconsistencies.
  • Simulated datasets: Generated using the Ped-sim tool with founders from the 1000 Genomes Project (Affymetrix chip data) to create pedigrees up to 14 generations deep. These simulated datasets were crucial for evaluating precision and recall metrics.

Key Insights and Ideas

  • The need for an integrated, end-to-end solution: GRAPE highlights that while individual tools for IBD detection and relationship inference exist, a robust, production-ready pipeline that handles preprocessing, QC, and multiple workflow options is essential for practical application.
  • IBD segment weighing as a novel approach: The paper introduces and evaluates an IBD segment weighing method that aims to improve precision by down-weighting segments in regions prone to false positives, showing promise in improving recall at similar precision levels compared to standard exclusion masks.
  • Trade-offs between speed and precision: GRAPE offers different workflows (e.g., IBIS vs. GERMLINE) that allow users to balance processing speed with accuracy, catering to different needs, from large-scale screening to detailed analysis.
  • Handling real-world data heterogeneity: The pipeline's design explicitly addresses challenges like varying SNP chip data, different reference alignments, and data inconsistencies, making it suitable for commercial genetic testing companies.

Key Results

  • Performance: GRAPE can process 10,000 samples in about half an hour and 100,000 samples in approximately 22 hours using the IBIS + ERSA workflow.
  • Accuracy on simulated data:
    • The IBIS + ERSA & KING workflow achieved over 90% recall for degrees 1-5 and detected all relatives with degrees 1-4 with default conservative parameters. Precision remained above 90% across detected degrees.
  • The GERMLINE + ERSA & KING workflow showed slightly lower recall for 6th-7th degrees but improved recall for higher degrees (≥8), maintaining over 95% precision and no false positives (Recall(-1) = 1).
  • Comparison with TRIBES: GRAPE, particularly with its ERSA-based relationship estimation, demonstrated a more advanced approach compared to TRIBES, which produced a significant number of false positives and lacked crucial preprocessing and evaluation options.
  • Real-world application: GRAPE was successfully applied to a database of over 100,000 customers, demonstrating its ability to handle diverse and inconsistent data.

Limitations and Future Work

  • Computational resources: While efficient, processing very large datasets (100k+ samples) still requires significant computational resources (e.g., 8 CPUs, 32 GB RAM).
  • Phased data requirement for GERMLINE: The GERMLINE workflow necessitates phased input data, which might require an additional phasing step if not already available.
  • Future work: The authors suggest that the IBD segment weighing mask can be further adapted to specific ancestries and tuned for even better performance. They also note that whole-genome sequencing data has the potential to further improve relatedness detection by breaking long IBD segments that can arise from demographic factors.

Summary updated

BibTeX
@misc{medvedev2022grape,
  author = {Aleksandr Medvedev and Mikhail Lebedev and Andrew Ponomarev and Mikhail Kosaretskiy and Dmitriy Osipenko and Alexander Tischenko and Egor Kosaretskiy and Hui Wang and Dmitry Kolobkov and Vitalina Chamberlain-Evans and Ruslan Vakhitov and Pavel Nikonorov},
  title = {{GRAPE: Genomic Relatedness Detection Pipeline}},
  year = {2022},
  doi = {10.1101/2022.03.11.483988},
  howpublished = {bioRxiv},
}
Figure