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

Node spread #125

Closed dan-knight closed 5 months ago

dan-knight commented 5 months ago

Description

Adds the spread column to the input tree dataframe, allowing node-by-node spread. This calculation is proportional to the automatically calculated angles, so a value of 1.5 will increase the distance between neighbouring nodes by 50%. Likewise, a value below 1 such as 0.85 will reduce the distances by 15%.

These changes also include updates to documentation and regression test cases.

Examples

Inner Node Spread

tree.input <- data.frame(
    parent = c(NA, 1, 1, 1, 1),
    spread = 1
    );
# Second child node from the left
tree.input$spread[3] <- 2;

grid.draw(
    SRCGrob(tree.input)
    );
Screenshot 2024-04-22 at 6 47 14 PM

Outer Node Spread

tree.input <- data.frame(
    parent = c(NA, 1, 1, 1, 1),
    spread = 1
    );
# Rightmost node
tree.input$spread[5] <- 2;

grid.draw(
    SRCGrob(tree.input)
    );
Screenshot 2024-04-22 at 6 48 36 PM

Mixed Spread

tree.input <- data.frame(
    parent = c(NA, 1, 1, 1, 1),
    spread = 1
    );
tree.input$spread[3:5] <- c(1, 0.5, 2);

grid.draw(
    SRCGrob(tree.input)
    );
Screenshot 2024-04-22 at 6 51 44 PM

Checklist

[^1]: UCLA Health reaches $7.5m settlement over 2015 breach of 4.5m patient records [^2]: The average healthcare data breach costs $2.2 million, despite the majority of breaches releasing fewer than 500 records. [^3]: Genetic information is considered PHI. Forensic assays can identify patients with as few as 21 SNPs [^4]: RNA-Seq, DNA methylation, microbiome, or other molecular data can be used to predict genotypes (PHI) and reveal a patient's identity.

  To automatically exclude such files using a .gitignore file, see here for example.