Files
prodigy/main.nf
Olamide Isreal c8fd6b4084
Some checks failed
ci / test (3.10) (push) Has been cancelled
ci / test (3.11) (push) Has been cancelled
ci / test (3.12) (push) Has been cancelled
ci / test (3.13) (push) Has been cancelled
ci / test (3.9) (push) Has been cancelled
Close stale issues and PRs / stale (push) Has been cancelled
Fix input path to s3://omic/eureka/prodigy/*.pdb
2026-03-17 16:44:26 +01:00

75 lines
2.3 KiB
Plaintext

#!/usr/bin/env nextflow
nextflow.enable.dsl=2
// Default parameters
params.pdb = 's3://omic/eureka/prodigy/*.pdb'
params.outdir = 's3://omic/eureka/prodigy/output'
params.distance_cutoff = 5.5
params.acc_threshold = 0.05
params.temperature = 25.0
params.selection = ''
params.contact_list = false
params.pymol_selection = false
params.quiet = false
// =============================================================================
// Process: PRODIGY
// Predicts binding affinity using intermolecular contacts
// =============================================================================
process PRODIGY {
container 'harbor.cluster.omic.ai/omic/prodigy:latest'
publishDir params.outdir, mode: 'copy'
stageInMode 'copy'
input:
path pdb
output:
path "${pdb.baseName}_prodigy.txt", emit: results
path "${pdb.baseName}_contacts.txt", optional: true, emit: contacts
path "${pdb.baseName}_interface.pml", optional: true, emit: pymol
script:
"""
prodigy \\
${pdb} \\
--distance-cutoff ${params.distance_cutoff} \\
--acc-threshold ${params.acc_threshold} \\
--temperature ${params.temperature} \\
${params.selection ? '--selection ' + params.selection : ''} \\
${params.contact_list ? '--contact_list' : ''} \\
${params.pymol_selection ? '--pymol_selection' : ''} \\
${params.quiet ? '--quiet' : ''} \\
2>&1 | tee ${pdb.baseName}_prodigy.txt
# Rename contact list file if generated
if [ -f "${pdb.baseName}.contacts" ]; then
mv ${pdb.baseName}.contacts ${pdb.baseName}_contacts.txt
fi
# Rename PyMOL script if generated
if [ -f "${pdb.baseName}.pml" ]; then
mv ${pdb.baseName}.pml ${pdb.baseName}_interface.pml
fi
"""
}
// =============================================================================
// Workflow
// =============================================================================
workflow {
// Validate input
if (!params.pdb) {
error "ERROR: Please provide input PDB file(s) using --pdb parameter"
}
// Create input channel
pdb_ch = Channel.fromPath(params.pdb, checkIfExists: true)
// Run PRODIGY
PRODIGY(pdb_ch)
}