Dev#152
Merged
smasongarrison merged 15 commits intomainfrom Mar 23, 2026
Merged
Conversation
Treat preset == "clinical" as a greyscale theme and enable sex_shape_include for the clinical preset in getDefaultPlotConfig. Forward config$preset from ggPedigree when calling getDefaultPlotConfig so preset-specific defaults are applied. Update the clinical preset test to match the new defaults (remove redundant overlay_color).
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands {ggpedigree}’s customization capabilities by adding multi-overlay support (including shape-mode overlays) and introducing clinical-style rendering controls (affected fill + outline-by-column), along with preset forwarding and accompanying documentation/tests.
Changes:
- Added
overlays(list-of-specs) support inggPedigree()/core to render multiple independent overlay layers, including a new shape-based overlay mode. - Introduced clinical styling controls via
affected_fill_columnandoutline_color_column, plus new related config keys and a"clinical"preset. - Updated docs/vignette/tests and bumped package version.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
R/ggpedigreeCore.R |
Core implementation for multi-overlay rendering, new shape overlay helper, and clinical styling hooks in nodes/scales. |
R/ggpedigree.R |
Public API extended with overlays, affected_fill_column, outline_color_column; forwards preset into defaults. |
R/ggPedigreeInteractive.R |
Forwards preset into getDefaultPlotConfig() for interactive plots. |
R/defaultPlotConfig.R |
Adds new overlay-mode params and clinical styling defaults; implements "clinical" preset behavior. |
tests/testthat/test-clinicalPedigree.R |
New test coverage for clinical styling and overlay behavior. |
vignettes/articles/v11_configuration_extended.Rmd |
Adds documentation example for multiple overlays with per-overlay overrides. |
man/ggPedigree.Rd |
Documents new overlays, affected_fill_column, outline_color_column arguments. |
man/ggPedigree.core.Rd |
Documents new core parameters (overlays, clinical column args). |
man/ggPedigreeInteractive.Rd |
Clarifies overlay_column vs overlays. |
man/getDefaultPlotConfig.Rd |
Documents new config keys (overlay mode/size/stroke, clinical styling keys, preset). |
man/dot-addShapeOverlay.Rd |
New internal Rd for .addShapeOverlay(). |
man/dot-addScales.Rd |
Updates signature/docs for affected fill + outline color column scaling. |
man/dot-addNodes.Rd |
Updates signature/docs for affected fill + outline color column node rendering. |
man/dot-addOverlay.Rd |
Clarifies overlay_column vs overlays. |
NEWS.md |
Release notes for overlay flexibility, clinical vignette, and bug fixes. |
DESCRIPTION |
Version bump to 1.1.1.9. |
.gitignore |
Ignores /.claude. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| plotObject <- plotObject + ggplot2::labs( | ||
| shape = if (isTRUE(config$sex_legend_show)) config$sex_legend_title else NULL | ||
| ) | ||
| return(plotObject) |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant enhancements to the
ggpedigreepackage, focusing on greater flexibility for overlays, new clinical pedigree styling options, and improved configuration handling. It also fixes several bugs related to overlays and preset forwarding. The changes expand the customization options for pedigree visualization, especially for clinical use cases, and improve the robustness of overlay rendering.Major new features and enhancements:
Overlay flexibility and bug fixes:
Added support for multiple independent overlays via a new
overlaysparameter, allowing each overlay to have its own shape, color, and mode. Overlay rendering now supports both "alpha" (transparency) and "shape" (custom shapes, e.g., crosses for deceased) modes, with customizable shapes, colors, sizes, and strokes. The overlay system now correctly handles multiple overlays without lazy evaluation bugs. (R/ggpedigree.R,R/ggpedigreeCore.R,NEWS.md, [1] [2] [3] [4] [5] [6]Fixed a bug where all overlays were filtered on the last column in the list due to R's lazy evaluation, ensuring each overlay is rendered based on its correct column. (
NEWS.md, NEWS.mdR4-R11)Clinical pedigree styling and presets:
Introduced new configuration options and a "clinical" preset for standard clinical pedigree styling, including affected fill, outline color by column, and shape overlays for clinical markers. These options are now documented and can be enabled via the
presetparameter. (R/defaultPlotConfig.R, [1] [2] [3]Added new arguments to
ggPedigreeand core functions for specifying columns that control affected fill and outline color, further increasing plot customization for clinical and research use. (R/ggpedigree.R, [1] [2] [3]Configuration and preset handling:
presetparameter is properly forwarded togetDefaultPlotConfig()in bothggPedigreeandggPedigreeInteractive, so preset-driven settings likeoverlay_mode = "shape"andoverlay_include = TRUEare respected. (R/ggpedigree.R,R/ggPedigreeInteractive.R, [1] [2]Documentation and versioning:
DESCRIPTION,NEWS.md, [1] [2]Most important changes:
Overlay system improvements
overlaysparameter to support multiple independent overlays, each with customizable shape, color, size, stroke, and mode; fixed lazy evaluation bug in overlay rendering. [1] [2] [3] [4]overlay_mode,overlay_size, andoverlay_strokeoptions, supporting both "alpha" and "shape" overlay modes. [1] [2] [3]Clinical pedigree styling
affected_fill_column,outline_color_column) toggPedigreeand core functions for greater plot customization. [1] [2]Configuration and bug fixes
presetparameter is correctly forwarded to configuration functions in both static and interactive plots, so preset-driven settings are applied. [1] [2] [3]Documentation and version update