Skip to content

Commit

Permalink
Merge pull request #152 from uclahs-cds/hwinata-dendrogram-add-spread
Browse files Browse the repository at this point in the history
Use `spread` in dendrogram mode
  • Loading branch information
whelena authored Oct 14, 2024
2 parents 2742a44 + 41bd1a3 commit 0800654
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
* Set default parameters for heatmaps, defaulting to BPG defaults unless necessary
* Improved default node style

## Bug
* Resolved issue where the spread parameter was not applied in dendrogram mode.

# CancerEvolutionVisualization 2.0.1 (2023-11-17)

## Added
Expand Down
3 changes: 2 additions & 1 deletion R/angles.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ split.equal.x.dist <- function(
angle <- angles[tree$tip == child.id];
if (is.na(angle)) {
y <- tree$length[tree$tip == child.id];
angle <- atan((current.pos * dx.scale) / y);
pair.spread <- v$spread[v$id %in% child.ids[c(i - 1, i)]];
angle <- atan((current.pos * dx.scale * mean(pair.spread)) / y);
angles[tree$tip == child.id] <- angle;
}
idx <- idx + n.leaves;
Expand Down

0 comments on commit 0800654

Please sign in to comment.