← Back to all sparks
P

pedtools

ANALYTICS
Velocity0.0

Creating and Working with Pedigrees and Marker Data

pedtools rewrote loop breaking and made a class of pedigrees analyzable for the first time.

pedigree analysisforensic geneticsalgorithmsloop breakingr packages
Current state
pedtools is the foundation of the ped suite, holding the pedigree data structures every other package builds on. Version 2.11.0 revamped the loop breaking algorithm so founders can serve as loop breakers and one individual can break several loops, which makes likelihood calculations possible in pedigrees that previously could not be handled at all. Loop detection also became mandatory and faster, and the surrounding releases have steadily added query and construction helpers.
Where it's heading
The package has been working toward this for over a year. Version 2.8.0 replaced the igraph-based loop breaker with a custom implementation, 2.8.1 made findLoopBreakers() substantially faster in large pedigrees, and 2.11.0 rewrote the algorithm outright. The new methods ship disabled by default while downstream packages catch up, which is a deliberately staged rollout rather than a flag day. Alongside that, the additive work is small, well-scoped helpers: children2(), addSibling(), isHomozygous(), trim(), nChildren().
Prediction
Expect the new loop breaking methods to become the default once pedprobr, forrel, and dvir have all shipped support for them, since the only stated reason for the opt-in flag is downstream readiness.

Recent moves

  1. 1mo ago

    Loop breaking rewrite makes intractable pedigrees analyzable

    ⚡ SPARK

    The release the rest of the suite is now organizing around: founders can act as loop breakers, one individual can break multiple loops, and the algorithm is faster in large pedigrees. Loop detection also becomes unconditional, with detectLoops deprecated and the slow optional check replaced by one that scales. The new methods are opt-in until downstream packages support them.

    View source ↗
  2. 6mo ago

    Genotype comparison helpers and more flexible subsetting

    A batch of query functions lands: isHomozygous(), sameGenotype(), expectedHomozygosity(), expectedHeterozygosity(), and addSibling(). subset() gains disconnected output and a missingParents argument, which in turn makes branch() behave more predictably.

    View source ↗
  3. 9mo ago

    mergePed() handles marker data; genotype removal simplified

    mergePed() can merge pedigrees carrying marker data, removeGenotypes() replaces an unintuitive setAlleles() idiom, and extractSingletons() is added. Incremental additions to the manipulation vocabulary rather than changes to the data model.

    View source ↗
  4. 1y ago

    setSNPs() accepts genotypes; proband arrows in plots

    setSNPs() can attach genotype columns rather than only empty SNPs, and the plotting layer gains proband arrows and an attempt at straight connectors. Chromosome lengths are synced with ibdsim2, one of the recurring cross-package alignments in this suite.

    View source ↗
  5. 1y ago

    trim() prunes uninformative leaves; loop breaker search sped up

    trim() iteratively removes uninformative pedigree leaves and nChildren() is added, but the more consequential line is findLoopBreakers() becoming significantly faster in large pedigrees. That optimization is the midpoint of the arc between dropping igraph in 2.8.0 and the full rewrite in 2.11.0.

    View source ↗
  6. 1y ago

    igraph dependency dropped for a custom loop breaker

    The igraph dependency is removed in favor of a custom loop breaker implementation that is slightly faster but may choose different loop breakers. Owning this algorithm outright is what made the 2.11.0 rewrite possible. The release also adds niblings(), piblings(), harmoniseMarkers(), and a miscarriage plot symbol.

    View source ↗