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 nextflow.enable.dsl=2
// Parameters // Pipeline parameters
params.pdb = null params.pdb = '/omic/eureka/Pocketminer/1HSG.pdb'
params.outdir = null params.outdir = '/omic/eureka/Pocketminer/output'
params.model_path = '/workspace/gvp/models/pocketminer' params.model_path = '/workspace/gvp/models/pocketminer'
params.debug = false params.debug = false
// Process definition
process POCKETMINER { process POCKETMINER {
container 'harbor.cluster.omic.ai/omic/pocketminer:latest' container 'harbor.cluster.omic.ai/omic/pocketminer:latest'
publishDir params.outdir, mode: 'copy' publishDir params.outdir, mode: 'copy'
input: input:
path pdb_file val pdb_path
output: output:
path "*-preds.npy", emit: predictions_npy path "*-preds.npy", emit: predictions_npy
path "*-predictions.txt", emit: predictions_txt path "*-predictions.txt", emit: predictions_txt
path "*-summary.json", emit: summary path "*-summary.json", emit: summary
path "*_X.npy", optional: true, emit: features_debug path "*_X.npy", optional: true, emit: features_debug
path "*_S.npy", optional: true, emit: sequence_debug path "*_S.npy", optional: true, emit: sequence_debug
path "*_mask.npy", optional: true, emit: mask_debug path "*_mask.npy", optional: true, emit: mask_debug
path "run.log", emit: log
script: script:
def pdb_basename = pdb_file.baseName def pdb_basename = file(pdb_path).baseName
def debug_flag = params.debug ? '--debug' : '' def debug_flag = params.debug ? '--debug' : ''
""" """
python /workspace/entrypoint.py \\ touch run.log
--pdb ${pdb_file} \\
--output-folder . \\ echo "=== Debugging PVC mount ===" | tee -a run.log
--output-name ${pdb_basename} \\ echo "Input path: ${pdb_path}" | tee -a run.log
--model-path ${params.model_path} \\ ls -la /omic/eureka/ 2>&1 | head -20 | tee -a run.log
${debug_flag} 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 { workflow {
POCKETMINER(Channel.of(file(params.pdb))) POCKETMINER(params.pdb)
} }

View File

@@ -8,36 +8,34 @@ manifest {
version = '1.0.0' version = '1.0.0'
} }
// S3/MinIO plugin for direct S3 access
plugins {
id 'nf-amazon'
}
aws {
client {
endpoint = 'http://datalake-hl.datalake.svc.cluster.local:9000'
s3PathStyleAccess = true
}
}
// Global default parameters // Global default parameters
params { params {
pdb = null pdb = "/omic/eureka/Pocketminer/1HSG.pdb"
outdir = null outdir = "/omic/eureka/Pocketminer/output"
debug = false debug = false
} }
// Profiles for different execution environments
profiles { profiles {
standard { standard {
docker { docker {
enabled = true enabled = true
runOptions = '--rm' temp = 'auto'
} }
} }
k8s { k8s {
process { process {
executor = 'k8s'
container = 'harbor.cluster.omic.ai/omic/pocketminer:latest' container = 'harbor.cluster.omic.ai/omic/pocketminer:latest'
} }
docker {
enabled = true
}
k8s {
storageClaimName = 'eureka-pvc'
storageMountPath = '/omic/eureka'
}
} }
} }