Changes in version 1.7.0 released on 23 Mar 2026
New features
pediv()retained genetic diversity (GeneDiv):pediv()$summarygains a new columnGeneDiv = 1 - MeanCoan, the pedigree-based retained genetic diversity of the reference population. Values lie in ; higher values indicate more diversity retained relative to an unrelated base population.print.pediv()displays it alongsidefgandMeanCoan. This dimensionless complement tofgis easier to communicate to non-specialist stakeholders.vismat()large-pedigree representative view: When the original pedigree has more than 5,000 individuals,vismat()no longer attempts a full N × N matrix expansion. Instead, it uses the compact matrix (K × K representative individuals) directly and adds sibling-count labels of the formID (×n)to each axis tick. Whencompact = TRUEandbyis supplied, the function now computes group means algebraically from the K × K matrix without expanding to N × N, eliminating memory overflow for very large pedigrees (e.g., N ≈ 178,000 inbig_family_size_ped).
Internal changes
-
vismat()named threshold constants: Hardcoded magic numbers controlling large-pedigree behavior (5000,2000,50) have been refactored into named constants (VISMAT_EXPAND_MAX,VISMAT_LABEL_MAX,VISMAT_WARN_THRESHOLD) at the top ofR/vismat.Rfor easier maintenance.
Changes in version 1.6.2 released on 23 Mar 2026
New features
-
pedrel()coancestry scale: Added ascaleparameter topedrel()supporting"relationship"(default, returns mean ) and"coancestry"(returns corrected mean coancestry ). The coancestry scale uses the diagonal-corrected formula of Caballero & Toro (2000), properly accounting for self-coancestry within the reference group.
API Changes
-
vispstat()internal downgrade: Thevispstat()function has been downgraded to an internal-only function. Specifically, it is now the internal backend forplot.pedstats(). Users should use the standardplot(stats_obj)S3 method instead. -
Standardized
vispstat()documentation: Updated the documentation for generation intervals invispstat()to accurately reflect the visualization of mean values (removing the misleading “± SD” claim).
Documentation
-
pedigree-analysis.Rmd§9 expanded: Section 9 (“Average Relationship Trends withpedrel()”) split into two sub-sections to cover bothscaleoptions. Added §9.2 with the Caballero & Toro (2000) diagonal-corrected coancestry formula, a worked example usingscale = "coancestry"(returningMeanCoan), and guidance on when to prefer each scale. -
relationship-matrix.Rmdupdated: Added §3.2 compact-to-vismat()direct path and expanded §4.1 with five sub-sections (reorder = FALSE,ids,by = "Gen",by = "Family", compact auto-expand). Replaced incorrect performance thresholds in §5 with an accurate reference table.
Bug fixes
-
Eliminated spurious subsetting warnings: Internal group-by slicing in
pedrel(),pedne(),pediv(),pedhalflife(), andpedgenint()previously triggered false-positive[.tidyped]warnings (“Subsetting removed parent records…”). Fixed by usingas.data.table()to bypass the completeness guard when the subset is only used for ID extraction, not for pedigree computation. -
Eliminated internal class-restoration messages:
pedrel(compact = TRUE)previously emitted “Note: ‘ped’ lost its tidyped class … Restoring automatically.” messages. Root cause wascompact_ped_for_matrix()returning a plaindata.tablein its early-return branches (no full-sib families or no compactable members). Fixed by returningdata.table::copy(ped)to preserve thetidypedclass. -
Internal cleanup: Removed dead code variables and added comprehensive unit tests for the
genintbranch ofvispstat().
Changes in version 1.6.1 released on 21 Mar 2026
Improvements
-
Standardized diversity notation: Output columns in
pedhalflife()$timeseriesare now lowercase (fe,fa,fg,lnfe,lnfa,lnfg,lnfafe,lnfgfa) to maintain consistency with standard population genetics nomenclature. -
Enhanced
plot.pedhalflife()visualization: Intype = "log"mode, the plot now includes an OLS regression line for total diversity decay () and a vertical reference line for the diversity half-life . -
Improved unit labeling:
plot.pedhalflife()andprint.pedhalflife()now automatically use the name of thetimevarcolumn (e.g., “Gen”, “Year”) for axis and summary labels.
Changes in version 1.6.0 released on 20 Mar 2026
New features
-
Information-theoretic diversity half-life (
pedhalflife()): New function that tracks , , and across time points and fits a log-linear decay model to quantify the rate of genetic diversity loss. The total loss rate is decomposed into three additive components: foundation bottleneck (, unequal founder contributions), breeding bottleneck (, overuse of key ancestors), and genetic drift (, random sampling loss). The diversity half-life is reported in units of thetimevarcolumn (e.g., generations, years). S3printandplotmethods are provided. Theplot()method supports both log-scale (type = "log") and raw-scale (type = "raw") views of the decay trajectory.
Changes in version 1.5.0 released on 20 Mar 2026
New features
-
Shannon-entropy effective founders and ancestors (
feH,faH):pedcontrib()andpediv()now compute two additional diversity statistics based on the Hill number of order (Shannon entropy):-
feH— effective number of founders under equal entropy weighting. Satisfies the inequality . -
faH— effective number of ancestors under equal entropy weighting. Satisfies the inequality . Both are computed from the vector of genetic contributions using the formula and complement the classical quadratic () effective numbers and (Lacy 1989; Boichard et al. 1997). The new columns appear inpediv()$summaryandpedcontrib()$summaryalongside the existingfe,fa, andfgcolumns.
-
Changes in version 1.4.1 released on 15 Mar 2026
Bug fixes
-
Fail-fast incomplete pedigree analysis:
inbreed()and other completeness-sensitive analysis functions now error on row-truncated subsets with missing parent records. This prevents incorrect results (e.g., zero inbreeding) caused by calculating on partial ancestry data.
Changes in version 1.4.0 released on 15 Mar 2026
New features
-
tidypedclass redesign and optimization: Refined the internaltidypedclass architecture around a clearer metadata contract and safer S3/data.table interaction model, making the object more robust for repeated downstream analysis and extension. -
Safer
tidypedobject workflows: Addedis_tidyped(),pedmeta(),has_inbreeding(), andhas_candidates()to make class checks and metadata inspection explicit and user-facing. -
Fast candidate tracing from existing
tidypedobjects:tidyped()now uses a fast path when the input is already a validtidypedobject andcandis supplied, avoiding repeated global validation and preprocessing. -
Workflow coverage and developer documentation: Added a new workflow vignette, a
tidypedstructure and extension vignette, and focused regression tests covering safe subsetting,:=by-reference behavior, and split workflow semantics.
Bug fixes
-
Stable by-reference mutation for
tidyped: Replaced class and metadata attachment paths withdata.table::setattr()so subsequent:=operations keep true by-reference behavior instead of silently writing into shallow copies. -
Safe row subsetting: Added
[.tidypedinterception so incomplete subsets degrade to plaindata.tableobjects with a warning, while complete subsets preservetidypedstructure and rebuild pedigree indices correctly. -
More robust class recovery: Core analysis entry points now cooperate with
ensure_tidyped()/validate_tidyped()to recover validtidypedobjects after common class-dropping operations.
Changes in version 1.3.5 released on 14 Mar 2026
New features
-
S3 Class Protection: Added
as_tidyped()and an internalensure_tidyped()mechanism to robustly handle the “silent class loss” bug. Standard R operations likemerge(),rbind(), anddplyrverbs often strip custom S3 classes fromdata.tableobjects. Major analysis functions now automatically detect if thetidypedclass is missing and restore it if the underlying data structure is intact, providing an informational message to the user instead of erroring.
Bug fixes
-
Robust Analysis Entry: Updated all 11 core analysis functions (including
pedstats(),pedne(),pediv(),pedrel(), etc.) to use the new auto-recovery logic. This ensures that analysis remains user-friendly and reliable even after manual data manipulation by the user.
Changes in version 1.3.4 released on 14 Mar 2026
Bug fixes
-
data.tableinvisibility: Fixed a subtle but pervasive issue where functions returningdata.tableortidypedobjects (which are based ondata.table) were returning them invisibly. This occurred because internaldata.tableoperations like:=andset*set an internal “invisible” flag. Affected functions includedpedancestry(),pedpartial(),pedne(),pedrel(),tidyped(), and many others. All relevant functions now explicitly return the object using the[]syntax to ensure they auto-print correctly in the R console and knitted documents. -
Side-effect prevention: Updated
calc_ne_demographic()to operate on a copy of the input pedigree instead of modifying the user’s data by reference.
Changes in version 1.3.3 released on 14 Mar 2026
Documentation
-
pedigree-analysis.Rmdrewrite: Reorganized the main pedigree analysis vignette into clearer thematic sections covering pedigree overview, pedigree completeness (pedecg()), generation intervals (pedgenint()), subpopulation structure (pedsubpop()), diversity indicators (pediv()), effective population size (pedne()), average relationship trends (pedrel()), inbreeding classification (pedfclass()), and ancestry / partial inbreeding diagnostics. -
Theory expansion: Added core formulas, interpretation notes, and breeding-use explanations for Equivalent Complete Generations (ECG), generation intervals, effective numbers of founders / ancestors / founder genomes (
f_e,f_a,f_g), three effective population size definitions (N_eby demographic, inbreeding, and coancestry methods), and average additive relationship (MeanRel). - Reference update: Expanded the vignette bibliography to include the key classical references underlying the package’s diversity and effective population size metrics, including Wright (1922, 1931), Lacy (1989), Boichard et al. (1997), Caballero & Toro (2000), Cervantes et al. (2011), and Gutiérrez et al. (2008, 2009).
Bug fixes
-
Vignette API synchronization: Replaced outdated
pedinbreed_class()calls in the pedigree analysis vignette with the currentpedfclass()interface and aligned all examples with the currentreference,foundervar, andcycleargument names.
Testing
-
Analysis regression coverage: Added focused unit tests to verify that
pedancestry()proportions sum to 1 in a multi-line admixture pedigree and thatpedrel()returns identical results betweencompact = TRUEandcompact = FALSEmodes on the same pedigree.
Changes in version 1.3.2 released on 13 Mar 2026
New features
-
Added Comprehensive Examples: Added
@examplesto core analysis functionspedne(),pedecg(), andpedsubpop()to improve documentation completeness and provide immediate value to users. -
Pedigree Connectivity Analysis (
pedsubpop): Enhancedpedsubpop()to better distinguish between pedigree splitting (viasplitped) and grouping/summary analysis. It now provides clear counts of total individuals, sires, dams, and founders within subgroups or connected components.
API Changes
-
pedfclass()rename: Renamed the inbreeding-class summary helper frompedinbreedclass()topedfclass()to align with the package naming guide and provide a shorter, clearer user-facing API. -
pedfclass()output refinement: Renamed the returned class column fromF_ClasstoFClass, and added support for user-defined inbreeding class breakpoints through thebreaksandlabelsarguments. -
pedgenint()parameter rename: Renamedcycle_lengthtocyclefor consistency with the package naming guide. -
pedgenint()/pedstats()unitparameter: Removed"gen"fromunitoptions. Theunitparameter now only accepts"year","month","day", or"hour". The previous"gen"option produced incorrect results when combined with date inputs. -
pedgenint()timevardefinition: Clarifiedtimevaras a birth date column. Numeric year inputs (e.g.,2020) are now automatically converted toDate("YYYY-07-01") with an informational message. Character date strings are parsed viaas.POSIXct()withtz = "UTC"to avoid DST artifacts.
Minor improvements and bug fixes
-
Documentation Audit: Refined internal documentation for
pedsubpop()to clarify its use cases alongsidesplitped(). -
vispstat()pathway filter fix: Fixed an issue where the generation-interval bar chart could silently drop pathways due to an overly broadfactor()filter. Now uses explicit%in% c("SS", "SD", "DS", "DD")subsetting. -
.parse_to_numeric_time()rewrite: Completely rewrote the internal time parser to handleDate,POSIXct, character date strings, and numeric years robustly. AllPOSIXctconversions now usetz = "UTC"to prevent DST-related artifacts.
Changes in version 1.3.1 released on 12 Mar 2026
New features
- Added the
selfingargument totidyped()to support plant and aquaculture pedigrees where an individual can appear as both Sire and Dam, resolving biologically impossible sex conflict errors (#10). -
pedrel()logic upgrade: Modifiedpedrel()to use full ancestral tracing viatidyped(ped, cand = ...)when calculating sub-group relationships. This ensures that relationships in deep-inbred populations (e.g., full-sib mating over multiple generations) are calculated correctly rather than being underestimated due to ancestor truncation.
API Changes
-
pedancestry()parameter rename: Renamedlabelvartofoundervarandlabelstotarget_labelsto align with the package naming guide and make the ancestry-tracing interface more explicit. Old argument names are no longer supported because this function is still under active development. -
pedecg()parameter cleanup: Removed the short-livedreferenceargument. It only filtered rows after a full ECG pass and did not define a true reference population or prune the pedigree before calculation. Users should subset the returned table directly if needed.
Minor improvements and bug fixes
-
Academic nomenclature alignment: Updated documentation for
pedrel()andpedne()to explicitly distinguish between Additive Genetic Relationship () and Coancestry (). - Individuals acting as both parents are now identified as
"monoecious"in theSexcolumn. -
visped()now uses a distinct teal color (#26a69a) to render"monoecious"individuals, ensuring clear visual separation from males, females, and highlighted nodes. - Pedigree edges are now colored based on the parent’s role in a specific mating (Sire blue, Dam gold, Selfing teal) rather than invariant node sex, allowing monoecious individuals to display role-appropriate connection colors.
-
summary()andprint()methods fortidypedobjects now accurately report the count and percentage of monoecious individuals. -
Efficiency Optimization: Optimized
pedancestry()initialization on large pedigrees by using vectorized matrix indexing, significantly reducing overhead for pedigrees with >25k nodes. - Added a new unit test for
pedrel()to verify correct relationship calculation in deep-inbreeding scenarios (Gen 4 relationships reaching 1.0).
Changes in version 1.3.0 released on 10 Mar 2026
New Features
-
Founder Genome Equivalents (): Integrated the robust calculation of Founder Genome Equivalents into
pediv(). It directly evaluates the mean coancestry while properly correcting for diagonal intra-cohort elements through adaptive scaling, keeping computational costs linear relative to the reference cohort size. -
Reproducible Parameter Inference: Added a
seedargument to bothpedne()andpediv()functions functions enabling precise reproducible sampling for effective population size estimations (Ne) and computations using Monte Carlo approximations.
Changes in version 1.2.3 released on 08 Mar 2026
Bug Fixes
-
Trace edge highlighting in
visped(): Fixed incorrect edge highlighting when usingtrace = "all". Previously, when a node was highlighted as both an ancestor (via upward tracing) and a parent of descendants (via downward tracing), the cross-path edges were incorrectly highlighted. For example,visped(tp, highlight = "X", trace = "all")would incorrectly highlight the edge from N to Z1/Z2, even though that parent-child relationship is not on X’s trace path. The fix separates the up and down trace paths and usestrace_edgesto precisely control which edges are highlighted. -
Focal node upward edge in
trace = "down": Fixed an issue where the focal node’s upward connection to its parents’ family node was incorrectly shown as highlighted when tracing downward only. For example,visped(tp, highlight = "X", trace = "down")would show X’s edge to the UxV family node in solid black, even though X’s ancestors are not part of the downward trace. Now,individual → familyedges are only highlighted when the individual appears as a child in the traced path.
Changes in version 1.2.2 released on 08 Mar 2026
New Features
-
Unified Diversity Analysis (
pediv): Addedpediv()as a single entry-point wrapper that aggregates founder contributions (), ancestor contributions (), and all three Ne estimates (coancestry, inbreeding, demographic) into one consolidatedpedivS3 object. A dedicatedprint.pediv()method provides a formatted summary table. -
New Dataset (
complex_ped): Addedcomplex_ped, a multi-generation pedigree dataset suitable for testing deeper ancestry tracing and cross-generation diversity analyses.
API Changes
-
Parameter Rename (
cand→reference): Standardized the reference population parameter name across all relevant analysis functions:-
pedne(... , reference = NULL)(previouslycand) -
pedcontrib(... , reference = NULL)(previouslycand) -
pedrel(... , reference = NULL)(previouslycand)
candargument is no longer supported; please update existing scripts.) -
Documentation
-
Vignette Rewrite (
pedigree-analysis.Rmd): Completely restructured the pedigree analysis vignette with expanded theory explanations for , , and Ne, updated code examples usingpediv()and the newreferenceparameter, and improved narrative linking the statistical outputs to practical breeding decisions. -
Workspace Reorganization: Moved development-only files (
MACOS_OPENMP_FIX.md,manuscript.md, analysis scripts) intosandbox/to keep the package root clean. Added corresponding.gitignoreand.Rbuildignorerules.
Changes in version 1.2.1 released on 07 Mar 2026
New Features
-
Ancestral Analysis (
pedcontrib): Added robust algorithms for assessing genetic diversity through gene origin probabilities. Computes the effective number of founders () via recursive gene derivation and the effective number of ancestors () via Boichard’s iterative algorithm. -
Missing Parent Conservation (“Phantom Parents”): Implemented correct probability mass conservation. In
pedcontrib, single missing parents (half-founders) are seamlessly augmented with temporary “phantom parents” before processing, overcoming the critical issue of gene probability leakage found in earlier tools. -
Ancestry Proportions (
pedancestry): Addedpedancestry()function to trace line origins and monitor the surviving proportion of genes from specified historic founder lines or strains down to modern descendants. -
Partial Inbreeding (
pedpartial): Engineered the Meuwissen & Luo (1992) based partial inbreeding decompositionpedpartial(). Enables breaking down the overall inbreeding coefficient into discrete fractions attributed to specifically targeted ancestors. -
New Dataset (
half_founder_ped): Added empirical ENDOG dataset containing instances of strictly missing single parents (sire known, dam unknown, etc.) specifically engineered to test and validate phantom-parent corrections.
Performance
- Peeling Core Engine: Rebuilt the C++ core array engine backing the and calculations. Execution latency for incredibly massive and deep graphs (>180,000 nodes) was resolved, avoiding hanging scenarios by limiting computational bounds optimally inside array states.
Documentation
-
Analysis Indexing: Expanded
_pkgdown.ymlconfiguration mapping to fully expose all newly engineered high-level pedigree statistical functions (pedancestry,pedcontrib,pedpartial,pedecg, etc.) within the main Reference documentation. -
Analysis Vignettes: Updated
vignettes/pedigree-analysis.Rmdcarefully illustrating Boichard’s genetic bottleneck interpretations ( vs ) alongside new code examples for tracing targeted lineage flows.
Changes in version 1.2.0 released on 04 Mar 2026
New Features
-
Enhanced Effective Population Size (Ne) Calculation:
- The
pedne()function has been significantly expanded and now supports three robust methods for estimating Ne in breeding populations:-
coancestry(New Default): Based on the rate of coancestry (). This method captures the loss of genetic potential and is considered the “gold standard” for populations under selection pressure. It typically yields a smaller, more conservative Ne estimate than inbreeding-based methods, providing a better early warning signal for genetic diversity loss. -
inbreeding: Based on the individual rate of inbreeding (). This method reflects the realized inbreeding but may overestimate Ne in managed populations where mating between relatives is actively avoided. -
demographic: A census-based method using the number of breeding males () and females ().
-
- The
-
Parallel Processing Support:
- Introduced OpenMP multi-threading for the computationally intensive
coancestrymethod. Users can now specifyncoresto speed up large-scale matrix calculations. - Added a
nsamplesparameter to allow efficient estimation on massive pedigrees by sampling subsets of each cohort.
- Introduced OpenMP multi-threading for the computationally intensive
Performance
-
C++ Optimization:
- Implemented a high-performance C++ backend (
cpp_calculate_sampled_coancestry_delta) usingRcppArmadillo. This replaces the previous R-based logic for coancestry calculations, enabling the analysis of much larger datasets.
- Implemented a high-performance C++ backend (
Documentation
-
Clarified Parameter Scopes: Updated documentation for
pedne()to explicitly state thatncoresandnsamplesparameters are specific to themethod = "coancestry"calculation path. - Method Descriptions: Expanded details on the three Ne calculation methods to help users choose the most appropriate metric for their breeding program.
Changes in version 1.1.1 released on 02 Mar 2026
New Features
-
pedgenint Sex-Independent Pathways: Added evaluation of
SO(Sire-to-Offspring) andDO(Dam-to-Offspring) generation intervals alongside the standard 4 pathways. This is especially useful for aquatic species (like shrimp) or early-stage screening where offspring sex might remain unknown.
API Changes and Refactoring
-
pedne Interface Standardization:
- Renamed arguments
timevartoby, andcohorttocandto harmonize parameter naming conventions across the package. - Removed unused and misleading parameters (
unit,cycle_length,maxgen). The effective population size Ne calculation innately depends on Equivalent Complete Generations (ECG), making it independent of scalar temporal units.
- Renamed arguments
-
vismat Parameter Alignment: Renamed
groupingargument tobyto maintain grouping consistency.
(Note: Old argumentstimevar,cohortinpedne()andgroupinginvismat()are retained for backward compatibility but will display a deprecation warning.)
Bug fixes
-
pedrel Correctness: Fixed a critical calculation bug in
pedrel()where the mean average relatedness calculation erroneously divided the sum of the full relationship matrix (including all traced ancestors) by only the size of the target subgroup. It now cleanly subsets the relationship matrix, and correctly handles boundary limits (NUsed < 2). The output columnsNandMeanRelbehavior has been replaced withNTotal,NUsed, andMeanRel. -
pedgenint Aggregation: Fixed
pedgenint()to output appropriate unweighted mixture standard deviation for generating generation intervals alongside its unweighted 4-pathway average interval estimate. -
pedgenint Sample Size (N): Fixed an issue where the
Averagepathway N was severely underestimated. It now accurately evaluates all parent-offspring pairs viacalc_all_pathway(). -
pedcontrib Accuracy: Standardized effective founders (
Ne_f) and effective ancestors (Ne_a) calculation inpedcontrib()to ensure they are calculated based upon the full un-truncated cohort before outputting strictly thetopn-ranked figures. Results list has been augmented with variables tracking the_totaland_reportedcount values. - pedcontrib Deep Pedigree Latency: Replaced a string-named vector backward pass with a pure integer-indexed backward pass, resolving instances where evaluating contributions on deep, large pedigrees (e.g., > 200,000 records) would hang indefinitely due to scaling constraints.
-
pedpartial / pedancestry Input Compatibility: Ensured missing numeric identifiers in incoming pedigrees (e.g.
addnum = FALSE) do not breakpedpartial()orpedancestry(). Increased performance of the pedigree propagation loop inpedancestryby dropping an internal array linear probe algorithm with an immediate linear vector lookup. -
pedne Performance bottleneck: Removed an obsolete
O(N^2)individual traversal evaluation (calc_ancestral_f()), streamlining calculation purely around the efficient direct formula by Gutiérrez et al.
Changes in version 1.1.0 released on 01 Mar 2026
New Features
-
Pedigree Analysis Module: Introduced a comprehensive suite of pedigree analysis and population genetics tools.
-
pedstats(): Calculate holistic and demographic statistics. -
pedrel(): Formulate average relatedness within specific population groupings. -
pedgenint(): Compute distinct breeding pathways (SS, SD, DS, DD) and overall population generation intervals. -
pedcontrib(): Determine genetic contributions from founders (Ne_f) and prominent ancestors (Ne_a) utilizing iterative gene flow derivations. -
pedancestry(): Establish proportionality of ancestral lineages on subsequent descendants. -
pedpartial(): Decompose inbreeding mechanisms to detect fractional/partial origins from core ancestors.
-
-
Pedigree Analysis Visualization: Added
vispstat()to intuitively render bar charts of generation intervals and histogram distributions detailing depth tracking factors (like Equivalent Complete Generations).
Changes in version 1.0.1 released on 31 Jan 2026
CRAN release: 2026-02-23
Bug fixes
-
Compact Matrix Correctness: Fixed a critical data integrity bug in
compact = TRUEmode where relationship values (A, D, AA) were incorrect for parent-offspring and avuncular pairs due to improper merging of parent individuals with their non-parent siblings. - Pedigree Compression Strategy: Updated compaction logic to preserve original genetic identity of any individual that appears as a sire or dam, ensuring parents always have unique entries in the relationship matrix.
-
Sibling Row/Column Expansion: Fixed
expand_pedmat()to correctly handle sibling off-diagonal elements by dynamically calculating relationship values based on parent kinship, rather than simply duplicating representative diagonal values. -
Generation Alignment Logic: Fixed
tidyped(..., genmethod = "bottom")to prioritize Sibling Consistency (P1) over Mate Alignment (P2). This ensures that full siblings are always aligned to the same generation. -
visped()edge highlighting: Fixed edge highlighting logic so relationship edges are only emphasized whentraceis used. - Shared-parent/shared-child paths: Corrected edge highlighting for cases where a parent has multiple families or a family has multiple children.
-
visped()layout: Fixed layout optimization failure whenshowf = TRUE. The layout algorithm now correctly uses immutable individual IDs.
Changes in version 1.0.0 released on 24 Jan 2026
API Standardization (BREAKING)
To provide a clean and intuitive API for v1.0.0, core function names and behaviors have been standardized: - pedmatrix is renamed to pedmat. - pedmat default method is now "A" (Additive Relationship Matrix). Previously it was "f" (Inbreeding Coefficients). - expand_pedmatrix is renamed to expand_pedmat. - summary_pedmatrix is renamed to summary_pedmat. - The parameter n_threads is standardized to threads across all functions. - Legacy function names (pedmatrix, etc.) have been removed. Please use pedmat() directly.
New Features
-
Family Assignment and Summary:
-
tidyped()now automatically assigns and includes aFamilycolumn, identifying full-sib groups. -
summary.tidyped()has been updated to provide family statistics (count, sizes, top largest families) and richer offspring analysis.
-
-
Pedigree Splitting (
splitped): Addedsplitped()function to detect and split disconnected pedigree components. It efficiently identifies independent sub-populations (connected components) using graph theory, excludes isolated individuals, and returns a list of re-indexedtidypedobjects ready for separate analysis or visualization. -
Comprehensive Matrix Support:
pedmat()(formerlypedmatrix) now fully supports 6 types of genetic relationship matrices: Additive (A, Ainv), Dominance (D, Dinv), and Additive-by-Additive Epistatic (AA, AAinv). -
Relationship Matrix Visualization (
vismat): Addedvismat()function for visualizing relationship matrices (A, D, AA, etc.) with heatmaps and histograms. It supportspedmatobjects,tidypedobjects (auto-calculates A matrix), and standard matrices. Heatmaps can be annotated with family groups when a pedigree is provided.
CRAN Submission & Internal Improvements
This release marks the first stable version 1.0.0, polished for CRAN.
-
Portable Compilation: Standardized
src/Makevarsfor cross-platform compatibility (removed GNU/platform-specific extensions). -
Dependencies: Moved
RcppArmadillotoLinkingToto optimize package structure. -
Documentation & S3: Fixed
vignettegeneration, resolveddiagS3 method dispatch, and cleaned up documentation for CRAN compliance.
Changes in version 0.7.3 released on 13 Jan 2026
New behavior (BREAKING)
-
Simplified
pedmatrix()return and single-method enforcement:pedmatrix()now requires a singlemethodargument (e.g.,method = "A").When a single method is requested, the function returns the corresponding matrix or vector directly (not a named list). Requesting multiple methods in one call will now raise an error. Use repeated calls for multiple outputs.
New features
-
High-Performance Genetic Relationship Calculations: Introduced
pedmatrix()function implemented in Rcpp for efficient computation of:- Additive relationship matrix (A) using the tabular recursive algorithm.
- Sparse inverse additive matrix (A-Inverse) using Henderson’s rules.
- Dominance matrix (D) using the tabular approach.
- Inbreeding coefficients (f) using the Meuwissen & Luo (1992) path-tracing algorithm.
Improvements
-
Default Inbreeding Calculation Method: The
inbreed()function now uses the native Rcpp implementation by default, moving thenadivpackage toSuggests. - Documentation and Website: Updated package documentation and vignettes to reflect new features and improvements. The official package website is available at https://luansheng.github.io/visPedigree/.
Changes in version 0.7.2 released on 12 Jan 2026
New features
-
Flexible Generation Assignment: Added
genmethodparameter totidyped(). Users can now choose between"top"(top-aligned, default) and"bottom"(bottom-aligned) methods for generation inference.- The
"top"method aligns founders at Generation 1, which is more appropriate for biological pedigrees and prevents “founder drift” in pedigrees with varying depths. - The
"bottom"method aligns terminal nodes at the bottom, useful for visualizing introductions of unrelated exogenous parents.
- The
Improvements
-
Default Logic Change: Switched the default generation assignment method to
"top"(top-down) for more intuitive biological visualization. - Pkgdown Documentation: Generated and published the official package website at https://luansheng.github.io/visPedigree/.
- Automated CI/CD: Added GitHub Actions workflow for automatic documentation updates and deployment via GitHub Pages.
Changes in version 0.7.1 released on 11 Jan 2026
CRAN release: 2026-01-21
Performance optimizations
-
Large Pedigree Performance: Optimized
vispedperformance for displaying large pedigrees through efficient attribute handling and vectorized rendering. Computation time for 100k+ individuals reduced significantly by avoiding redundantigraphattribute lookups. -
Vectorized Tracing: Refactored
trace_ped_candidatesintidypedto use vectorizedigraph::neighborhoodcalls, achieving ~150x speedup for large candidate lists (e.g., 37k candidates in a 178k individual pedigree traced in ~1.2s). -
Early Filtering: Implemented unified early filtering of isolated individuals (Gen 0) in
prepare_ped_graphto streamline downstream graph conversion and layout algorithms.
Improvements
- User Feedback: Standardized filtering notifications. The message “Note: Removed N isolated individuals…” now appears consistently for all pedigree sizes when Gen 0 individuals are present.
-
Refined Tracing: Corrected
trace = "all"logic in bothtidypedandvisped. It now correctly retrieves the union of ancestors and descendants (“up” + “down”) instead of the entire connected component (undirected search).
Changes in version 0.7.0 released on 10 Jan 2026
Breaking changes & Major Refactoring
-
Graph-based
tidypedCore: Reimplemented the pedigree tidying engine using formal graph theory principles (Directed Acyclic Graphs). Improved loop detection and generation inference accuracy using topological sorting. -
Modular Architecture: Split the monolithic
visped.Rinto functional modules:visped_layout.R,visped_graph.R,visped_style.R, andvisped_render.Rfor better maintainability.
New features
-
New Parameters in
visped():-
pagewidth: Allows users to specify the PDF page width (default 200 inches) to accommodate different pedigree scales. -
symbolsize: A scaling factor (default 1) to adjust node sizes relative to label dimensions, providing finer control over whitespace.
-
-
Two-Pass Rendering Engine: Introduced a two-pass strategy in
plot_ped_igraph()to ensure edges connect exactly at node centers, eliminating visual gaps in vector PDF outputs. -
Enhanced Highlighting: Added support for real-time ancestry and descendant highlighting via the
traceparameter invisped().
Bug fixes
- Fixed rendering failure in
outline = TRUEmode by correcting attribute indexing in the graph object. - modernized the unit testing suite to
testthat3rd edition, removing all legacycontext()warnings. - Improved coordinate calculation precision to prevent overlapping in high-density generations.
Changes in version 0.6.2 released on 01 Jan 2026
New features
- Added
summary()method fortidypedobjects to provide quick pedigree statistics (number of individuals, founders, sex distribution, etc.).
Changes in version 0.6.1 released on 30 Dec 2025
New features
- Implemented opaque highlighting effects for better visualization clarity.
- Added
traceoption tovisped()to control ancestry tracing direction.
Changes in version 0.6.0 released on 28 Dec 2025
New features
- Implemented strict S3 class structure for
tidypedobjects withnew_tidyped()constructor andvalidate_tidyped()validator to ensure data integrity.
Changes in version 0.5.0 released on 26 Dec 2025
New features
- Added
highlightparameter tovisped()function. Users can now highlight specific individuals using a character vector of IDs or a list for custom colors. - Added
showfparameter tovisped()function to display inbreeding coefficients on the pedigree graph. - Added
inbreedparameter totidyped()function to calculate inbreeding coefficients using thenadivpackage. - Refactored
inbreed()function as a standalone tool that operates ontidypedobjects. - Optimized
repeloverlap()function usingdata.tablefor significantly better performance.
Bug fixes
- Fixed a critical crash in
visped()when combiningcompact = TRUE,highlight, andshowf = TRUEby refactoringped2igraph()to delay label modification until after layout calculation. - Fixed documentation grammar and phrasing across all functions for CRAN compliance.
- Fixed
R CMD checknotes related todata.tablenon-standard evaluation by addingR/globals.R.
Changes in version 0.2.5 released on 25 Feb 2020
Bug fixes
- The tidyped() does not work with trace=‘all’ in certain cases
