From 4068fc13b8450019e943e52ed117201577ceca48 Mon Sep 17 00:00:00 2001 From: evanbiederstedt Date: Thu, 21 Nov 2019 14:00:18 -0500 Subject: [PATCH 1/2] added config, shebangs to the NF scripts --- nextflow.config | 63 ++++++++++++++++++++++++++++++++++ nextflow/fake_remove_contam.nf | 2 ++ nextflow/generic_pipeline.nf | 2 ++ nextflow/import.nf | 2 ++ nextflow/mykrobe_predict.nf | 2 ++ nextflow/qc.nf | 2 ++ nextflow/remove_contam.nf | 2 ++ nextflow/variant_call.nf | 2 ++ 8 files changed, 77 insertions(+) create mode 100644 nextflow.config diff --git a/nextflow.config b/nextflow.config new file mode 100644 index 0000000..6da7b13 --- /dev/null +++ b/nextflow.config @@ -0,0 +1,63 @@ +/* + * ------------------------------------------------- + * Nextflow config file for clockwork + * ------------------------------------------------- + * + */ + + +manifest { + author = 'Martin Hunt et al' + description = '' + homePage = 'https://github.com/iqbal-lab-org/clockwork' + name = 'clockwork' + nextflowVersion = '>=19.07.0' + version = '0.8.0' +} + + + +params { + outDir = "${PWD}" // Path to output directory, default PWD + sample = "test_samples.tsv" // sample TSV file + genome = 'GRCh37' // Default reference genome is GRCh38 + // path to reference files subdirectory + verbose = false // Enable for more verbose information, default false + test = false // boolean Not testing by default + markdup_java_options = '"-Xms4000m -Xmx7g"' // Established values for markDuplicate memory consumption + // see https://github.com/SciLifeLab/Sarek/blob/master/conf/base.config + singleCPUMem = 7.GB // for processes that are using more memory but a single CPU only + publishDirMode = 'link' // publishDir mode is 'link' by default + tools = 'delly,facets,mutect2,manta,strelka2,msisensor,haplotypecaller,polysolver,mutsig,neoantigen,lohhla,pileup,conpair,conpairall' + assayType = "exome" // either 'exome' or 'genome'; default exome + somatic = false + germline = false + debug = false + outname = 'make_bam_output.tsv' + publishAll = false + mapping = false + pairing = false + bam_pairing = false +} + + +trace { + enabled = true + file = 'trace.txt' + fields = 'task_id,hash,native_id,process,tag,name,status,exit,module,container,cpus,time,disk,memory,attempt,submit,start,complete,duration,realtime,queue,%cpu,%mem,rss,vmem,peak_rss,peak_vmem,rchar,wchar,syscr,syscw,read_bytes,write_bytes' +} + +timeline { + enabled = true + file = 'timeline.html' +} + +report { + enabled = true + file = 'report.html' +} + +dag { + enabled = false + file = 'dag.pdf' +} \ No newline at end of file diff --git a/nextflow/fake_remove_contam.nf b/nextflow/fake_remove_contam.nf index 8682ebc..a161e8d 100644 --- a/nextflow/fake_remove_contam.nf +++ b/nextflow/fake_remove_contam.nf @@ -1,3 +1,5 @@ +#!/usr/bin/env nextflow + params.help = false params.pipeline_root = "" params.db_config_file = "" diff --git a/nextflow/generic_pipeline.nf b/nextflow/generic_pipeline.nf index 3a2aa56..9771f34 100644 --- a/nextflow/generic_pipeline.nf +++ b/nextflow/generic_pipeline.nf @@ -1,3 +1,5 @@ +#!/usr/bin/env nextflow + params.help = false params.pipeline_root = "" params.db_config_file = "" diff --git a/nextflow/import.nf b/nextflow/import.nf index 8e189ba..211a616 100644 --- a/nextflow/import.nf +++ b/nextflow/import.nf @@ -1,3 +1,5 @@ +#!/usr/bin/env nextflow + params.help = false params.dropbox_dir = "" params.pipeline_root = "" diff --git a/nextflow/mykrobe_predict.nf b/nextflow/mykrobe_predict.nf index 8a3754f..6d701f6 100644 --- a/nextflow/mykrobe_predict.nf +++ b/nextflow/mykrobe_predict.nf @@ -1,3 +1,5 @@ +#!/usr/bin/env nextflow + params.help = false params.ref_id = "" params.references_root = "" diff --git a/nextflow/qc.nf b/nextflow/qc.nf index a62b6bc..8dd94a5 100644 --- a/nextflow/qc.nf +++ b/nextflow/qc.nf @@ -1,3 +1,5 @@ +#!/usr/bin/env nextflow + params.help = false params.ref_id = "" params.references_root = "" diff --git a/nextflow/remove_contam.nf b/nextflow/remove_contam.nf index 9df0468..3bf299f 100644 --- a/nextflow/remove_contam.nf +++ b/nextflow/remove_contam.nf @@ -1,3 +1,5 @@ +#!/usr/bin/env nextflow + params.help = false params.reads_in1 = "" params.reads_in2 = "" diff --git a/nextflow/variant_call.nf b/nextflow/variant_call.nf index 117d9d6..167dbb7 100644 --- a/nextflow/variant_call.nf +++ b/nextflow/variant_call.nf @@ -1,3 +1,5 @@ +#!/usr/bin/env nextflow + params.help = false params.ref_id = "" params.references_root = "" From 72b2d7e3667dc6f8784a5258235f99fa066b1a2b Mon Sep 17 00:00:00 2001 From: evanbiederstedt Date: Thu, 21 Nov 2019 14:51:39 -0500 Subject: [PATCH 2/2] revised params in nextflow.config --- nextflow.config | 56 ++++++++++++++++++++-------------- nextflow/fake_remove_contam.nf | 7 ----- nextflow/generic_pipeline.nf | 10 ------ nextflow/import.nf | 7 ----- nextflow/mykrobe_predict.nf | 8 ----- nextflow/qc.nf | 14 --------- nextflow/remove_contam.nf | 16 ---------- nextflow/variant_call.nf | 22 ------------- 8 files changed, 33 insertions(+), 107 deletions(-) diff --git a/nextflow.config b/nextflow.config index 6da7b13..1ba6fe3 100644 --- a/nextflow.config +++ b/nextflow.config @@ -8,36 +8,46 @@ manifest { author = 'Martin Hunt et al' - description = '' + description = 'Pipelines for processing bacterial sequence data (Illumina only) and variant calling' homePage = 'https://github.com/iqbal-lab-org/clockwork' name = 'clockwork' nextflowVersion = '>=19.07.0' version = '0.8.0' } - - params { - outDir = "${PWD}" // Path to output directory, default PWD - sample = "test_samples.tsv" // sample TSV file - genome = 'GRCh37' // Default reference genome is GRCh38 - // path to reference files subdirectory - verbose = false // Enable for more verbose information, default false - test = false // boolean Not testing by default - markdup_java_options = '"-Xms4000m -Xmx7g"' // Established values for markDuplicate memory consumption - // see https://github.com/SciLifeLab/Sarek/blob/master/conf/base.config - singleCPUMem = 7.GB // for processes that are using more memory but a single CPU only - publishDirMode = 'link' // publishDir mode is 'link' by default - tools = 'delly,facets,mutect2,manta,strelka2,msisensor,haplotypecaller,polysolver,mutsig,neoantigen,lohhla,pileup,conpair,conpairall' - assayType = "exome" // either 'exome' or 'genome'; default exome - somatic = false - germline = false - debug = false - outname = 'make_bam_output.tsv' - publishAll = false - mapping = false - pairing = false - bam_pairing = false + cortex_mem_height = 22 + dataset_name = "" + db_config_file = "" + dropbox_dir = "" + help = false + max_forks = 20 // also listed as 100, https://github.com/iqbal-lab-org/clockwork/blob/master/nextflow/generic_pipeline.nf#L6 + max_forks_combine_variant_calls = 100 + max_forks_cortex = 100 + max_forks_fastqc = 100 + max_forks_map_reads = 100 + max_forks_sam_to_fastq_files = 100 + max_forks_samtools = 100 + max_forks_samtools_qc = 100 + max_forks_trim_reads = 100 + max_ram = 4 + minos_max_read_length = 200 + outprefix = "" + output_dir = "" + pipeline_name = "" + pipeline_root = "" + reads_in1 = "" + reads_in2 = "" + ref_dir = "" + ref_fasta = "" + ref_id = "" + ref_metadata_tsv = "" + references_root = "" + sample_name = "" + script = "" + testing = false + truth_ref = "" + xlsx_archive_dir = "" } diff --git a/nextflow/fake_remove_contam.nf b/nextflow/fake_remove_contam.nf index a161e8d..02aad91 100644 --- a/nextflow/fake_remove_contam.nf +++ b/nextflow/fake_remove_contam.nf @@ -1,12 +1,5 @@ #!/usr/bin/env nextflow -params.help = false -params.pipeline_root = "" -params.db_config_file = "" -params.dataset_name = "" -params.max_forks = 20 - - if (params.help){ log.info""" Clockwork fake_remove_contam pipeline. Fakes a run of remove_contam pipeline, diff --git a/nextflow/generic_pipeline.nf b/nextflow/generic_pipeline.nf index 9771f34..dea4465 100644 --- a/nextflow/generic_pipeline.nf +++ b/nextflow/generic_pipeline.nf @@ -1,15 +1,5 @@ #!/usr/bin/env nextflow -params.help = false -params.pipeline_root = "" -params.db_config_file = "" -params.dataset_name = "" -params.script = "" -params.max_forks = 100 -params.max_ram = 4 -params.pipeline_name = "" - - if (params.help){ log.info""" Clockwork generic pipeline. Runs a user-provided diff --git a/nextflow/import.nf b/nextflow/import.nf index 211a616..ab38b83 100644 --- a/nextflow/import.nf +++ b/nextflow/import.nf @@ -1,12 +1,5 @@ #!/usr/bin/env nextflow -params.help = false -params.dropbox_dir = "" -params.pipeline_root = "" -params.db_config_file = "" -params.xlsx_archive_dir = "" - - if (params.help){ log.info""" Clockwork import pipeline. Imports data from dropbox directory. diff --git a/nextflow/mykrobe_predict.nf b/nextflow/mykrobe_predict.nf index 6d701f6..df433d1 100644 --- a/nextflow/mykrobe_predict.nf +++ b/nextflow/mykrobe_predict.nf @@ -1,13 +1,5 @@ #!/usr/bin/env nextflow -params.help = false -params.ref_id = "" -params.references_root = "" -params.pipeline_root = "" -params.db_config_file = "" -params.dataset_name = "" -params.testing = false - if (params.testing) { test_opt_string = '--testing' } diff --git a/nextflow/qc.nf b/nextflow/qc.nf index 8dd94a5..33845c5 100644 --- a/nextflow/qc.nf +++ b/nextflow/qc.nf @@ -1,19 +1,5 @@ #!/usr/bin/env nextflow -params.help = false -params.ref_id = "" -params.references_root = "" -params.pipeline_root = "" -params.db_config_file = "" -params.dataset_name = "" -params.ref_fasta = "" -params.reads_in1 = "" -params.reads_in2 = "" -params.output_dir = "" -params.max_forks_samtools_qc = 100 -params.max_forks_fastqc = 100 - - if (params.help){ log.info""" Clockwork QC pipeline. diff --git a/nextflow/remove_contam.nf b/nextflow/remove_contam.nf index 3bf299f..7068c28 100644 --- a/nextflow/remove_contam.nf +++ b/nextflow/remove_contam.nf @@ -1,21 +1,5 @@ #!/usr/bin/env nextflow -params.help = false -params.reads_in1 = "" -params.reads_in2 = "" -params.outprefix = "" -params.ref_metadata_tsv = "" -params.pipeline_root = "" -params.references_root = "" -params.db_config_file = "" -params.dataset_name = "" -params.ref_fasta = "" -params.ref_id = "" -params.testing = false -params.max_forks_map_reads = 100 -params.max_forks_sam_to_fastq_files = 100 - - if (params.help){ log.info""" Clockwork remove_contam pipeline. Removes reads that are contaminated. diff --git a/nextflow/variant_call.nf b/nextflow/variant_call.nf index 167dbb7..5caad54 100644 --- a/nextflow/variant_call.nf +++ b/nextflow/variant_call.nf @@ -1,27 +1,5 @@ #!/usr/bin/env nextflow -params.help = false -params.ref_id = "" -params.references_root = "" -params.pipeline_root = "" -params.db_config_file = "" -params.dataset_name = "" -params.ref_dir = "" -params.reads_in1 = "" -params.reads_in2 = "" -params.output_dir = "" -params.sample_name = "" -params.testing = false -params.cortex_mem_height = 22 -params.max_forks_trim_reads = 100 -params.max_forks_map_reads = 100 -params.max_forks_samtools = 100 -params.max_forks_cortex = 100 -params.max_forks_combine_variant_calls = 100 -params.minos_max_read_length = 200 -params.truth_ref = "" - - if (params.help){ log.info""" Clockwork variant_call pipeline.