@@ -10,9 +10,14 @@ OneRoof is a Nextflow-based bioinformatics pipeline for base-calling, variant-ca
1010
1111### Development Environment Setup
1212``` bash
13- # Install pixi and/or set up environment
13+ # For environments with conda dependencies (full pipeline)
1414pixi install --frozen
1515pixi shell --frozen
16+
17+ # For PyPI-only environments (Python development)
18+ uv venv
19+ source .venv/bin/activate # or .venv\Scripts\activate on Windows
20+ uv sync
1621```
1722
1823### Running the Pipeline
@@ -42,24 +47,33 @@ nextflow run . -profile containerless [options]
4247ruff check . --exit-zero --fix --unsafe-fixes
4348ruff format .
4449
50+ # Run Python tests (using uv for speed)
51+ uv run pytest bin/test_* .py
52+ # Or run tests with tox for multiple environments
53+ tox
54+
4555# Build documentation
46- just docs # or: quarto render docs/index.qmd
56+ just docs
57+
58+ # IMPORTANT: Modifying README.md
59+ # The README.md in the project root is generated from docs/index.qmd
60+ # NEVER edit README.md directly - it will be overwritten
61+ # Always edit docs/index.qmd and re-render:
62+ just make-readme # or: just docs
4763
4864# Docker operations
4965just docker-build
5066just docker-push
5167```
5268
53- Note: A test suite is planned but not yet implemented.
54-
5569## Architecture
5670
5771### Directory Structure
5872- ` main.nf ` - Main workflow entry point that orchestrates platform-specific workflows
5973- ` workflows/ ` - Platform-specific workflows (nanopore.nf, illumina.nf)
6074- ` subworkflows/ ` - Reusable workflow components (alignment, variant_calling, primer_handling, etc.)
6175- ` modules/ ` - Individual process definitions for tools (dorado, minimap2, ivar, etc.)
62- - ` bin/ ` - Python utility scripts for data processing and analysis
76+ - ` bin/ ` - Python utility scripts with PEP 723 inline dependencies (fully portable with uv)
6377- ` conf/ ` - Configuration files for different platforms and tools
6478
6579### Key Workflow Components
@@ -74,7 +88,7 @@ Note: A test suite is planned but not yet implemented.
7488### Technology Stack
7589- ** Workflow Engine** : Nextflow DSL2
7690- ** Container Support** : Docker, Singularity/Apptainer
77- - ** Environment Management** : Pixi (combines conda and PyPI dependencies)
91+ - ** Environment Management** : Pixi (combines conda and PyPI dependencies), UV (fast Python package management)
7892- ** Languages** : Nextflow (Groovy), Python 3.10+
7993- ** Key Tools** : Dorado (basecalling), minimap2 (alignment), ivar/bcftools (variants), FastQC/MultiQC (QC)
8094
@@ -90,9 +104,40 @@ Note: A test suite is planned but not yet implemented.
90104- ` --downsample_to ` : Manages computational resources by limiting coverage depth
91105- ` --model ` : Nanopore basecalling model (defaults to sup@latest)
92106
107+ ## Dependency Management
108+
109+ ### Python Package Management
110+ - ** Always use ` uv ` instead of ` pip ` ** for any Python package installation - it's significantly faster and more reliable
111+ - ** Use ` uv ` for PyPI-only environments** : When working with Python scripts that only need PyPI dependencies
112+ - ** Use ` pixi ` for mixed environments** : When conda dependencies are required (e.g., for the full pipeline)
113+ - ** Script execution** : Always use ` uv run ` instead of ` python3 ` to execute Python scripts
114+ ``` bash
115+ # Good - uses inline dependencies from PEP 723 headers
116+ uv run bin/some_script.py
117+
118+ # Avoid - doesn't guarantee dependencies
119+ python3 bin/some_script.py
120+ ```
121+ - ** Portable scripts** : All scripts in ` bin/ ` include PEP 723 inline dependencies, making them fully portable with uv
122+ - ** Benefits** : This approach eliminates dependency hell in Python by ensuring consistent, reproducible environments
123+
124+ ### Testing Infrastructure
125+ - ** Comprehensive test coverage** : Python scripts in ` bin/ ` have extensive test coverage using pytest
126+ - ** Test execution** : Tests can be run quickly with UV for PyPI-only environments
127+ ``` bash
128+ # Run all tests
129+ uv run pytest bin/test_* .py
130+
131+ # Run specific test
132+ uv run pytest bin/test_specific_module.py
133+ ```
134+ - ** CI/CD** : The continuous integration pipeline uses UV instead of pip for improved speed and reliability
135+ - ** Test organization** : Test files follow the pattern ` test_*.py ` and are colocated with the scripts they test
136+
93137## Development Notes
94138
95- 1 . ** Testing Considerations ** : The project prioritizes modularity to facilitate future test implementation
139+ 1 . ** Testing** : Python scripts have comprehensive test coverage; Nextflow workflow tests are planned for future implementation
961402 . ** GPU Requirements** : Nanopore basecalling requires CUDA-capable GPUs
971413 . ** Memory Management** : Use ` --low_memory ` flag for resource-constrained environments
981424 . ** Slack Integration** : Optional alerts can be configured for pipeline completion
143+ 5 . ** Dependency Management** : Always use ` uv ` for Python operations to ensure fast, reliable dependency resolution
0 commit comments