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:
38
main.nf
38
main.nf
@@ -2,19 +2,18 @@
|
||||
|
||||
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
|
||||
@@ -23,21 +22,40 @@ process POCKETMINER {
|
||||
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 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 ${pdb_file} \\
|
||||
--pdb input.pdb \\
|
||||
--output-folder . \\
|
||||
--output-name ${pdb_basename} \\
|
||||
--model-path ${params.model_path} \\
|
||||
${debug_flag}
|
||||
${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)
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user