Skip to content

Commit

Permalink
Merge pull request #170 from uclahs-cds/danknight-siblings-bug
Browse files Browse the repository at this point in the history
Fix polygon siblings issue
  • Loading branch information
dan-knight authored Mar 3, 2025
2 parents 2cc38e7 + be4c335 commit 1529dbf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"),
person("Adriana Salcedo", role = "aut"),
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CancerEvolutionVisualization 3.0.0 (2025-01-06)
# CancerEvolutionVisualization 3.0.0 (2025-01-07)

## Added
* Dendrogram mode
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions R/calculate.clone.polygons.R
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 1529dbf

Please sign in to comment.