How biodataanalysisgroup/umic works
Project Type and Purpose
• UMIc is a bioinformatics framework written in R that processes sequencing data (fastq files) to perform UMI deduplication and error correction.
• The primary purpose is to clean and correct sequencing reads based on a nucleotide-level evaluation using quality and frequency data.
• It is not a full web-based application but essentially a command-line driven pipeline with clearly separated input (data) and output (results) components.
File Structure Analysis
• There are three main folders:
• The “R” directory, containing the core scripts:
• UMIsProject.R (the main script that initializes parameters and starts the pipeline),
• casesWorkflows.R (probably handling per-case logic or workflows),
• functions.R (common routines used across the framework).
• The “data” directory, which holds input datasets, organized by case (case1, case2, case3), each with one or multiple fastq.gz files.
• The “outputs” directory, where processed and corrected sequencing files are written along with summary CSV files.
• Additional files (LICENSE, README.md, UMIc.yml) provide documentation, license information, and potential configuration settings.
Extracting Insights from the README
• The README explains the input parameters needed in UMIsProject.R such as pairedData, UMIlocation, UMIlength, etc.
• It also describes the output format, which includes both corrected fastq files and summary CSV tables.
• Dependency management (i.e., package installation from CRAN and Bioconductor) plays a key role in the overall project architecture.
a. Main Components:
• Input Module: Represents the “data” folder which contains the raw fastq files.
• Configuration & Initialization: The main script (UMIsProject.R) that assimilates user-defined parameters.
• Core Processing Unit: Composed of:
• Workflow Control (casesWorkflows.R) handling per-case workflows.
• Supporting Functions (functions.R) that implement deduplication and error correction logic.
• External Dependencies: List of required R packages (tidyverse, data.table, stringdist, pryr, Biostrings, ShortRead). These are essential libraries controlled by CRAN/Bioconductor.
• Output Module: Corresponds to the “outputs” folder where results (corrected fastq files and summary CSVs) are written.
• (Optionally) Configuration File (UMIc.yml) if it's used for additional setup or parameters.
b. Relationships and Data Flow:
• Loading the input data from the “data” folder.
• Passing control to the workflow script (casesWorkflows.R).
• Utilizing utility functions (from functions.R) to perform UMI-based correction.
• From “data” (raw input) → Processing Unit (R scripts) → “outputs” (corrected data).
• Internal calls among the R scripts to perform the deduplication and merging logic.
• Reagent-like dependencies where external packages are loaded and utilized within the processing modules.
c. Architectural Patterns and Design Principles:
• Modular Structure: Separation of concerns is clear between input handling, workflow control, and processing functions.
• Pipeline Architecture: The design is linear with clear stages from raw data ingestion to output generation.
• Reusability: The use of supporting functions (functions.R) emphasizes code reuse and encapsulation of core deduplication logic.
• Configuration Driven: Key parameters are defined by the user in the main script, making the tool flexible for different datasets.
d. Technologies and Libraries:
• Programming Language and Runtime: R, along with its ecosystem of packages.
• Libraries: tidyverse (data manipulation), data.table (fast data operations), stringdist (for similarity metrics), pryr (for introspection), Biostrings and ShortRead (for sequence processing).