How uclahs-cds/package-cancerevolutionvisualization works
Main Components
• Documentation and User Guides:
• README and MAN pages: Outline how the package is used and provide reference documentation.
• Vignettes: Detailed user guides and illustrative examples (UserGuide.Rmd and ManuscriptFigures.Rmd) that show how to utilize the package.
• Data Resources: The data folder contains pre-supplied datasets (e.g., GRCh37.rda, SNV.rda) that are probably used for testing or examples, showing the expected input types.
• Testing Suite: The tests directory (with testthat scripts and example datasets) comprises unit tests that ensure the functions work as expected.
• Build and Configuration Files: Files like DESCRIPTION, NAMESPACE, .Rbuildignore, metadata.yaml, and GitHub workflows under .github/workflows are instrumental for package configuration, building, and continuous integration.
Relationships and Interactions
• The core functions (in the R/ directory) form the computational engine. Other components like documentation and vignettes rely on these for describing functionality.
• The tests directory validates the behavior of core functions and demonstrates usage with various datasets.
• Data files serve as sample input to both the core functions and testing scripts.
• Build configurations (in DESCRIPTION, NAMESPACE, etc.) integrate the package with R’s package management system and continuous integration environments.
Architectural Patterns and Design Principles
• Modular Design: Functions are split into dedicated files for specific tasks (e.g., handling text, adjusting tree layouts, scaling branch lengths).
• Separation of Concerns: Visualization components, data handling, and test validation are clearly isolated in distinct folders.
• Reusability: By having standalone functions each with documentation, the package promotes reusability and clarity.