Skip to content

Dev#152

Merged
smasongarrison merged 15 commits intomainfrom
dev
Mar 23, 2026
Merged

Dev#152
smasongarrison merged 15 commits intomainfrom
dev

Conversation

@smasongarrison
Copy link
Copy Markdown
Member

This pull request introduces significant enhancements to the ggpedigree package, 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 overlays parameter, 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 preset parameter. (R/defaultPlotConfig.R, [1] [2] [3]

  • Added new arguments to ggPedigree and 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:

  • Ensured that the preset parameter is properly forwarded to getDefaultPlotConfig() in both ggPedigree and ggPedigreeInteractive, so preset-driven settings like overlay_mode = "shape" and overlay_include = TRUE are respected. (R/ggpedigree.R, R/ggPedigreeInteractive.R, [1] [2]

Documentation and versioning:

  • Updated documentation for new parameters and overlay system, and incremented the package version to 1.1.1.9. A new vignette was added to explain the clinical preset and its features. (DESCRIPTION, NEWS.md, [1] [2]

Most important changes:

Overlay system improvements

  • Added overlays parameter 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]
  • Enhanced overlay configuration with overlay_mode, overlay_size, and overlay_stroke options, supporting both "alpha" and "shape" overlay modes. [1] [2] [3]

Clinical pedigree styling

  • Introduced new clinical styling options and the "clinical" preset, enabling affected fill, outline color, and shape overlays for clinical pedigree visualization. [1] [2] [3]
  • Added new arguments (affected_fill_column, outline_color_column) to ggPedigree and core functions for greater plot customization. [1] [2]

Configuration and bug fixes

  • Ensured the preset parameter is correctly forwarded to configuration functions in both static and interactive plots, so preset-driven settings are applied. [1] [2] [3]
  • Fixed bug where overlays were filtered on the last column due to R's lazy evaluation, ensuring correct overlay rendering for each specification.

Documentation and version update

  • Updated documentation for all new parameters and overlay features, and bumped package version to 1.1.1.9. [1] [2]

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).
@smasongarrison smasongarrison requested a review from Copilot March 19, 2026 03:51
@smasongarrison smasongarrison linked an issue Mar 19, 2026 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 19, 2026

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in ggPedigree()/core to render multiple independent overlay layers, including a new shape-based overlay mode.
  • Introduced clinical styling controls via affected_fill_column and outline_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.

Comment thread tests/testthat/test-clinicalPedigree.R Outdated
Comment thread R/defaultPlotConfig.R Outdated
Comment thread R/ggpedigreeCore.R
plotObject <- plotObject + ggplot2::labs(
shape = if (isTRUE(config$sex_legend_show)) config$sex_legend_title else NULL
)
return(plotObject)
Comment thread R/ggpedigreeCore.R Outdated
Comment thread tests/testthat/test-clinicalPedigree.R
Comment thread tests/testthat/test-clinicalPedigree.R Outdated
Comment thread tests/testthat/test-clinicalPedigree.R Outdated
Comment thread man/getDefaultPlotConfig.Rd Outdated
Comment thread R/defaultPlotConfig.R Outdated
smasongarrison and others added 2 commits March 18, 2026 23:58
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
smasongarrison and others added 6 commits March 19, 2026 10:57
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>
@smasongarrison smasongarrison merged commit ce101f0 into main Mar 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: clinical pedigree styling

2 participants