How tallulandrews/m3drop works
Project type and purpose
• This is an R/Bioconductor package that implements statistical models (modified Michaelis-Menten and depth-adjusted negative binomial) to analyse dropouts in scRNA-seq data and perform feature selection, normalization, simulation, and plotting.
• It is _not_ a full‐stack web app or microservice; it’s a domain‐specific library offering a suite of R functions, bundled with documentation and vignettes.
File structure
• Top‐level:
• R/ ‑ all .R source files, each grouping related functions (model fitting, normalization, plotting, simulations, etc.)
• man/ ‑ Rd files for automated help pages (one per exported function)
• inst/NEWS ‑ release notes
• vignettes/ ‑ long‐form usage demos
• DESCRIPTION, NAMESPACE, README – package metadata
• There are no frontend/backend divisions: the “architecture” is purely modular within R.
• No deployment scripts; packaging is handled via R’s build system.
README for additional insights
• Confirms two core modelling paradigms (MM and DANB), plus Brennecke HVG comparison and new Pearson residual functions.
• Highlights downstream use cases: clustering, pseudotime, etc.
Main components & their relationships
a. Data Input & Preprocessing
• Reads gene×cell count matrices (e.g., from SingleCellExperiment objects)
• Wrapper functions convert to internal formats
b. Model Fitting
• Michaelis-Menten (R/Brennecke_implementation.R)
• Depth-Adjusted NB (R/DANB_*.R)
c. Feature Selection
• Dropout‐based FS (R/Other_FS_functions.R, DANB_HVG, NB_UMI, Brennecke)
d. Normalization
• Pearson residuals (NBumiPearsonResiduals)
• Traditional DE normals (R/Normalization.R)
e. Simulation
• Synthetic data generators (R/Simulations_Functions.R, R/M3D_Imputation.R)
f. Plotting & Reporting
g. Documentation & Packaging
• Rd files tie back to each R function
• Vignettes demonstrate end‐to‐end workflows
Data flows from Input → Model Fitting & Simulation → Feature Selection & Normalization → Plotting/Export.
Architectural patterns & design principles
• Modular, single‐responsibility R files grouping related functions.
• Clear separation between computational logic (models, FS) and visualization.
• Use of R’s S3/S4 object conventions and namespace exports.
Final advice
• Keep it self‐contained: assume the viewer knows R but not the package internals.
• Every R/ subfolder as a separate logical block.
• Do not overcomplicate with deployment or CI details (none present)—focus purely on modular code structure, data flow, and user API.