Package: visPedigree 1.8.1

visPedigree: Tidying, Analysis, and Fast Visualization of Animal and Plant Pedigrees

Provides tools for the analysis and visualization of animal and plant pedigrees. Analytical methods include equivalent complete generations, generation intervals, effective population size (via inbreeding, coancestry, and demographic approaches), founder and ancestor contributions, partial inbreeding, genetic diversity indices, and additive (A), dominance (D), and epistatic (AA) relationship matrices. Core algorithms — ancestry tracing, topological sorting, inbreeding coefficients, and matrix construction — are implemented in C++ ('Rcpp', 'RcppArmadillo') and 'data.table', scaling to pedigrees with over one million individuals. Pedigree graphs are rendered via 'igraph' with support for compact full-sib family display; relationship matrices can be visualized as heatmaps. Supports complex mating systems, including selfing and pedigrees in which the same individual can appear as both sire and dam.

Authors:Sheng Luan [aut, cre]

visPedigree_1.8.1.tar.gz
visPedigree_1.8.1.zip(r-4.7)visPedigree_1.8.1.zip(r-4.6)visPedigree_1.8.1.zip(r-4.5)
visPedigree_1.8.1.tgz(r-4.6-x86_64)visPedigree_1.8.1.tgz(r-4.6-arm64)visPedigree_1.8.1.tgz(r-4.5-x86_64)visPedigree_1.8.1.tgz(r-4.5-arm64)
visPedigree_1.8.1.tar.gz(r-4.7-arm64)visPedigree_1.8.1.tar.gz(r-4.7-x86_64)visPedigree_1.8.1.tar.gz(r-4.6-arm64)visPedigree_1.8.1.tar.gz(r-4.6-x86_64)
visPedigree_1.8.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
visPedigree/json (API)

# Install 'visPedigree' in R:
install.packages('visPedigree', repos = c('https://luansheng.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/luansheng/vispedigree/issues

Pkgdown/docs site:https://luansheng.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On CRAN:

Conda:

openblascppopenmp

7.63 score 20 stars 47 scripts 542 downloads 26 exports 14 dependencies

Last updated from:fda6e40b8a. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK161
linux-devel-x86_64OK173
source / vignettesOK261
linux-release-arm64OK209
linux-release-x86_64OK169
macos-release-arm64OK177
macos-release-x86_64OK416
macos-oldrel-arm64OK171
macos-oldrel-x86_64OK303
windows-develOK182
windows-releaseOK156
windows-oldrelOK158
wasm-releaseOK122

Exports:as_tidypedexpand_pedmathas_candidateshas_inbreedinginbreedis_tidypedpedancestrypedcontribpedecgpedfclasspedgenintpedhalflifepedivpedmatpedmetapednepedpartialpedrelpedstatspedsubpopquery_relationshipsplitpedsummary_pedmattidypedvismatvisped

Dependencies:clicpp11data.tableglueigraphlatticelifecyclemagrittrMatrixpkgconfigRcppRcppArmadillorlangvctrs

How to draw a pedigree
1 Drawing the pedigree | 1.1 A simple pedigree graph | 1.1.1 Highlighting specific individuals | 1.1.2 Showing inbreeding coefficients | 1.2 A reduced pedigree graph | 1.3 An outlined pedigree graph | 1.4 How to use this package in a selective breeding program | 1.4.1 An analysis of founders for an individual | 1.4.2 The contribution of different families in a selective breeding program

Last update: 2026-04-14
Started: 2018-11-14

How to tidy a pedigree
1. Installation of the visPedigree package | 2. Pedigree format specification | 3. Checking and tidying pedigree | 3.1 Introduction | 3.2 Pedigree loop detection | 3.3 Tracing the pedigree of a specific individual | 3.4 Creating an integer pedigree | 3.5 Calculating inbreeding coefficients | 3.6 Customizing generation assignment | 3.7 Summarizing the pedigree | 3.8 Splitting large pedigrees

Last update: 2026-03-25
Started: 2018-11-14

tidyped Class Structure and Extension Notes
1. Class identity | 2. Core design goals | 3. The head invariant: IndNum == row index | 4. Column contract | 4.1 Minimal structural columns | 4.2 Integer pedigree columns | 4.3 Other common columns | 4.4 Column naming convention | 5. Metadata layer | 6. Structural invariants | 7. Constructor pipeline | 7.1 Full path: tidyped(raw_input) | 7.2 Fast path: tidyped(tp, cand = ids) | 7.3 new_tidyped() — internal constructor | 8. Three-tier guard system | 8.1 validate_tidyped() — visualization guard | 8.2 ensure_tidyped() — structure-light guard | 8.3 ensure_complete_tidyped() — complete-pedigree guard | 8.4 Choosing the right guard | 9. Safe subsetting contract | 9.1 := operations | 9.2 Column-only selections | 9.3 Row subsets | 10. Computational boundaries: C++ vs igraph | 10.1 C++ — core computation path | 10.2 igraph — graph-specific tasks | 11. Extension rules | 11.1 Do not add new pedigree-level attributes | 11.2 Keep computed state derivable | 11.3 Preserve data.table semantics | 11.4 Respect downgrade semantics | 11.5 Document C++ assumptions | 12. User-facing inspection helpers | 13. Maintenance checklist | 14. Recommended workflow

Last update: 2026-03-25
Started: 2026-03-15

Pedigree Analysis and Population Genetics
1. Setup and Data Preparation | 2. Pedigree Overview with pedstats() | 3. Pedigree Completeness with pedecg() | 4. Generation Intervals with pedgenint() | 5. Subpopulation Structure with pedsubpop() | 6. Diversity Indicators with pediv() | 6.1 fe, fa, and fg: what do they measure? | Effective number of founders (fe) | Effective number of ancestors (fa) | Founder genome equivalents (fg) | Retained genetic diversity (GeneDiv) | 6.2 Shannon-entropy effective numbers: feH and faH | Metric guide | Interpreting the ratio $f_e^{(H)} / f_e$ | Management implications | 7. Diversity Dynamics over Time with pedhalflife() | 7.1 Column guide for $timeseries | 7.2 Interpreting the $\lambda$ components | 7.3 Interpreting $T_{1/2}$ | 8. Effective Population Size with pedne() and pediv() | 8.1 Demographic Ne | 8.2 Inbreeding Ne | 8.3 Coancestry Ne | 9. Average Relationship Trends with pedrel() | 9.1 Mean additive relationship (scale = "relationship") | 9.2 Corrected mean coancestry (scale = "coancestry") | 10. Inbreeding Trends with inbreed() and pedfclass() | 11. Gene Flow and Partial Inbreeding | 11.1 pedancestry(): founder-line proportions | 11.2 pedpartial(): which ancestors explain inbreeding? | 12. Practical Interpretation | References

Last update: 2026-03-25
Started: 2026-03-14

Calculation and visualization of relationship matrix
1. Calculating Relationship Matrices with pedmat() | 1.1 Supported Methods | 1.2 Basic Usage | 1.3 Sparse Matrix Representation | 2. Inspecting the Matrix | 2.1 Summary Statistics | 2.2 Querying Specific Relationships | 3. Compact Mode for Large Pedigrees | 3.1 Using compact = TRUE | 3.2 Expanding and Querying Compacted Matrices | 3.3 When to Use Compact Mode | 4. Visualizing Relationship Matrices with vismat() | 4.1 Relationship Heatmaps | Compact Matrix — Direct Visualization | Preserve Pedigree Order | Display a Subset of Individuals | Grouping by Pedigree Column | 4.2 Inbreeding and Kinship Histograms | 5. Performance Considerations

Last update: 2026-03-23
Started: 2026-01-20

Efficient visPedigree Workflows
1. Load packages and example data | 2. Tidy once, reuse many times | 3. Fast repeated tracing from an existing tidyped | 4. Safe data.table usage on tidyped | 4.1 Adding new columns is safe | 4.2 Incomplete row subsetting now degrades safely | 4.3 Use explicit tracing when you need a valid sub-pedigree | 5. splitped() versus pedsubpop() | 6. Use accessors instead of manual attribute checks | 7. Recommended high-efficiency workflow | 8. Practical rules of thumb

Last update: 2026-03-15
Started: 2026-03-15

Readme and manuals

Help Manual

Help pageTopics
Subset a tidyped object[.tidyped
Restore the tidyped class to a manipulated pedigreeas_tidyped
A large pedigree with big family sizesbig_family_size_ped
A complex pedigreecomplex_ped
A deep pedigreedeep_ped
Expand a Compact Pedigree Matrix to Full Dimensionsexpand_pedmat
A pedigree with half foundershalf_founder_ped
Check whether a tidyped object contains candidate flagshas_candidates
Check whether a tidyped object contains inbreeding coefficientshas_inbreeding
A highly inbred pedigreeinbred_ped
Calculate inbreeding coefficientsinbreed
Test if an object is a tidypedis_tidyped
A pedigree with loopsloop_ped
Calculate Ancestry Proportionspedancestry
Calculate Founder and Ancestor Contributionspedcontrib
Calculate Equi-Generate Coefficientpedecg
Summarize Inbreeding Levelspedfclass
Calculate Generation Intervalspedgenint
Calculate Information-Theoretic Diversity Half-Lifepedhalflife plot.pedhalflife print.pedhalflife
Calculate Genetic Diversity Indicatorspediv
Genetic Relationship Matrices and Inbreeding Coefficientspedmat
Access pedigree metadata from a tidyped objectpedmeta
Calculate Effective Population Sizepedne
Calculate Partial Inbreedingpedpartial
Calculate Mean Relationship or Coancestry Within Groupspedrel
Pedigree Statisticspedstats
Pedigree Subpopulationspedsubpop
Plot a tidy pedigreeplot.tidyped
Print Founder and Ancestor Contributionsprint.pedcontrib
Print Genetic Diversity Summaryprint.pediv
Print Pedigree Statisticsprint.pedstats
Print method for summary.tidypedprint.summary.tidyped
Print method for tidyped pedigreeprint.tidyped
Query Relationship Coefficients from a Pedigree Matrixquery_relationship
A simple pedigreesimple_ped
A small pedigreesmall_ped
Split Pedigree into Disconnected Groupssplitped
Summary Statistics for Pedigree Matricessummary_pedmat
Summary method for tidyped objectssummary.tidyped
Tidy and prepare a pedigreetidyped
Visualize Relationship Matricesvismat
Visualize a tidy pedigreevisped