uclahs-cds / package-CancerEvolutionVisualization

Publication Quality Phylogenetic Tree Plots
https://cran.r-project.org/web/packages/CancerEvolutionVisualization/
GNU General Public License v2.0
2 stars 0 forks source link

Extend node style functionality #76

Closed dan-knight closed 9 months ago

dan-knight commented 1 year ago

Description

Closes #75, #74, #77, #78, and #79. Also includes the below tree as a new end-to-end test case, which tests all new features in this PR.

Example

tree.input <- data.frame(
    parent = c(NA, 1, 2, 2),
    node.col = c(NA, 'grey75', 'red', 'grey75'),
    border.width = c(1, 1, 2, 2),
    border.type = c(1, 1:3),
    border.col = c(NA, 'black', 'black', 'blue')
    );

tree <- SRCGrob(tree.input);
grid.draw(tree);
Screenshot 2023-07-24 at 11 35 01 AM

Checklist

dan-knight commented 9 months ago

With the benefit of hindsight after doing more development on the edge style, I opted to remove the node.col parameter entirely. This will be consistent with other style settings, and doesn't change the user's workflow in any meaningful way.