NEWS
ggpedigree 1.2.0.90
ggpedigree 1.2.0.9
Quality of life improvements
- Optimizing implemention of pedigree alignment functions from kinship2
- Added unit tests for the pedigree alignment functions
- renamed
FOO_na_value to FOO_na_color to reflect that it is to provide the color used for NA values in the plot, rather than a value to replace NAs in the data. This is more consistent with ggplot2's naming conventions and avoids confusion about whether the function is modifying the data or just the plot aesthetics.
- Added config cleanup to remove excessive commas in the config list, which can cause issues with parsing and readability.
New features
- Added
founder_order_seed config option to shuffle the pedigree row order before passing to kinship2. Because kinship2 processes founders in the order they appear, different shufflings produce different lateral placements. Set to an integer (e.g. 42) to get a specific reproducible alternative layout; NULL (default) preserves the original order.
- Added
founder_order_tries config option (default 1) to automatically search for a compact layout. When greater than 1, the function evaluates that many row-order shufflings (using seeds founder_order_seed + 0, 1, … or 1, 2, … when no seed is given), scores each layout, and returns the best result.
- Added
layout_score_method config option to control how candidate layouts are scored during a founder_order_tries search. Four methods are available — all lower-is-better:
"parent_stub" (default): sum of |x_fam - x_pos| across all placed individuals. Fast O(n) measure of total diagonal parent-stub length.
"crossings": count of crossing parent-stub segment pairs within each generation. Two stubs cross when the lateral order of children is reversed relative to their parent midpoints. O(n²) per generation but fast for typical pedigree sizes.
"duplications": number of individuals kinship2 had to place twice (extra = TRUE rows). Each duplication creates a self-loop connection in the plot; fewer duplications is better.
"twin_penalty": sum of intruder positions separating co-twins within their generation row. If N twins are all adjacent the penalty is 0; each non-twin slot placed between them adds 1. Twins in different generation rows receive a heavy flat penalty.
"composite": weighted combination parent_stub + 10 × crossings + 20 × twin_penalty + 100 × duplications. Penalises duplications most heavily, then twin separation, then crossings, then stub length. Good default when you have no strong preference about which aspect to optimise.
- Added renumberPedigreeIDs function to renumber pedigree IDs in a consistent way. This can help with plotting and analysis when IDs are non-numeric or not in a convenient order. The function also updates the parent-child relationships accordingly.
- Added
fixed_positions config option to pin specific individuals to exact layout slots, overriding the computed layout. Pass a data frame with an ID column (matching personID) plus x and/or y columns; positions are in raw layout-slot units so they compose with generation_width/generation_height scaling and radial layouts. Because connection anchors are derived from the (possibly pinned) coordinates, segments follow automatically. fixed_positions_update_family (default TRUE) controls whether pinning a parent also moves their children's parent-connector.
- Added
segment_lineage_* config options to color connecting segments by family lineage (e.g., paternal, maternal, or mitochondrial lines). Set segment_lineage_include = TRUE and choose a segment_lineage_component. Supplying segment_lineage_focal_personID traces the lines connected to one focal individual. Lineage-colored segments can be combined with node focal_fill via the suggested ggnewscale package (independent color scales); without it, the plot falls back to fixed segment colors with a warning.
Bug fixes
- Fixed
reduce_variables = FALSE breaking lineage-colored segments. When all pedigree columns were carried forward through calculateConnections(), a subsequent join in ggpedigreeCore.R created .x/.y suffix duplicates of segment_lineage, causing .addSegmentLayer() to silently skip lineage coloring. The join is now guarded, and calculateConnections() uses union() to expand the selected columns once rather than re-joining at the end.
- Fixed
x_fam = NaN for unplaced individuals (nid = NA). kinship2 returns a NaN position for individuals it cannot place; the condition that zeros out family coordinates now also catches parent_fam = NA (in addition to parent_fam == 0).
- Fixed long diagonal spouse segments caused by kinship2 placing a founder in the wrong generation row. This happens when a couple's only shared child is unplaced (
nid = NA), so kinship2 has no generation constraint for one parent and assigns them to a different row than their spouse. A new post-processing step (.repositionCrossGenerationSpouses()) detects this pattern and moves the misplaced founder to be adjacent to their spouse, producing a short horizontal spouse segment instead of a long diagonal one. Founders with placed descendants are never moved.
ggpedigree 1.2.0 (2026-05-30)
New features
- Added more flexibility to overlays, including support for shape-mode overlays with custom numeric codes and colors.
- Added a new vignette section to explain the clinical preset and its features.
- Add polar coordinates option to ggPedigree and ggPedigreeInteractive
- Enable support for adding variables to segments in ggPedigree and ggPedigreeInteractive with the config setting of "reduce_variables". Setting this to FALSE allows for custom coloring, styling of segments, and use of ggplot2's aesthetics for segments. (Note: this is an advanced feature that requires familiarity with ggplot2's aesthetics and may not be suitable for all users or datasets. It can be used to create more customized and informative pedigree plots, but may require additional configuration and testing to ensure that the segments are displayed correctly. Use with caution and reach out to the maintainers if you have questions or need assistance with this feature.)
Bug fixes
- Fixed multi-overlay closure bug where all overlays were filtered on the last column in the list due to R's lazy evaluation of function arguments. Local variable assignment now forces evaluation at the correct loop iteration.
- Fixed
preset (e.g., "clinical") not being forwarded to getDefaultPlotConfig() in ggPedigree() and ggPedigreeInteractive(), which meant preset-driven settings like overlay_mode = "shape" and overlay_include = TRUE were silently ignored.
- Fixed tile_color_palette not being applied to ggRelatednessMatrix. Instructions were out of date.
- Fixed minor issues with ggRelatednessMatrix documentation and examples.
- Fixed minor issues with ggPhenotypebyDegree documentation and examples.
ggpedigree 1.1.1.1 (2026-03-16)
- Hotpatch to fix plotly vignette selectively failing by using tryCatch to catch the error and print a warning instead of failing the whole vignette build.
- Also increased test coverage of kinship2_pedigree.
ggpedigree 1.1.1.0
cran submission
- Add scale label size by pedigree size option
- Making the sexVar variable more robust
- Add implemented CodeFactor recommendations for styling and maintainability
ggpedigree 1.1.0.3 (2026-01-11)
API notes
- Documented
ggPedigree() / ggPedigreeInteractive() / ggRelatednessMatrix() as canonical entry points while retaining backward-compatible aliases.
New data
- Added a preliminary Wars of the Roses pedigree dataset.
- Improved dataset documentation.
- Tweaked the GoT dataset example for improved clarity.
- Split the squirrel dataset into smaller pedigrees for testing.
New features
- Added a greyscale option to
color_theme.
- Added automatic point scaling based on pedigree size.
- Added optional segment size scaling based on pedigree size.
- Hid the Sex key by default in
ggpedigree.
- Added two vignettes describing
ggpedigree configuration options.
- Cross-referenced vignettes in function documentation.
Validation and messages
- Performed required-column checks earlier in
ggpedigree(), including sex.
- Improved errors for invalid or non-standard
sex coding.
- Improved the warning message used in
tryCatch().
- Made
code_male handling more resilient when using config values.
Bug fixes
- Standardized naming by replacing
midparent with mid_parent.
- Fixed inconsistent handling of character vs numeric IDs.
Internal changes
- Changed default colors and sizes for better visibility.
- Saved raw Excel inputs as CSV for non-proprietary storage.
- Refactored
kinship2 internals for maintainability.
- Refactored node-adding internals.
- Remove reshape2 dependency
- Deprecating plotPedigree function in favor of kinship2_plotPedigree
Testing
- Expanded tests for ID and sex-code inputs, including type, missingness, and configuration scenarios.
ggpedigree 1.0.0.1 (2025-11-30)
cran resubmission
- Fixed a minor documentation issue with a URL whose certificate had expired.
ggpedigree 1.0.0
cran submission
- Integrated kinship2 functions to remove the dependency
- Made kinship2 package optional, required for plotPedigree (a kinship2 wrapper)
- Importing relevant tests from kinship2 package
- Updated documentation to reflect changes
- Refactored code to improve maintainability
- Added more unit tests for the new functions
- Add max_message_n to pedigree function to allow users to get more messages about pedigree complexity
ggpedigree 0.9.1
- Minor documentation revisions to complement JOSS paper update
- Added test coverage for buildSpouseSegments
ggpedigree 0.9.0 (2025-09-12)
cran release
- smarter segment coloring
- added setting to hide legend for sex
- avoided sapply() in ggPedigreeInteractive
- added subfunction for adding twins
- add non-dot versions of internal functions for evaluating complexity
- added alpha settings
- added compatibility with pedigree objects from kinship2
- exposed code_female, code_na to config
- added tests for kinship2 compatibility
- Updated JOSS paper
- Refactored step 2+3 of the ggpedigree function to .transformPed()
- Renamed p variable as plotObject in ggpedigree subfunctions
- Smarter implementation of aliases
- Updated hex to actually use ggpedigree
- Exposed 'relations' and 'hints' inputs to ggpedigree
- Added more intuitive defaults
- refactor calcCoordinates with alignPedigreeWithHints and alignPedigreeWithRelations
- Vectorized part of calcCoordinates
- removed redundant plotPedigree verbose section
- add log2 option for relatedness
- Improve plotly conversion
ggpedigree 0.8.0 (2025-07-04)
joss paper submitted
- Makes ggrepel a suggested package instead of a required one.
- Make connections included in the plot by default.
- Expose linejoin in ggRelatednessMatrix
- Expose outline_additive and outline_alpha to ggpedigree
- Refactored the ggpedigree function to improve readability and maintainability.
- Transferring ASOIAF data from BGmisc to ggpedigree
ggpedigree 0.7.1
- Fixed focal_fill ID indexing to row order instead of ID order.
- Fixed bug in using fam_x and fam_y in with generation_height
- Add option to add phantom parents to the pedigree plot.
- Alerts when duplicate or bad configs appear
- Make palleter suggested instead of required
ggpedigree 0.7.0 (2025-06-09)
- Changed the default behavior of
ggPedigree to use x_fam and y_fam for positioning families, rather than x_mid_parent and y_mid_parent. This change improves visualization of pedigrees with many families.
- Changed the get midpoint of curvature to better approximate geom_curv behavior.
- reduced redundancy in code base by not calculating the parent midpoints when not needed.
- Added default_config support for ggRelatednessMatrix functions.
ggpedigree 0.6.1
- Transferred
plotPedigree() function from BGmisc to ggpedigree.
ggpedigree 0.6.0
- Implemented fill by matID, patID using various scales, such as hue, viridis, and others.
- Added support for emojis in the
ggpedigree function.
- Solved the bug that created excessive branches
- Made the twin sibling segments smarter
- Adding more debug support
ggpedigree 0.5.1
- Fix tooltip appearing in
ggPedigreeInteractive when tooltip_include is FALSE.
ggpedigree 0.5.0
- Added segment_linetype and custom affected labels to the
ggpedigree function.
- Added usage of color_palette to the
ggpedigree function.
- Added curvature option to the
ggpedigree function.
- Add support for custom affected labels for affected individuals in the
ggpedigree function.
- Add support for removing diagonal, upper triangle, and lower triangle in the
ggRelatednessMatrix function.
- Add support for labeling tiles
- Added new tests for the
ggRelatednessMatrix function.
- Added new phenotype plotting function
ggPhenotypebyDegree to visualize phenotypes by degree of relatedness.
- Added new vignette to explain
ggPhenotypebyDegree.
- Added a new function
getDefaultPlotConfig to set default configuration options for the package.
- Harmonized the configuration options across the package to use
getDefaultPlotConfig and buildPlotConfig
- Added unit tests for
getDefaultPlotConfig and ggPhenotypebyDegree
- Added workaround for plotly non-support for geom_curve with computeCurvedMidpoint
- Adding fully twin plotting features
- Added ability to fill colors as a function of the degree of relatedness to a focal person
- Add getDefaultPlotConfig functionality to ggPhenotypebyDegree
- Fully documented getDefaultPlotConfig so that each config option is clear and understandable.
ggpedigree 0.4.1 (2025-05-26)
Status: Submitted to CRAN
- Fixed a bug in the
ggpedigree function that caused an error when using a custom ID name and requesting the plot as a ggplot object.
ggpedigree 0.4.0 (2025-05-23)
- Allows support for character-based IDs
- Added linejoin, lineend, segment_self_linetype, option to the
ggpedigree functions.
- Added unit tests for calculateConnections and ggpedigree functions.
- Refactored ggpedigree function into ggpedigree.core and .addScales and .addLabels functions to improve readability and maintainability.
- Renamed symKey to makeSymmetricKey, extended it to support character-based IDs, and added unit tests.
- Added a new function
ggPedigreeInteractive to create interactive pedigree plots using plotly. Added a vignette to show its usage.
- Added redsquirrels dataset to the package for testing and examples.
- Added a new function
ggRelatednessMatrix and subfunction ggRelatednessMatrix.core to create heatmaps of relatedness matrices.
- Added new vignette to explain ggRelatednessMatrix
- Added graphic tests for
ggpedigree, ggPedigreeInteractive, and ggRelatednessMatrix functions.
- Updated the README and vignettes to reflect the new features and improvements.
- Updated description to meet CRAN policies.
ggpedigree 0.3.0
- Expose more labeling options in the
ggpedigree function to allow for more customization, including nudging labels, and changing the variable used.
- Added option to add an outline to the pedigree plot.
- Made the config options more consistent and user-friendly.
- Enhance the narrative of the plotting vignette to explain the new features and provide clearer examples.
- Added missing examples to the
ggpedigree function documentation.
ggpedigree 0.2.0
- Extended functionality to include new plotting features, like handling repeated instances of the same individual in a pedigree.
- Improved documentation and examples for better user guidance.
- Added unit tests for describeHelpers
ggpedigree 0.1.0
- Implemented pedigree plotting functions for
ggplot2.
- Added vignette to explain the use of the package in basic plotting.
- Created a
DESCRIPTION file to define the package and its dependencies.
- Added a
LICENSE file to specify the terms under which the package applies.
- Created a
CODE_OF_CONDUCT.md file to outline the expected behavior of contributors and maintainers.
- Added a
NEWS.md file to track changes to the package.
- Created a
CONTRIBUTING.md file to guide contributors on how to contribute to the package.
- Added a
README.Rmd file to provide an overview of the package and its functions.
- Added a
cran-comments.md file to document the submission process to CRAN.
- Initial version launched