How hao-zou-lab/decepticonx works
Project Type and Purpose
• DECEPTICONx is an R/Bioconductor‐style open‐source tool (an R package) for pan‐cancer microenvironment deconvolution.
• It exposes a single top‐level API (run_DECEPTICONx) that integrates multiple deconvolution engines (BayesPrism, MuSiC, MuSiC2, monocle3, CIBERSORT/BSeqSC) and manages signature matrices.
File Structure
• Top‐level files:
• DESCRIPTION, NAMESPACE, LICENSE – standard R package metadata.
• README.md – usage instructions.
• CIBERSORT.R, DOCKER_codes.R, bseqsc_proportions.R, music_basis.R, music_prop.R – engine‐specific wrappers.
• R/ directory: core R functions (e.g. DECEPTICONx.R, run_DECEPTICONx.R).
• signature_matrix/: pre‐computed gene expression templates for six cell types and three engines.
• man/: documentation stubs for each public function.
Extract Architectural Insights from the README
• Inputs: bulk expression matrix + single‐cell data + subtype labels + optional custom template flag.
• Outputs: deconvolution results per cell type.
• Dependencies: external R packages (BayesPrism, MuSiC, monocle3, etc.) and optional Docker workflows.
Main Components & Interactions
a. User Interface Layer
• R console or script that calls run_DECEPTICONx.
b. Input Management
• File readers for bulk and single‐cell matrices.
• Subtype parsing (n×2 lookup).
c. Signature‐Matrix Module
• Loads built‐in templates from signature_matrix/.
• Optionally generates custom templates via DOCKER_codes.R.
d. Deconvolution Engines (modular subcomponents)
• BayesPrism wrapper (bayes_base.R).
• MuSiC & MuSiC2 wrappers (MuSiC2_base.R, music_basis.R, music_prop.R).
• monocle3 wrapper (monocle3_base.R).
• CIBERSORT/BSeqSC wrapper (CIBERSORT.R, bseqsc_proportions.R).
e. Orchestration Core
• run_DECEPTICONx coordinates input → template selection → engine execution → results collation.
f. Output & Reporting
• Result tables and summary statistics saved under RUNpath.
External Dependencies & Services
• Bioconductor repositories (for SingleCellExperiment, TOAST, etc.)
• GitHub (devtools::install_github)
• Docker (optional containerized code in DOCKER_codes.R)
Architectural Patterns & Design Principles
• Modular wrappers isolate each engine’s API and parameter handling.
• Plug‐in pattern for adding new deconvolution methods.
• Separation of concerns: I/O, template management, computation, and reporting.