How sfragkoul/synth4bench works
Project Overview and Purpose
• Recognize that synth4bench is a framework that uses the NEAT simulator to generate synthetic genomics datasets (focusing on the TP53 gene) and then benchmarks multiple somatic variant calling algorithms (GATK-Mutect2, Freebayes, VarDict, VarScan2, and LoFreq) by comparing their output against established ground truth.
• The framework is aimed at improving the detection accuracy for low frequency variants (≤10%), which is especially important in cancer genomic studies.
Analyzing the File Tree
• The top-level structure reveals directories and files for:
• R scripts that perform data processing, analysis, and plotting (found in the “R” directory). R scripts include main analysis scripts (S4BR.R), plotting scripts (S4BR_plot.R, paper_plots.R), and several helper modules (helpers_*.R).
• Bash templates (e.g., freebayes_template.sh, lofreq_template.sh, mutect2_template.sh, vardict_template.sh, variant_calling_template.sh, synth_generation_template.sh) which provide standardized ways to run the data generation and variant calling processes.
• A “bam-readcount” subdirectory which houses an external tool meant to assess read counts in BAM files.
• Configuration files such as environment.yml and parameters.yaml that set up dependencies and parameters for execution.
• Documentation folders (docs) and the toy dataset directory that provides sample input files (BAM, VCF, fastq).
• This layout informs you of several “layers” in the system: data generation, variant calling execution, post-processing/analysis, and documentation.
Key Components
a. Data Generation Module:
• NEATv3.3 as an external tool that generates synthetic genomics data based on the TP53 gene.
• That the synthetic datasets consist of multiple ground truth datasets, which are later merged.
• Dependency on the “synth_generation_template.sh” bash script and associated parameter configuration (parameters.yaml).
b. Variant Calling Module:
• Out the multiple variant callers integrated into the framework:
– GATK-Mutect2
– Freebayes (with freebayes_template.sh)
– VarDict (with varscan_template.sh and the link to the external VarScan2VCF script for VarScan handling)
– VarScan2 (helper scripts and templates)
– LoFreq (with lofreq_template.sh)
• You might also want to represent the tool “bam-readcount” used for read-level analysis.
c. Post-Processing and Analysis (Evaluation) Module:
• R scripts (S4BR.R, S4BR_plot.R, paper_plots.R) as separate nodes that receive outputs (VCF, statistical data, etc.) from the variant calling processes.
• Utility/helper scripts within the R folder (helpers_*.R) that support tasks like data cleaning, contacting variant callers (e.g., helpers_Freebayes.R, helpers_VarDict.R), and additional statistical analyses (extra scripts such as stats.R, stats_*.Rmd).
d. Infrastructure and Supporting Components:
• Role of configuration files: environment.yml (for setting up the conda ecosystem and necessary dependencies) and parameters.yaml (for managing run-time parameters).
• An external dependency block for additional tools (like NEATv3.3, bam-readcount, and R libraries installed via install.packages).
• A “Documentation/Support” block that references the docs directory (Documentation.md, UserGuide.md) and image resources (presentation PDFs and posters) for end-user reference.
Relationships and Interactions
• Variant caller back to the evaluation module, indicating that they produce output (VCF files, read count summaries) that are then fed into the R scripts for quality assessment and visual presentation.
• Interactions between helper scripts and core functions: for instance, R/common_helpers.R links custom R logic with data produced by variant callers.
Architectural Patterns and Technologies
• That the project uses a modular approach, separating data generation, variant calling, and analysis.
• That it leverages scripting (bash, R) to executive workflows and that configuration management (parameters.yaml and environment.yml) plays a crucial role.
• Integration of external tools (NEAT simulator, bam-readcount) alongside in-house scripts.