Abstract
While genetic relatedness, usually manifested as segments identical by descent (IBD), is ubiquitous in modern large biobanks, current IBD detection methods are not efficient at such a scale. Here, we describe an efficient method, RaPID, for detecting IBD segments in a panel with phased haplotypes. RaPID achieves a time and space complexity linear to the input size and the number of reported IBDs. With simulation, we showed that RaPID is orders of magnitude faster than existing methods while offering competitive power and accuracy. In UK Biobank, RaPID identified 3,335,807 IBDs with a length ≥ 10 cM among 223,507 male X chromosomes in 11 min.</p>