R package for analyzing and visualizing nanopore tRNA sequencing data.
At session start:
- Review
R/directory to understand existing patterns before adding code
Before creating new functions:
- Check existing files in
R/for similar functionality - Follow established patterns (see Code Style section below)
- Add to existing files when appropriate rather than creating new ones
Before committing:
-
devtools::document()- regenerate documentation -
devtools::test()- all tests pass -
devtools::check()- no errors or warnings - New exported functions have roxygen2 documentation
- NAMESPACE updated if exports changed
At session end:
- Commit all changes with descriptive message
File size limits:
- No files > 5MB to git
- Small sample data (
.pod5,.bam, etc.) OK ininst/extdata/if < 1MB - Large test data should be hosted externally and downloaded
Repository: https://github.com/rnabioco/clover Organization: RNA Bioscience Initiative, University of Colorado Anschutz Status: Active development (v0.0.0.9000)
clover provides tools for:
- Differential expression analysis of tRNAs
- Base-calling error rate analysis and visualization
- tRNA modification detection and comparison
- Visualization including heatmaps and secondary structure diagrams
The package uses SummarizedExperiment::RangedSummarizedExperiment to store:
counts: Expression levels per tRNAbcerror: Base-calling error rates per tRNA and position- Reference sequences (FASTA)
- Modification annotations
- Documentation: roxygen2 with markdown support
- Testing: testthat (edition 3)
- Vignettes: Quarto and knitr
- Website: pkgdown with rbitemplate
- Formatting: Posit AIR
# Install dependencies
pak::pak("rnabioco/clover")
# Build documentation
devtools::document()
# Run tests
devtools::test()
# Check package
devtools::check()
# Build pkgdown site
pkgdown::build_site()devel: Main development branch (CI target)- Feature branches for new work
- Use tidyverse style (dplyr, tidyr, ggplot2)
- roxygen2 for all exported functions
- S4 classes extend Bioconductor base classes
- Pipe-friendly function design
- All exported functions require roxygen2 documentation
- Include
@param,@return,@export, and@examplestags - Use markdown in roxygen comments (
Roxygen: list(markdown = TRUE))
# Exported function with roxygen2
#' Brief description
#'
#' @param arg description
#' @return description
#' @export
#' @examples
#' example_code()
function_name <- function(arg) {
# implementation
}- SummarizedExperiment
- Biostrings
- dplyr, tidyr, readr, ggplot2, forcats
Tests live in tests/testthat/. Run with:
devtools::test()
testthat::test_file("tests/testthat/test-specific.R")R/ # Source code
man/ # Generated documentation (do not edit)
tests/testthat/ # Unit tests
vignettes/ # Quarto vignettes
inst/extdata/ # Example data files
pkgdown/ # Website configuration
GitHub Actions workflows:
R-CMD-check.yaml: Package checks on Ubuntu (R devel + release)pkgdown.yaml: Documentation site deployment