How eddiejosef/protein_structure_prediction works
Main Components
• Input Data: The “input” directory which houses FASTA files.
• Workflow Orchestrator: The Snakemake pipeline (with the Snakefile, snake_env.yml, and associated logs) that drives the process.
• Environment Setup: Docker image (as defined in Dockerfile and the installation instructions) and the Conda environment (configured via snake_env.yml and setup_env.sh).
• LocalColabFold Pipeline: The part of the workflow handling AI-based structure prediction—this component takes the FASTA inputs, executes colabfold_batch (with parameters like recycling iterations, ensemble evaluation, AMBER refinement, etc.), and produces outputs in output/colab_fold_output.
• MODELLER Pipeline: This consists of several interconnected scripts (e.g., align2d.py, build_profile.py, convert_fasta.sh, fix_template.py, modeller_automodel.py, and associated shell scripts like split.sh) used for template-based homology modeling. Its outputs (organized in output/modeller_output) include alignments, multiple intermediate PDB models, scoring logs, and the final structure after rotamer sampling.
• Logging and Reports: Various log files (snakemake_full.log, run_colab_fold.log, and individual logs inside output folders) along with detailed analysis reports and theoretical documentation.
Relationships and Interactions
• Data Flow: Start with FASTA file input → then parallel processing by the two pipelines.
• Workflow Coordination: Snakemake acts as the “glue” orchestrating execution of modules/shell scripts, Python programs, and dependency setups (through Conda and Docker).
• Environment Dependencies: Docker encapsulates the full workflow while the Conda environment ensures all scripts have needed dependencies.
• Component Interaction:
• The Snakemake engine schedules tasks that invoke LocalColabFold and MODELLER tools.
• In the MODELLER branch, there is an internal sequence: file splitting → conversion of FASTA to .ali → template ranking and PDB download → fixing the template → alignment → 3D modeling and rotamer sampling.
• In the ColabFold branch, FASTA files lead to sequence alignments, prediction outputs (including predicted aligned error JSON, relaxed/unrelaxed PDBs), and per-sample output directories.
• Output Aggregation: The two pipelines organize their results into structured subdirectories under “output”, making it easier to verify results.
Architectural Patterns and Technologies
• Modular Pipeline Design: The separation between LocalColabFold and MODELLER pipelines emphasizes modularity and parallel processing.
• Automation and Reproducibility: Using Snakemake to manage dependency graph and execution, ensuring scalability (multiple FASTA files) and reproducibility.
• Containerization: Docker is used to package the entire environment, with additional Conda configurations ensuring the correct versions of libraries are installed.
• Scripting Mix: A combination of shell (Bash) scripts and Python tools (with specific scripts for data preparation & model building) is used to tie together the workflow’s pieces.