11#! /usr/bin/env nextflow
22nextflow. enable. dsl= 2
33
4- // Define the command-line options to specify the path to VCF files
5- params. sample_sheet = ' .test_data/file_list.txt'
6- params. build = " hg38"
7- params. oc_modules = " /Volumes/my_book/james/opencravat/modules"
84// Define the Scratch directory
95def scratch_dir = System . getenv(" USER_SCRATCH" ) ?: " /tmp"
106
7+ // Define the command-line options to specify the path to VCF files
118params. outdir = " ${ scratch_dir} "
9+ params. sample_sheet = ' .test_data/file_list.txt'
10+ params. build = " hg38"
11+ params. oc_modules = " /Volumes/my_book/james/opencravat/modules"
1212
1313// Define the output directory for intermediate and final results
1414output_dir = params. outdir
@@ -25,10 +25,8 @@ log.info """\
2525 """
2626 .stripIndent()
2727
28-
2928// Define the process to run 'oc' with the specified parameters
3029process runOC {
31-
3230 // Define the conda environment file to be used
3331 conda ' ./configs/conda/open-cravat.yaml'
3432
@@ -52,7 +50,6 @@ process runOC {
5250
5351// Define the process to parse the annotation
5452process parseAnnotation {
55-
5653 // Define the conda environment file to be used
5754 conda ' python=3.10'
5855
@@ -70,7 +67,6 @@ process parseAnnotation {
7067
7168// Define the process for prediction
7269process prediction {
73-
7470 // Define the conda environment file to be used
7571 conda ' ./configs/conda/ditto-nf.yaml'
7672
@@ -87,7 +83,6 @@ process prediction {
8783// 'vcfFile' will be the channel containing the input VCF files
8884// Each file in the channel will be processed through the steps defined above.
8985workflow {
90-
9186 // Define input channels for the VCF files
9287 vcfFile = Channel . fromPath(params. sample_sheet). splitCsv(header : false )
9388 vcfBuild = params. build
@@ -96,6 +91,7 @@ workflow {
9691 // Run processes
9792 runOC(vcfFile,vcfBuild,oc_mod_path )
9893 parseAnnotation(runOC. out)
94+
9995 // Scatter the output of parseAnnotation to process each file separately
10096 parseAnnotation. out. flatten(). set { parsed_files }
10197 prediction(parsed_files)
0 commit comments