Project Templates

Starter projects for common workflows

These templates provide a consistent starting point for lab projects. Each includes:

Available Templates

Research Project

General-purpose template for data analysis projects.

R targets

Best for:

  • Exploratory data analysis
  • Statistical modeling
  • One-off analyses

Features:

  • Base R + data.table workflow
  • Package dependencies documented
  • Basic reporting with Quarto

Learn More → | GitHub

Methods Paper

Template for methodology papers with simulation studies.

R targets

Best for:

  • Methodology development
  • Simulation studies
  • Journal submissions

Features:

  • Dynamic branching over scenarios
  • Slurm/Longleaf integration
  • LaTeX/Quarto manuscript
  • Reviewer response tracking

Learn More → | GitHub

R Package Development

Standards for creating reusable R packages separate from paper repositories.

R

Best for:

  • Reusable methodology
  • Functions shared across projects
  • CRAN/Bioconductor packages

Features:

  • DESCRIPTION-based dependencies
  • Roxygen2 documentation
  • testthat testing
  • Reference: BATON package

Learn More → | GitHub | Reference: BATON

Quick Start

# 1. Clone the template
git clone git@github.com:rashidlab/template-research-project.git my-project

# 2. Remove template history
cd my-project
rm -rf .git
git init

# 3. Set up data directory (choose one)
# Option A: Symlink to lab storage (Longleaf)
ln -s /proj/rashidlab/my-project/data data

# Option B: Create local data folder (will be gitignored)
mkdir -p data/raw data/processed

# 4. Install dependencies
# In R:
# Install packages listed in DESCRIPTION or README

# 5. Run the example
targets::tar_make()

Common Files Across Templates

File Purpose
_targets.R Pipeline definition
config/ Project-specific + shared lab config (via symlinks)
R/ Reusable functions
.claude/CLAUDE.md Project guidance for Claude Code
README.md Project overview and reproduction instructions
.gitignore Excludes data/, results/, _targets/
ImportantData Storage Convention

Data files are never committed to repositories. Store data in /proj/rashidlab/<project>/data/ and use symlinks from your repo. See Data Management for details.

Consistency Framework

All templates include the consistency validation framework:

# Validate code-manuscript alignment
make validate-consistency

# Quick check during development
make validate-quick

Customizing Templates

After cloning:

  1. Update configconfig/settings.yml (methods paper) or config/config.yml (research project)
  2. Modify _targets.R to define your pipeline
  3. Add functions to R/ directory
  4. Update documentation in .claude/CLAUDE.md and README.md
TipKeep Templates Updated

Periodically check the template repos for improvements. You can cherry-pick useful changes into your project.