From 14091fce875e59604392f6fcbe456ee8d4f47303 Mon Sep 17 00:00:00 2001 From: Olamide Isreal Date: Mon, 23 Mar 2026 15:27:23 +0100 Subject: [PATCH] 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 --- main.nf | 64 +++++++++++++++++++++++++++++++------------------ nextflow.config | 28 ++++++++++------------ 2 files changed, 54 insertions(+), 38 deletions(-) diff --git a/main.nf b/main.nf index ad36f6c..d7d4057 100644 --- a/main.nf +++ b/main.nf @@ -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) } diff --git a/nextflow.config b/nextflow.config index 5306e63..ad0ad98 100644 --- a/nextflow.config +++ b/nextflow.config @@ -8,36 +8,34 @@ manifest { 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 params { - pdb = null - outdir = null + pdb = "/omic/eureka/Pocketminer/1HSG.pdb" + outdir = "/omic/eureka/Pocketminer/output" debug = false } +// Profiles for different execution environments profiles { standard { docker { enabled = true - runOptions = '--rm' + temp = 'auto' } } + k8s { process { + executor = 'k8s' container = 'harbor.cluster.omic.ai/omic/pocketminer:latest' } + docker { + enabled = true + } + k8s { + storageClaimName = 'eureka-pvc' + storageMountPath = '/omic/eureka' + } } }