Match meta-predictor's working WES pattern

- Add executor, docker, k8s storage config to k8s profile
- Use val input instead of file channel (avoids S3 staging issue)
- Pass PDB path as string, copy from PVC mount inside script
- Add PVC mount debug logging
- Set default params to /omic/eureka paths
This commit is contained in:
2026-03-23 15:27:23 +01:00
parent 6aedad69e4
commit 14091fce87
2 changed files with 54 additions and 38 deletions

64
main.nf
View File

@@ -2,42 +2,60 @@
nextflow.enable.dsl=2
// Parameters
params.pdb = null
params.outdir = null
// Pipeline parameters
params.pdb = '/omic/eureka/Pocketminer/1HSG.pdb'
params.outdir = '/omic/eureka/Pocketminer/output'
params.model_path = '/workspace/gvp/models/pocketminer'
params.debug = false
// Process definition
process POCKETMINER {
container 'harbor.cluster.omic.ai/omic/pocketminer:latest'
publishDir params.outdir, mode: 'copy'
input:
path pdb_file
val pdb_path
output:
path "*-preds.npy", emit: predictions_npy
path "*-predictions.txt", emit: predictions_txt
path "*-summary.json", emit: summary
path "*_X.npy", optional: true, emit: features_debug
path "*_S.npy", optional: true, emit: sequence_debug
path "*_mask.npy", optional: true, emit: mask_debug
path "*-preds.npy", emit: predictions_npy
path "*-predictions.txt", emit: predictions_txt
path "*-summary.json", emit: summary
path "*_X.npy", optional: true, emit: features_debug
path "*_S.npy", optional: true, emit: sequence_debug
path "*_mask.npy", optional: true, emit: mask_debug
path "run.log", emit: log
script:
def pdb_basename = pdb_file.baseName
def debug_flag = params.debug ? '--debug' : ''
"""
python /workspace/entrypoint.py \\
--pdb ${pdb_file} \\
--output-folder . \\
--output-name ${pdb_basename} \\
--model-path ${params.model_path} \\
${debug_flag}
"""
def pdb_basename = file(pdb_path).baseName
def debug_flag = params.debug ? '--debug' : ''
"""
touch run.log
echo "=== Debugging PVC mount ===" | tee -a run.log
echo "Input path: ${pdb_path}" | tee -a run.log
ls -la /omic/eureka/ 2>&1 | head -20 | tee -a run.log
ls -la /omic/eureka/Pocketminer/ 2>&1 | tee -a run.log || true
echo "=== End Debug ===" | tee -a run.log
if [ ! -f "${pdb_path}" ]; then
echo "ERROR: PDB file not found at ${pdb_path}" | tee -a run.log
echo "Available files in /omic/eureka/Pocketminer/:" | tee -a run.log
ls /omic/eureka/Pocketminer/ 2>&1 | tee -a run.log || true
exit 1
fi
cp "${pdb_path}" input.pdb
python /workspace/entrypoint.py \\
--pdb input.pdb \\
--output-folder . \\
--output-name ${pdb_basename} \\
--model-path ${params.model_path} \\
${debug_flag} 2>&1 | tee -a run.log
echo "Pipeline completed successfully" | tee -a run.log
"""
}
// Workflow
workflow {
POCKETMINER(Channel.of(file(params.pdb)))
POCKETMINER(params.pdb)
}