Skip to content

Commit 2966233

Browse files
authored
Merge pull request #58 from seqeralabs/rebase_local_changes
Rebase local changes
2 parents 5ce140d + 1078f52 commit 2966233

File tree

5 files changed

+19
-36
lines changed

5 files changed

+19
-36
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sample_id,design_yaml,structure_files,protocol,num_designs,budget
2-
2vsm_peptide_binder,assets/test_data/2VSM_nanobody_design.yaml,assets/test_data/2VSM.cif,peptide-anything,5,2
2+
2vsm_peptide_binder,assets/test_data/2VSM_peptide_design.yaml,assets/test_data/2VSM.cif,peptide-anything,5,2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sample_id,design_yaml,structure_files,protocol,num_designs,budget
2-
2vsm_protein_binder,assets/test_data/2VSM_nanobody_design.yaml,assets/test_data/2VSM.cif,protein-anything,5,2
2+
2vsm_protein_binder,assets/test_data/2VSM_protein_design.yaml,assets/test_data/2VSM.cif,protein-anything,5,2

conf/test_design_protein.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ params {
3434
run_protenix_refold = true
3535
run_ipsae = true
3636
run_prodigy = true
37-
run_foldseek = true
37+
run_foldseek = false
3838
run_consolidation = true
3939

4040
// Output

nextflow.config

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -120,24 +120,6 @@ docker.registry = 'docker.io'
120120
// Capture exit codes from upstream processes when piping
121121
process.shell = ['/bin/bash', '-euo', 'pipefail']
122122

123-
def trace_timestamp = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss')
124-
timeline {
125-
enabled = true
126-
file = "${params.tracedir}/execution_timeline_${trace_timestamp}.html"
127-
}
128-
report {
129-
enabled = true
130-
file = "${params.tracedir}/execution_report_${trace_timestamp}.html"
131-
}
132-
trace {
133-
enabled = true
134-
file = "${params.tracedir}/execution_trace_${trace_timestamp}.txt"
135-
}
136-
dag {
137-
enabled = true
138-
file = "${params.tracedir}/pipeline_dag_${trace_timestamp}.html"
139-
}
140-
141123
manifest {
142124
name = 'seqeralabs/nf-proteindesign'
143125
author = 'Florian Wuennemann'

workflows/protein_design.nf

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ workflow PROTEIN_DESIGN {
4444
// Use flatMap to create individual tasks per PDB file (one per budget iteration)
4545
ch_pdb_per_design = CONVERT_CIF_TO_PDB.out.pdb_files_all
4646
.flatMap { meta, pdb_files ->
47-
// Convert to list if single file
48-
def pdb_list = pdb_files instanceof List ? pdb_files : [pdb_files]
47+
// Convert to list if single file and create defensive copy
48+
def pdb_list = pdb_files instanceof List ? new ArrayList(pdb_files) : [pdb_files]
4949

5050
// Create a separate channel entry for each PDB file
5151
pdb_list.collect { pdb_file ->
@@ -93,8 +93,8 @@ workflow PROTEIN_DESIGN {
9393
// Each ProteinMPNN run generates multiple FASTA files (mpnn_num_seq_per_target)
9494
ch_boltz2_per_sequence = PROTEINMPNN_OPTIMIZE.out.sequences
9595
.flatMap { meta, fasta_files ->
96-
// Convert to list if single file
97-
def fasta_list = fasta_files instanceof List ? fasta_files : [fasta_files]
96+
// Convert to list if single file and create defensive copy
97+
def fasta_list = fasta_files instanceof List ? new ArrayList(fasta_files) : [fasta_files]
9898

9999
// Create a separate entry for each FASTA file
100100
fasta_list.collect { fasta_file ->
@@ -147,9 +147,9 @@ workflow PROTEIN_DESIGN {
147147
ch_ipsae_boltzgen = BOLTZGEN_RUN.out.budget_design_cifs
148148
.join(BOLTZGEN_RUN.out.budget_design_npz, by: 0)
149149
.flatMap { meta, cif_files, npz_files ->
150-
// Convert to list if single file
151-
def cif_list = cif_files instanceof List ? cif_files : [cif_files]
152-
def npz_list = npz_files instanceof List ? npz_files : [npz_files]
150+
// Convert to list if single file and create defensive copies
151+
def cif_list = cif_files instanceof List ? new ArrayList(cif_files) : [cif_files]
152+
def npz_list = npz_files instanceof List ? new ArrayList(npz_files) : [npz_files]
153153

154154
// Create a map of basenames to files for quick lookup
155155
def npz_map = [:]
@@ -244,8 +244,8 @@ workflow PROTEIN_DESIGN {
244244
// Strategy: Use flatMap to create individual tasks for each CIF file
245245
ch_prodigy_input = BOLTZGEN_RUN.out.budget_design_cifs
246246
.flatMap { meta, cif_files ->
247-
// Convert to list if single file
248-
def cif_list = cif_files instanceof List ? cif_files : [cif_files]
247+
// Convert to list if single file and create defensive copy
248+
def cif_list = cif_files instanceof List ? new ArrayList(cif_files) : [cif_files]
249249

250250
// Create a separate entry for each CIF file
251251
cif_list.collect { cif_file ->
@@ -265,8 +265,8 @@ workflow PROTEIN_DESIGN {
265265
if (params.run_proteinmpnn && params.run_boltz2_refold) {
266266
ch_prodigy_boltz2 = BOLTZ2_REFOLD.out.structures
267267
.flatMap { meta, cif_files ->
268-
// Convert to list if single file
269-
def cif_list = cif_files instanceof List ? cif_files : [cif_files]
268+
// Convert to list if single file and create defensive copy
269+
def cif_list = cif_files instanceof List ? new ArrayList(cif_files) : [cif_files]
270270

271271
// Create a separate entry for each CIF file
272272
cif_list.collect { cif_file ->
@@ -312,12 +312,13 @@ workflow PROTEIN_DESIGN {
312312
// This searches for homologs of the original Boltzgen-designed structures
313313
ch_foldseek_boltzgen = BOLTZGEN_RUN.out.budget_design_cifs
314314
.flatMap { meta, cif_files ->
315-
// Convert to list if single file
316-
def cif_list = cif_files instanceof List ? cif_files : [cif_files]
315+
// Convert to list if single file and create defensive copy
316+
def cif_list = cif_files instanceof List ? new ArrayList(cif_files) : [cif_files]
317317

318318
// Create a separate entry for each CIF file
319319
cif_list.collect { cif_file ->
320320
def base_name = cif_file.baseName
321+
// Create new meta map explicitly to avoid concurrent modification
321322
def design_meta = [
322323
id: "${meta.id}_${base_name}",
323324
parent_id: meta.id,
@@ -335,8 +336,8 @@ workflow PROTEIN_DESIGN {
335336
if (params.run_proteinmpnn && params.run_boltz2_refold) {
336337
ch_foldseek_boltz2 = BOLTZ2_REFOLD.out.structures
337338
.flatMap { meta, cif_files ->
338-
// Convert to list if single file
339-
def cif_list = cif_files instanceof List ? cif_files : [cif_files]
339+
// Convert to list if single file and create defensive copy
340+
def cif_list = cif_files instanceof List ? new ArrayList(cif_files) : [cif_files]
340341

341342
// Create a separate entry for each CIF file
342343
cif_list.collect { cif_file ->

0 commit comments

Comments
 (0)