Skip to content

Commit b7d0e56

Browse files
committed
Wire ModelPDB generation into Nextflow workflow
1 parent 0b03796 commit b7d0e56

2 files changed

Lines changed: 32 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ AF-0001234567890125
619619
AF-0001234567890126
620620
```
621621

622+
The ModelPDB step also requires provider metadata. By default the workflow reads this from `input/provider.json`; override it with `--provider_json <path>` if your provider file is elsewhere.
623+
622624
**Example input.txt:**
623625
```bash
624626
# Create the input list file

workflow/workflow.nf

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,35 @@ process runDSSP {
9393
"""
9494
}
9595

96+
/*
97+
Add AFDB-specific PDB headers from the DSSP-annotated CIF for each entry
98+
*/
99+
process runModelPdbGenerator {
100+
101+
publishDir "${params.output_dir}/${getEntryDir(entry)}", mode: 'copy'
102+
103+
input:
104+
path cif_file
105+
val entry
106+
107+
output:
108+
path "${entry}-model-${params.version}.pdb"
109+
110+
script:
111+
"""
112+
echo "Generating enriched model PDB for entry: ${entry}"
113+
${params.python_cmd} run-modelpdb-gen \
114+
-c "${cif_file}" \
115+
-p "${params.input_dir}/${getEntryDir(entry)}/${entry}-model-${params.version}.pdb" \
116+
-r "${params.provider_json}" \
117+
-o "${entry}-model-${params.version}.pdb"
118+
"""
119+
}
120+
96121
params.input_dir = "/input"
97122
params.output_dir = "/output"
98123
params.input_list = "${params.input_dir}/input.txt"
124+
params.provider_json = "${params.input_dir}/provider.json"
99125
params.version = "v1"
100126
params.results_dir = "${params.output_dir}/results"
101127
params.python_cmd = "uv run /app/main.py"
@@ -112,9 +138,10 @@ workflow {
112138

113139
createEntryOutDir(input_channel)
114140

115-
runModelCifGenerator(input_channel)
141+
model_cif = runModelCifGenerator(input_channel)
116142

117-
runDSSP(runModelCifGenerator.out)
143+
dssp = runDSSP(model_cif.cif_file, model_cif.entry)
118144

119-
runCif2Bcif(runDSSP.out)
145+
runModelPdbGenerator(dssp.cif_file, dssp.entry)
146+
runCif2Bcif(dssp.cif_file, dssp.entry)
120147
}

0 commit comments

Comments
 (0)