Skip to content

pedbuildr

0.4.0Package record

Pedigree Reconstruction

1packages depend
3.3Kdownloads / year
49.1%test coverage
10/13flavors OK

Overview

About

Reconstruct pedigrees from genotype data, by optimising the likelihood over all possible pedigrees subject to given restrictions. Tailor-made plots facilitate evaluation of the output. This package is part of the 'pedsuite' ecosystem for pedigree analysis. In particular, it imports 'pedprobr' for calculating pedigree likelihoods and 'forrel' for estimating pairwise relatedness.

Changes in 0.4.0
  • **pedbuildr** now uses **mirai** for parallel likelihood computations in reconstruct(), giving substantial speedups in many cases. Users can enable parallelisation by starting workers with mirai::daemons() before calling reconstruct(). See ?reconstruct for details.
  • The numCores argument has been deprecated, as parallelisation is now controlled through the mirai framework.
  • More robust likelihood calculations. In particular, due to improved loop breaking in **pedtools** and **pedprobr**, many complex looped pedigrees that previously failed are now handled correctly.
  • buildPeds() is significantly faster than before in the default case with linearInb = 0, i.e., when mating between lineally related individuals is disallowed.

From NEWS.md in the release

Install

Health

CRAN checks
3ERROR10OK
Check messages
ERRORexamplesr-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64

r-oldrel-macos-arm64

Running examples in ‘pedbuildr-Ex.R’ failed
The error most likely occurred in:

> ### Name: buildPeds
> ### Title: Build a list of pedigrees
> ### Aliases: buildPeds
> 
> ### ** Examples
> 
> # Two individuals + 1 extra
> plist = buildPeds(1:2, extra = 1, age = "1>2")
Pedigree parameters:
  ID labels: 1, 2
  Sex: 1, 1
  Extra: 1
  Age info: 1>2
  Known PO: -
  Known non-PO: -
  No children: -
  Connected only: TRUE
  Symmetry filter: TRUE
  Max inbreeding: 0.0625
  Linear inbreeding: FALSE

Building pedigree list:
  All 2 + 0 extra: 1 solutions | 2 candidates (0.00019 secs)
  All 2 + 1 extra: 2 solutions | 2 candidates | 2 duplicates removed (0.00069 secs)
  Total solutions: 3 
  Converting to ped
  Excessive inbreeding: 0 
  Time used: 0.00222 secs 
> plot(plist)
> 
> # Allow disconnected
> plist2 = buildPeds(1:2, extra = 1, age = "1>2", connected = FALSE)
Pedigree parameters:
  ID labels: 1, 2
  Sex: 1, 1
  Extra: 1
  Age info: 1>2
  Known PO: -
  Known non-PO: -
  No children: -
  C
...[truncated]...
n non-PO: -
  No children: -
  Connected only: TRUE
  Symmetry filter: TRUE
  Max inbreeding: 1
  Linear inbreeding: FALSE

Building pedigree list:
  All 2 + 0 extra: 1 solutions | 2 candidates (0.000183 secs)
  All 2 + 1 extra: 2 solutions | 12 candidates | 11 duplicates removed (0.000993 secs)
  All 2 + 2 extra: 6 solutions | 6 candidates | 11 duplicates removed (0.00421 secs)
  Total solutions: 9 
  Converting to ped
  Time used: 0.00458 secs 
> plot(plist4)
> 
> # Full sibs are also included when `extra = "parents"`
> plist5 = buildPeds(1:2, extra = "parents", age = "1>2")
Pedigree parameters:
  ID labels: 1, 2
  Sex: 1, 1
  Extra: parents
  Age info: 1>2
  Known PO: -
  Known non-PO: -
  No children: -
  Connected only: TRUE
  Symmetry filter: TRUE
  Max inbreeding: 0.0625
  Linear inbreeding: FALSE

Building pedigree list:
Error in allPOchar %notin% c(knownPOchar, notPOchar) : 
  could not find function "%notin%"
Calls: buildPeds -> buildPedsParents -> listPOsets
Execution halted

r-oldrel-macos-x86_64

Running examples in ‘pedbuildr-Ex.R’ failed
The error most likely occurred in:

> ### Name: buildPeds
> ### Title: Build a list of pedigrees
> ### Aliases: buildPeds
> 
> ### ** Examples
> 
> # Two individuals + 1 extra
> plist = buildPeds(1:2, extra = 1, age = "1>2")
Pedigree parameters:
  ID labels: 1, 2
  Sex: 1, 1
  Extra: 1
  Age info: 1>2
  Known PO: -
  Known non-PO: -
  No children: -
  Connected only: TRUE
  Symmetry filter: TRUE
  Max inbreeding: 0.0625
  Linear inbreeding: FALSE

Building pedigree list:
  All 2 + 0 extra: 1 solutions | 2 candidates (0.000531 secs)
  All 2 + 1 extra: 2 solutions | 2 candidates | 2 duplicates removed (0.00214 secs)
  Total solutions: 3 
  Converting to ped
  Excessive inbreeding: 0 
  Time used: 0.00614 secs 
> plot(plist)
> 
> # Allow disconnected
> plist2 = buildPeds(1:2, extra = 1, age = "1>2", connected = FALSE)
Pedigree parameters:
  ID labels: 1, 2
  Sex: 1, 1
  Extra: 1
  Age info: 1>2
  Known PO: -
  Known non-PO: -
  No children: -
  
...[truncated]...
Known non-PO: -
  No children: -
  Connected only: TRUE
  Symmetry filter: TRUE
  Max inbreeding: 1
  Linear inbreeding: FALSE

Building pedigree list:
  All 2 + 0 extra: 1 solutions | 2 candidates (0.000558 secs)
  All 2 + 1 extra: 2 solutions | 12 candidates | 11 duplicates removed (0.0034 secs)
  All 2 + 2 extra: 6 solutions | 6 candidates | 11 duplicates removed (0.0427 secs)
  Total solutions: 9 
  Converting to ped
  Time used: 0.0438 secs 
> plot(plist4)
> 
> # Full sibs are also included when `extra = "parents"`
> plist5 = buildPeds(1:2, extra = "parents", age = "1>2")
Pedigree parameters:
  ID labels: 1, 2
  Sex: 1, 1
  Extra: parents
  Age info: 1>2
  Known PO: -
  Known non-PO: -
  No children: -
  Connected only: TRUE
  Symmetry filter: TRUE
  Max inbreeding: 0.0625
  Linear inbreeding: FALSE

Building pedigree list:
Error in allPOchar %notin% c(knownPOchar, notPOchar) : 
  could not find function "%notin%"
Calls: buildPeds -> buildPedsParents -> listPOsets
Execution halted

r-oldrel-windows-x86_64

Running examples in 'pedbuildr-Ex.R' failed
The error most likely occurred in:

> ### Name: buildPeds
> ### Title: Build a list of pedigrees
> ### Aliases: buildPeds
> 
> ### ** Examples
> 
> # Two individuals + 1 extra
> plist = buildPeds(1:2, extra = 1, age = "1>2")
Pedigree parameters:
  ID labels: 1, 2
  Sex: 1, 1
  Extra: 1
  Age info: 1>2
  Known PO: -
  Known non-PO: -
  No children: -
  Connected only: TRUE
  Symmetry filter: TRUE
  Max inbreeding: 0.0625
  Linear inbreeding: FALSE

Building pedigree list:
  All 2 + 0 extra: 1 solutions | 2 candidates (0.000887 secs)
  All 2 + 1 extra: 2 solutions | 2 candidates | 2 duplicates removed (0.00376 secs)
  Total solutions: 3 
  Converting to ped
  Excessive inbreeding: 0 
  Time used: 0.0102 secs 
> plot(plist)
> 
> # Allow disconnected
> plist2 = buildPeds(1:2, extra = 1, age = "1>2", connected = FALSE)
Pedigree parameters:
  ID labels: 1, 2
  Sex: 1, 1
  Extra: 1
  Age info: 1>2
  Known PO: -
  Known non-PO: -
  No children: -
  C
...[truncated]...
nown non-PO: -
  No children: -
  Connected only: TRUE
  Symmetry filter: TRUE
  Max inbreeding: 1
  Linear inbreeding: FALSE

Building pedigree list:
  All 2 + 0 extra: 1 solutions | 2 candidates (0.000571 secs)
  All 2 + 1 extra: 2 solutions | 12 candidates | 11 duplicates removed (0.00547 secs)
  All 2 + 2 extra: 6 solutions | 6 candidates | 11 duplicates removed (0.0287 secs)
  Total solutions: 9 
  Converting to ped
  Time used: 0.0307 secs 
> plot(plist4)
> 
> # Full sibs are also included when `extra = "parents"`
> plist5 = buildPeds(1:2, extra = "parents", age = "1>2")
Pedigree parameters:
  ID labels: 1, 2
  Sex: 1, 1
  Extra: parents
  Age info: 1>2
  Known PO: -
  Known non-PO: -
  No children: -
  Connected only: TRUE
  Symmetry filter: TRUE
  Max inbreeding: 0.0625
  Linear inbreeding: FALSE

Building pedigree list:
Error in allPOchar %notin% c(knownPOchar, notPOchar) : 
  could not find function "%notin%"
Calls: buildPeds -> buildPedsParents -> listPOsets
Execution halted
ERRORtestsr-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64

r-oldrel-macos-arm64

Running ‘testthat.R’ [1s/1s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(pedbuildr)
  Loading required package: pedtools
  > 
  > test_check("pedbuildr")
  Saving _problems/test-buildPeds-9.R
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 10 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-buildPeds.R:8:3'): buildPeds cathces errors ──────────────────
  `bp(1:3, sex = 1:3, verb = F)` threw an error with unexpected message.
  Expected match: "Illegal elements found in `sex`"
  Actual message: "could not find function \"%notin%\""
  Backtrace:
      ▆
   1. ├─testthat::expect_error(bp(1:3, sex = 1:3, verb = F), "Illegal elements found in `sex`") at test-buildPeds.R:8:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─pedbuildr (local)
...[truncated]...
──────
  Error in `allPOchar %notin% c(knownPOchar, notPOchar)`: could not find function "%notin%"
  Backtrace:
       ▆
    1. ├─testthat::expect_output(bp(1:3, age = c(1, 1, 1)), "Age info: -") at test-buildPeds.R:17:3
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(path, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─pedbuildr (local) bp(1:3, age = c(1, 1, 1))
   11.   └─pedbuildr::buildPeds(ids, sex, verbose = verb, ...) at test-buildPeds.R:2:3
   12.     └─pedbuildr:::buildPedsParents(...)
   13.       └─pedbuildr:::listPOsets(...)
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 10 ]
  Error:
  ! Test failures.
  Execution halted

r-oldrel-macos-x86_64

Running ‘testthat.R’ [2s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(pedbuildr)
  Loading required package: pedtools
  > 
  > test_check("pedbuildr")
  Saving _problems/test-buildPeds-9.R
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 10 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-buildPeds.R:8:3'): buildPeds cathces errors ──────────────────
  `bp(1:3, sex = 1:3, verb = F)` threw an error with unexpected message.
  Expected match: "Illegal elements found in `sex`"
  Actual message: "could not find function \"%notin%\""
  Backtrace:
      ▆
   1. ├─testthat::expect_error(bp(1:3, sex = 1:3, verb = F), "Illegal elements found in `sex`") at test-buildPeds.R:8:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─pedbuildr (local)
...[truncated]...
──────
  Error in `allPOchar %notin% c(knownPOchar, notPOchar)`: could not find function "%notin%"
  Backtrace:
       ▆
    1. ├─testthat::expect_output(bp(1:3, age = c(1, 1, 1)), "Age info: -") at test-buildPeds.R:17:3
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(path, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─pedbuildr (local) bp(1:3, age = c(1, 1, 1))
   11.   └─pedbuildr::buildPeds(ids, sex, verbose = verb, ...) at test-buildPeds.R:2:3
   12.     └─pedbuildr:::buildPedsParents(...)
   13.       └─pedbuildr:::listPOsets(...)
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 10 ]
  Error:
  ! Test failures.
  Execution halted

r-oldrel-windows-x86_64

Running 'testthat.R' [4s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(pedbuildr)
  Loading required package: pedtools
  > 
  > test_check("pedbuildr")
  Saving _problems/test-buildPeds-9.R
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 10 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-buildPeds.R:8:3'): buildPeds cathces errors ──────────────────
  `bp(1:3, sex = 1:3, verb = F)` threw an error with unexpected message.
  Expected match: "Illegal elements found in `sex`"
  Actual message: "could not find function \"%notin%\""
  Backtrace:
      ▆
   1. ├─testthat::expect_error(bp(1:3, sex = 1:3, verb = F), "Illegal elements found in `sex`") at test-buildPeds.R:8:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─pedbuildr (local) bp
...[truncated]...
──────
  Error in `allPOchar %notin% c(knownPOchar, notPOchar)`: could not find function "%notin%"
  Backtrace:
       ▆
    1. ├─testthat::expect_output(bp(1:3, age = c(1, 1, 1)), "Age info: -") at test-buildPeds.R:17:3
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(path, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─pedbuildr (local) bp(1:3, age = c(1, 1, 1))
   11.   └─pedbuildr::buildPeds(ids, sex, verbose = verb, ...) at test-buildPeds.R:2:3
   12.     └─pedbuildr:::buildPedsParents(...)
   13.       └─pedbuildr:::listPOsets(...)
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 10 ]
  Error:
  ! Test failures.
  Execution halted
NOTER code for possible problemsr-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64

r-oldrel-macos-arm64, r-oldrel-macos-x86_64

listPOsets: no visible global function definition for ‘%notin%’
Undefined global functions or variables:
  %notin%

r-oldrel-windows-x86_64

listPOsets: no visible global function definition for '%notin%'
Undefined global functions or variables:
  %notin%

CRAN check page ↗

Slowest check: 1.9 min · r-oldrel-macos-x86_64
Status changes
  • ERROR10 OK, 3 ERRORNow
  • ERROR11 OK, 2 ERROR2026-06-26
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.4.0
READMEYes · 722 wordsVignettesNoNEWSYes · 100% structured · mentions 0.4.0Citation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
Help pages
5 (1 internal)includes a package overview page
Examples that run
100%4 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

3.3K
CRAN downloads in the past year
Rank #9,061 · ~9/day · ~274/mo
Daily download trend is not available in this view yet.
47830 days
1.1K90 days
3.3K1 year
Compare downloads with other packages →
Also on80 r2u6 autocran

Repository

3Stars
0Forks
0Open issues
0Open PRs
3Releases
183Commits
1Commit identities
pedigree-reconstructionpedsuiterelatednessrelationship-prediction
183 commits · Last activity 2026-06-28 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
0
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-10-01 · 32026-07-07 · 3
PracticesBeta

4 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/magnusdv/pedbuildr on 2026-10-21.

Continuous integration (1)
GitHub Actions
Docs source (1)
README.Rmd
Reproducibility and dev environment (1)
data-raw/
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
8 external dependencies (excludes base and recommended)

Installing pedbuildr adds 18 packages (7 with compiled code, 4.1 MB of source tarballs). Heaviest: nanonext 911 KB, kinship2 484 KB, knitr 479 KB.

Depends (2)
R >= 4.2.0pedtools
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (1)
Author, Maintainer since 0.2.1 (2021)
Releases (3)

Pick two releases to compare their code metrics.

  • 0.4.0Latest
    record
    2026-06-25 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 0.3.0
    record
    2023-08-22 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.2.1
    record
    2021-03-16
  • R
    R 4.0.0 released · 2020-04-24

Package metadata

First published
2021-03-16
Total releases
3 / 5 yrs
License
GPL-3 OSI
Minimum R
≥ 4.2.0
Bundled data
1.1 KB / 2 files
Download size
159 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("pedbuildr")

The package provides a citation file, so citation() returns the authors' own entry.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for pedbuildr version 0.4.0 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy