Files
chai-lab/main.nf
Olamide Isreal 8ca37f1922 Use v2 image tag to force K8s to pull updated image
K8s caches :latest tag. Using :v2 ensures the permission-fixed
image is pulled instead of the cached old one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 17:40:38 +01:00

46 lines
1.1 KiB
Plaintext
Executable File

#!/usr/bin/env nextflow
nextflow.enable.dsl=2
params.input_dir = 's3://omic/eureka/chai1'
params.outdir = 's3://omic/eureka/chai1/output'
params.use_msa = true
params.msa_server = 'https://api.colabfold.com'
params.num_samples = 5
process CHAI1 {
container 'harbor.cluster.omic.ai/omic/chai1:v2'
publishDir params.outdir, mode: 'copy'
stageInMode 'copy'
maxForks 1
input:
path fasta
output:
path "${fasta.simpleName.replace('.fasta', '')}", emit: output_dir
script:
"""
OUTPUT_DIR=\$(basename ${fasta} .fasta)
mkdir -p \$OUTPUT_DIR
# Construct MSA parameters
MSA_OPTIONS=""
if ${params.use_msa}; then
MSA_OPTIONS="--use-msa-server --msa-server-url ${params.msa_server}"
fi
# Run CHAI1
chai fold \\
\$MSA_OPTIONS \\
--num-diffn-samples ${params.num_samples} \\
${fasta} \\
\$OUTPUT_DIR
"""
}
workflow {
fasta_ch = Channel.fromPath(params.input_dir + '/*.fasta')
CHAI1(fasta_ch)
}