Replace Nextflow components with Metaflow workflow orchestration #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR completely replaces the Nextflow-based workflow orchestration with Netflix's Metaflow while preserving the entire Python package (
af3_linear_epitopes
) intact. The migration provides a unified, parameter-driven workflow system that maintains all existing functionality.Changes Made
🔄 Core Workflow Migration
.nf
) for different datasets and processing stagesworkflows/linear_epitope_flow.py
) with parameter-based routing📋 Workflow Types Supported
clean
: Data cleaning and preparation for all datasets (bp3c50id, hv_class, hv_seg, iedb_bp3, in_class, in_seg)msa_focal
: MSA generation for focal proteinsmsa_peptide
: MSA generation for peptidesinference_focal
: AlphaFold3 inference for focal proteinsinference_peptide
: AlphaFold3 inference for peptidesbepipred
: BepiPred scoring with result joiningextract_conf
: Confidence extraction from AF3 results🚀 Execution Scripts
scripts/
withnextflow run
commandsscripts_metaflow/
withpython linear_epitope_flow.py run
commandstmp/nextflow/
totmp/metaflow/
🔧 Environment Updates
envs/env.yaml
nf-core.yaml
(no longer needed).gitignore
to exclude Metaflow metadataUsage Examples
Command Line
cd workflows python linear_epitope_flow.py run --dset-name bp3c50id --workflow-type clean python linear_epitope_flow.py run --dset-name hv_class --workflow-type msa_focal
SLURM Submission
Key Benefits
✅ Simplified Architecture: One workflow file instead of 12 separate files
✅ Parameter-Driven: Easy switching between datasets and workflow types
✅ Maintained Functionality: All original Nextflow processes preserved
✅ Better Error Handling: Improved command execution and logging
✅ Python Integration: Native Python workflow orchestration
Python Package Preservation
The
af3_linear_epitopes
Python package insrc/
remains completely unchanged:workflows/bin/
still used by Metaflow workflowsLegacy Support
Old Nextflow files are marked as deprecated with clear migration documentation but remain available for reference.
Fixes #30.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.