diff --git a/DESCRIPTION b/DESCRIPTION index ab9d683..989ed63 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: CancerEvolutionVisualization Title: Publication Quality Phylogenetic Tree Plots Version: 3.0.0 -Date: 2025-01-06 +Date: 2025-01-07 Authors@R: c( person("Paul Boutros", role = "cre", email = "PBoutros@mednet.ucla.edu"), person("Adriana Salcedo", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 64ddc85..acf82f9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# CancerEvolutionVisualization 3.0.0 (2025-01-06) +# CancerEvolutionVisualization 3.0.0 (2025-01-07) ## Added * Dendrogram mode @@ -27,6 +27,7 @@ * Report the number of SNVs per clone in the legend for the clone-genome distribution plot. * Updated the user guide to reflect new features. * Fix bug where the x-axis only renders when y-axis is also rendered. +* Fix issue when creating polygons with more than 2 siblings ## Bug * Resolved issue where the spread parameter was not applied in dendrogram mode. diff --git a/R/calculate.clone.polygons.R b/R/calculate.clone.polygons.R index 3c73d1e..9e510db 100644 --- a/R/calculate.clone.polygons.R +++ b/R/calculate.clone.polygons.R @@ -140,14 +140,14 @@ position.polygons <- function( parent.angle <- atan(dist / par$len); } } else { - if (v$id == siblings$id[which.min(siblings$x.mid)]) { + if (vi$id == siblings$id[which.min(siblings$x.mid)]) { # Align leftmost child with left outer clone border parent.angle <- ifelse( is.null(fixed.angle), yes = atan(-(abs(par$x1) / par$len)), no = -(fixed.angle) ); - } else if (v$id == siblings$id[which.max(siblings$x.mid)]) { + } else if (vi$id == siblings$id[which.max(siblings$x.mid)]) { # Align rightmost child with right outer clone border parent.angle <- ifelse( is.null(fixed.angle),