Skip to content

Commit 3137fed

Browse files
committed
wip: Fix ipSAE and prodigy not running on cloud.
1 parent 9bd257a commit 3137fed

File tree

10 files changed

+49
-53
lines changed

10 files changed

+49
-53
lines changed

conf/test_design_nanobody.config

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,13 @@ params {
2121
// Input data - design mode with 2VSM nanobody
2222
input = "${projectDir}/assets/test_data/samplesheet_design_nanobody.csv"
2323
mode = 'design'
24-
25-
// Enable all metrics modules for comprehensive testing
26-
run_proteinmpnn = true
27-
mpnn_num_seq_per_target = 2 // Reduced from default 8 for faster testing
28-
run_boltz2_refold = true
29-
run_ipsae = true
30-
run_prodigy = true
31-
run_foldseek = true
32-
run_consolidation = true
33-
24+
25+
// Test-specific parameter overrides (all analysis modules are enabled by default)
26+
mpnn_num_seq_per_target = 2 // Reduced from default 8 for faster testing
27+
boltz2_num_recycling = 1 // Reduced for faster testing
28+
boltz2_num_diffusion = 1 // Reduced for faster testing
29+
run_foldseek = false // Disabled - requires external database
30+
3431
// Output
3532
outdir = './results_test_design_nanobody'
3633
}

conf/test_design_peptide.config

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,13 @@ params {
2121
// Input data - design mode with 2VSM peptide
2222
input = "${projectDir}/assets/test_data/samplesheet_design_peptide.csv"
2323
mode = 'design'
24-
25-
// Enable all metrics modules for comprehensive testing
26-
run_proteinmpnn = true
27-
mpnn_num_seq_per_target = 2 // Reduced from default 8 for faster testing
28-
run_boltz2_refold = true
29-
run_ipsae = true
30-
run_prodigy = true
31-
run_foldseek = true
32-
run_consolidation = true
33-
24+
25+
// Test-specific parameter overrides (all analysis modules are enabled by default)
26+
mpnn_num_seq_per_target = 2 // Reduced from default 8 for faster testing
27+
boltz2_num_recycling = 1 // Reduced for faster testing
28+
boltz2_num_diffusion = 1 // Reduced for faster testing
29+
run_foldseek = false // Disabled - requires external database
30+
3431
// Output
3532
outdir = './results_test_design_peptide'
3633
}

conf/test_design_protein.config

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,15 @@ params {
2121
// Input data - design mode with 2VSM protein
2222
input = "${projectDir}/assets/test_data/samplesheet_design_protein.csv"
2323
mode = 'design'
24-
25-
// Enable all metrics modules for comprehensive testing
26-
run_proteinmpnn = true
27-
mpnn_num_seq_per_target = 2 // Reduced from default 8 for faster testing
28-
run_boltz2_refold = true
29-
boltz2_predict_affinity = false // Affinity only supported for ligands, not proteins
24+
25+
// Test-specific parameter overrides (all analysis modules are enabled by default)
26+
mpnn_num_seq_per_target = 2 // Reduced from default 8 for faster testing
27+
boltz2_predict_affinity = false // Affinity only supported for ligands, not proteins
3028
boltz2_use_msa = false // Required when input YAML has no MSAs
31-
boltz2_num_recycling = 1
32-
boltz2_num_diffusion = 1
33-
run_ipsae = true
34-
run_prodigy = true
35-
run_foldseek = true
36-
run_consolidation = true
37-
29+
boltz2_num_recycling = 1 // Reduced for faster testing
30+
boltz2_num_diffusion = 1 // Reduced for faster testing
31+
run_foldseek = false // Disabled - requires external database
32+
3833
// Output
3934
outdir = './results_test_design_protein'
4035
}

modules/local/boltz2_refold.nf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,11 @@ SUMMARY
242242
stub:
243243
"""
244244
mkdir -p ${meta.id}_boltz2_output
245-
touch ${meta.id}_boltz2_output/placeholder.cif
246-
touch ${meta.id}_boltz2_output/placeholder_confidence.json
247-
touch ${meta.id}_boltz2_output/placeholder_pae.npz
248-
touch ${meta.id}_boltz2_output/placeholder_affinity.json
245+
# Create stub files with realistic names that match downstream filtering patterns
246+
touch ${meta.id}_boltz2_output/${meta.id}_model_0.cif
247+
touch ${meta.id}_boltz2_output/${meta.id}_model_0_confidence.json
248+
touch ${meta.id}_boltz2_output/pae_${meta.id}_model_0.npz
249+
touch ${meta.id}_boltz2_output/${meta.id}_model_0_affinity.json
249250
touch versions.yml
250251
"""
251252
}

modules/local/boltzgen_run.nf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ process BOLTZGEN_RUN {
8282

8383
stub:
8484
"""
85-
mkdir -p ${meta.id}_output/final_ranked_designs
85+
mkdir -p ${meta.id}_output/final_ranked_designs/final_${meta.budget}_designs
8686
mkdir -p ${meta.id}_output/intermediate_designs
8787
mkdir -p ${meta.id}_output/intermediate_designs_inverse_folded
88-
touch ${meta.id}_output/final_ranked_designs/placeholder.cif
88+
# Create stub files with realistic names that match downstream patterns
89+
touch ${meta.id}_output/final_ranked_designs/final_${meta.budget}_designs/rank1_${meta.id}_design.cif
90+
touch ${meta.id}_output/final_ranked_designs/final_${meta.budget}_designs/rank2_${meta.id}_design.cif
8991
touch versions.yml
9092
"""
9193
}

modules/local/convert_cif_to_pdb.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ process CONVERT_CIF_TO_PDB {
146146
stub:
147147
"""
148148
mkdir -p ${meta.id}_pdb_structures
149-
touch ${meta.id}_pdb_structures/placeholder.pdb
149+
# Create stub files with realistic names that match downstream rank extraction patterns
150+
touch ${meta.id}_pdb_structures/rank1_${meta.id}_design.pdb
151+
touch ${meta.id}_pdb_structures/rank2_${meta.id}_design.pdb
150152
touch versions.yml
151153
"""
152154
}

modules/local/ipsae_calculate.nf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ process IPSAE_CALCULATE {
4545
def pae_cutoff = params.ipsae_pae_cutoff ?: 10
4646
def dist_cutoff = params.ipsae_dist_cutoff ?: 10
4747
"""
48-
touch stub_output_${pae_cutoff}_${dist_cutoff}.txt
49-
touch stub_output_${pae_cutoff}_${dist_cutoff}_byres.txt
50-
touch stub_output.pml
48+
# Create stub files with unique names using meta.id
49+
touch ${meta.id}_${pae_cutoff}_${dist_cutoff}.txt
50+
touch ${meta.id}_${pae_cutoff}_${dist_cutoff}_byres.txt
51+
touch ${meta.id}.pml
5152
touch versions.yml
5253
"""
5354
}

modules/local/prepare_boltz2_sequences.nf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ process PREPARE_BOLTZ2_SEQUENCES {
120120
"""
121121
mkdir -p sequences
122122
echo "MOCKSEQUENCE" > ${meta.id}_target_sequence.txt
123-
touch sequences/placeholder_seq_0.fa
123+
# Create stub files with unique names matching the expected pattern
124+
touch sequences/${meta.id}_s0.fa
124125
touch versions.yml
125126
"""
126127
}

nextflow.config

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ params {
3535
steps = null // Optional: Comma-separated list of steps to run (e.g., 'filtering' to rerun only filtering)
3636

3737
// ProteinMPNN sequence optimization options
38-
run_proteinmpnn = false // Enable ProteinMPNN sequence optimization of Boltzgen designs
38+
run_proteinmpnn = true // Enable ProteinMPNN sequence optimization of Boltzgen designs (set to false to disable)
3939
mpnn_sampling_temp = 0.1 // Sampling temperature (0.1-0.3 recommended, lower = more conservative)
4040
mpnn_num_seq_per_target = 8 // Number of sequence variants to generate per structure
4141
mpnn_batch_size = 1 // Batch size for ProteinMPNN inference
@@ -47,7 +47,7 @@ params {
4747
mpnn_designed_chains = null // Chains to design (e.g., 'C' - typically the binder chain)
4848

4949
// Boltz-2 structure prediction options (for refolding ProteinMPNN sequences)
50-
run_boltz2_refold = false // Enable Boltz-2 structure prediction for ProteinMPNN sequences
50+
run_boltz2_refold = true // Enable Boltz-2 structure prediction for ProteinMPNN sequences (set to false to disable)
5151
boltz2_cache = null // Cache directory for Boltz-2 model weights (~6GB), defaults to ~/.boltz
5252
boltz2_num_recycling = 3 // Number of recycling steps (3-5 recommended)
5353
boltz2_num_diffusion = 200 // Number of diffusion samples (higher = slower but more accurate)
@@ -56,16 +56,16 @@ params {
5656
boltz2_torch_precision = 'medium' // Torch float32 matmul precision: 'medium', 'high', or 'highest' (for Tensor Cores)
5757

5858
// IPSAE scoring options
59-
run_ipsae = false // Enable IPSAE scoring of Boltzgen predictions (evaluates protein-protein interactions)
59+
run_ipsae = true // Enable IPSAE scoring of Boltz-2 structures (set to false to disable)
6060
ipsae_pae_cutoff = 10 // PAE cutoff for IPSAE calculation (Angstroms, default: 10)
6161
ipsae_dist_cutoff = 10 // Distance cutoff for CA-CA contacts (Angstroms, default: 10)
6262

6363
// PRODIGY binding affinity prediction options
64-
run_prodigy = false // Enable PRODIGY binding affinity prediction on final designs
64+
run_prodigy = true // Enable PRODIGY binding affinity prediction on final designs (set to false to disable)
6565
prodigy_selection = null // Chain selection for PRODIGY (e.g., 'A,B'). If null, auto-detects from structure
6666

6767
// Foldseek structural search options
68-
run_foldseek = false // Enable Foldseek structural similarity search for budget designs and Boltz-2 structures
68+
run_foldseek = true // Enable Foldseek structural similarity search (requires foldseek_database, set to false to disable)
6969
foldseek_database = null // Path to Foldseek database (e.g., AlphaFold/Swiss-Model, required if run_foldseek is true)
7070
foldseek_evalue = 0.001 // E-value threshold for reporting matches (lower = more stringent)
7171
foldseek_max_seqs = 100 // Maximum number of target sequences to report
@@ -74,7 +74,7 @@ params {
7474
foldseek_alignment_type = 2 // Alignment type: 0=3Di only, 1=TMalign (global), 2=3Di+AA (local, default)
7575

7676
// Metrics consolidation and reporting options
77-
run_consolidation = false // Enable consolidated metrics report generation
77+
run_consolidation = true // Enable consolidated metrics report generation (set to false to disable)
7878
report_top_n = 10 // Number of top designs to highlight in report
7979

8080
// Output options

workflows/protein_design.nf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ workflow PROTEIN_DESIGN {
5555

5656
// Extract budget_design_cifs from both sources for downstream processing
5757
ch_budget_cifs_new = BOLTZGEN_RUN.out.budget_design_cifs
58-
58+
59+
// For precomputed results, extract CIF files from the precomputed directory
5960
ch_budget_cifs_precomputed = ch_branched.with_precomputed
6061
.map { meta, boltzgen_dir ->
61-
// Extract budget design CIF files from pre-computed directory
6262
def budget_cifs = file("${boltzgen_dir}/final_ranked_designs/final_*_designs/*.cif")
6363
[meta, budget_cifs]
6464
}
65-
65+
6666
ch_budget_design_cifs = ch_budget_cifs_new
6767
.mix(ch_budget_cifs_precomputed)
6868

0 commit comments

Comments
 (0)