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-by-node control of node rendering ("nodeless" mode) #132

Closed dan-knight closed 2 months ago

dan-knight commented 2 months ago

Description

Allows node-by-node control of node ellipse drawing with a draw.nodes column in the tree input data frame. This was previously handled globally with an argument of the same name on SRCGrob. Also includes unit-tests and new examples in the package manual and User Guide vignette.

Example

nodeless <- data.frame(
    parent = c(
        NA, 1, 2, 2, 2, 
        3, 3, 3, 
        4, 4, 4, 4, 4, 
        5, 5, 5, 5
        ),
    draw.node = TRUE,
    spread = NA
    );
nodeless$spread[6:nrow(nodeless)] <- 0.6;
nodeless$draw.node[c(2, 6:nrow(nodeless))] <- FALSE;

grid.draw(SRCGrob(nodeless));
Screenshot 2024-08-02 at 12 13 55 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.

dan-knight commented 2 months ago

Looks good to me but I think there's some lint fixes to be done?

Fixed!