Files
immunebuilder/main.nf
Olamide Isreal 8887cbe592
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled
Configure ImmuneBuilder pipeline for WES execution
- Update container image to harbor.cluster.omic.ai/omic/immunebuilder:latest
- Update input/output paths to S3 (s3://omic/eureka/immunebuilder/)
- Remove local mount containerOptions (not needed in k8s)
- Update homepage to Gitea repo URL
- Clean history to remove large model weight blobs
2026-03-16 15:31:53 +01:00

131 lines
3.0 KiB
Plaintext

#!/usr/bin/env nextflow
nextflow.enable.dsl=2
params.fasta = 's3://omic/eureka/immunebuilder/antibody_test.fasta'
params.outdir = 's3://omic/eureka/immunebuilder/output'
params.mode = 'antibody'
params.verbose = true
params.original_weights = false
process ABODYBUILDER2 {
container 'harbor.cluster.omic.ai/omic/immunebuilder:latest'
publishDir params.outdir, mode: 'copy'
stageInMode 'copy'
input:
path fasta
output:
path "${fasta.simpleName}.pdb", emit: structure
path "run.log", emit: logfile
script:
"""
export HOME=/home/mambauser
/opt/conda/bin/ABodyBuilder2 \\
-f ${fasta} \\
-o ${fasta.simpleName}.pdb \\
${params.verbose ? '-v' : ''} 2>&1 | tee run.log
"""
}
process NANOBODYBUILDER2 {
container 'harbor.cluster.omic.ai/omic/immunebuilder:latest'
publishDir params.outdir, mode: 'copy'
stageInMode 'copy'
input:
path fasta
output:
path "${fasta.simpleName}.pdb", emit: structure
path "run.log", emit: logfile
script:
"""
export HOME=/home/mambauser
/opt/conda/bin/NanoBodyBuilder2 \\
-f ${fasta} \\
-o ${fasta.simpleName}.pdb \\
${params.verbose ? '-v' : ''} 2>&1 | tee run.log
"""
}
process TCRBUILDER2 {
container 'harbor.cluster.omic.ai/omic/immunebuilder:latest'
publishDir params.outdir, mode: 'copy'
stageInMode 'copy'
input:
path fasta
output:
path "${fasta.simpleName}.pdb", emit: structure
path "run.log", emit: logfile
script:
"""
export HOME=/home/mambauser
/opt/conda/bin/TCRBuilder2 \\
-f ${fasta} \\
-o ${fasta.simpleName}.pdb \\
${params.verbose ? '-v' : ''} \\
${params.original_weights ? '--original_weights' : ''} 2>&1 | tee run.log
"""
}
workflow PREDICT_ANTIBODY {
take:
fasta_ch
main:
ABODYBUILDER2(fasta_ch)
emit:
structure = ABODYBUILDER2.out.structure
logfile = ABODYBUILDER2.out.logfile
}
workflow PREDICT_NANOBODY {
take:
fasta_ch
main:
NANOBODYBUILDER2(fasta_ch)
emit:
structure = NANOBODYBUILDER2.out.structure
logfile = NANOBODYBUILDER2.out.logfile
}
workflow PREDICT_TCR {
take:
fasta_ch
main:
TCRBUILDER2(fasta_ch)
emit:
structure = TCRBUILDER2.out.structure
logfile = TCRBUILDER2.out.logfile
}
workflow {
if (!params.fasta) {
error "Please provide input FASTA file(s) using --fasta parameter"
}
fasta_ch = Channel.fromPath(params.fasta, checkIfExists: true)
if (params.mode == 'antibody') {
PREDICT_ANTIBODY(fasta_ch)
} else if (params.mode == 'nanobody') {
PREDICT_NANOBODY(fasta_ch)
} else if (params.mode == 'tcr') {
PREDICT_TCR(fasta_ch)
} else {
error "Invalid mode: ${params.mode}. Please use 'antibody', 'nanobody', or 'tcr'"
}
}