How amitfenn/dicast works
Project Type and Purpose
• DICAST is an open‐source, modular alternative‐splicing analysis framework.
• It integrates 11 splice‐aware mapping tools and 8 event‐detection tools in a unified pipeline, driven by Snakemake and Docker.
• It provides a CLI (Snakemake+Python), a minimal GUI wrapper (Python), an R simulation package (ASimulatoR), and unified‐output scripts in Python and R.
File Structure
• Top‐level directories:
• src/ ← source code for each mapping/event tool (Docker containers), R package, conda build
• scripts/ ← wrapper scripts: Snakemake workflows, shell helpers, unified‐output modules
• gui/ ← Python GUI scripts for configuration and launch
• docs/ ← Sphinx docs source & built HTML
• sample_input/ ← example data (FASTQ, BAM, GTF, reference FASTA)
• Key orchestration files:
• scripts/snakemake/Snakefile(.cli)
• scripts/snakemake/*_config.yaml/json
• Dockerfiles & ENTRYPOINT.sh under each src/<tool>
• Unified‐output module:
• scripts/unified_output/… (Python parsers & transformers)
• R package:
• src/ASimulatoR/… (R scripts, data, Dockerfile, renv)
Key README Insights
• Emphasis on modular integration of tools via containers.
• Snakemake config drives which tools run and how.
• A “uniform reporting standard” implemented by scripts/unified_output.
• Documentation built with Sphinx and deployed to ReadTheDocs.
Main Components
a. Frontend
• CLI layer: Snakemake engine + config files
• GUI layer: gui/dicast.py & dicast_config_setter.py
b. Containerized Tools (Microservices)
• Mapping tools (bbmap, hisat2, STAR, …)
• Event detection tools (MAJIQ, SplAdder, Whippet, …)
c. R Simulation Module
• ASimulatoR R package & its Docker container
d. Unified‐Output
• Python parsers & transformers consolidating per‐tool outputs
• Final consensus report generator
e. Data Stores
• Input: sample_input/ FASTQ, BAM, GTF, FASTA
• Intermediate: Snakemake workdir
• Output: per‐tool directories + unified report
f. Documentation
• Sphinx build process (docs/source → docs/build → ReadTheDocs)
Relationships and Data Flow
• User invokes:
[CLI or GUI] → loads YAML/JSON config → Snakemake
• Snakemake rule graph:
→ spins up Docker container for each selected mapping tool
→ mapping outputs (BAM/alignments) → feeds event‐detection containers
→ event outputs (tool‐specific event files)
• Unified‐output scripts read all event files → normalize to common format → consensus report
• ASimulatoR can be run independently (via its Docker) to generate simulated input data.
• Documentation pipeline is orthogonal: Sphinx builds docs from docs/source.
Architectural Patterns & Design Principles
• Microservices (each tool in its own Docker container).
• Workflow orchestration (Snakemake as directed acyclic graph).
• Separation of concerns:
• Configuration (YAML/JSON)
• Execution (Snakemake + Docker)
• Aggregation (Python unified‐output)
• Simulation (R package)
• Documentation (Sphinx).
• Extensibility: add a new tool folder under src/, supply Dockerfile + ENTRYPOINT + Snakemake rule.
Essential Elements
• Clear component labels (CLI, Snakemake, Mapping Containers, Event Containers, Unified Parser, Reports).
• Config files and sample_input as external inputs.
• Documentation Sphinx build side‐flow.