RT Journal Article SR Electronic T1 Lagrange-NG: The next generation of Lagrange JF bioRxiv FD Cold Spring Harbor Laboratory SP 2022.04.19.488734 DO 10.1101/2022.04.19.488734 A1 Ben Bettisworth A1 Stephen A. Smith A1 Alexandros Stamatakis YR 2022 UL http://biorxiv.org/content/early/2022/04/20/2022.04.19.488734.abstract AB Computing ancestral ranges via the Dispersion Extinction and Cladogensis (DEC) model of biogeography is characterized by an exponential number of states relative to the number of regions considered. This is because the DEC model requires computing a large matrix exponential, which typically accounts for up to 80% of overall runtime. Therefore, the kinds of biogeographical analyses that can be conducted under the DEC model are limited by the number of regions under consideration. In this work, we present a completely redesigned efficient version of the popular tool Lagrange which is up to 2.5 times faster, which we call Lagrange-NG (Next Generation). We further reduce time-to-completion by introducing a multi-grained parallelization approach, achieving a total parallel speedup of 8.5 over Lagrange on a machine with 8 cores. In order to validate the correctness of Lagrange-NG, we also introduce a novel metric on range distributions for trees in order to assess the difference between any two range inferences. Finally, Lagrange-NG exhibits substantially higher adherence to coding quality standards. It improves a respective software quality indicator as implemented in the SoftWipe tool from average (5.5; Lagrange) to high (7.8; Lagrange-NG). Lagrange-NG is freely available under GPL2.Competing Interest StatementThe authors have declared no competing interest.