diff --git a/CHANGELOG.md b/CHANGELOG.md index 11943c7..b15aa6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,35 @@ Changes should fall into one of the following categories: - `Removed`, for now removed features. - `Fixed`, for any bug fixes. -## [2.6.0] - In development + +## [2.8.0] +### Added + +### Changed + +### Removed + +### Deprecated + + +## [2.7.0] - 2019-01-16 +### Added +- New command-line argument `--ignore_contamination_screen` will ignore all inputs + that `FAIL` mash screen contamination check. + +### Changed +- Set default errorstrategy for Nextflow to `ignore`. +- Updated process declarations to use new `withName` syntax. + +### Removed +- The intermediate output from `mash screen` (i.e. `.mash_screen.tsv`) + is now removed from the output directory, in favor of the concatenated table + `all_samples.mash_screening_results.tsv`, containing results for all samples. + +### Deprecated + + +## [2.6.0] - 2018-05-28 ### Added - Created this changelog. - New output file, `all_samples.mash_screening_results.tsv`, which is a concatenation diff --git a/bactpipe.nf b/bactpipe.nf index 0df138f..4581a21 100755 --- a/bactpipe.nf +++ b/bactpipe.nf @@ -1,7 +1,7 @@ #!/usr/bin/env nextflow // vim: syntax=groovy expandtab -bactpipe_version = '2.6.0' +bactpipe_version = '2.7.0' nf_required_version = '0.26.0' log.info "".center(60, "=") @@ -111,7 +111,6 @@ try { process screen_for_contaminants { validExitStatus 0,3 tag { pair_id } - publishDir "${params.output_dir}/mash_screen", mode: 'copy' input: set pair_id, file(reads) from mash_input @@ -164,6 +163,10 @@ pure_isolates = screening_results_for_bbduk.filter { passed = screening_result == "PASS" if ( ! passed ) { log.warn "'${it[0]}' might not be a pure isolate! Check screening results in the output folder." + if ( params.ignore_contamination_screen ) { + log.warn "Ignoring warning for '${it[0]}' (ignore_contamination_screen=true)." + passed = true + } } return passed } @@ -299,6 +302,14 @@ process prokka { prokka_reference_argument = "--proteins ${params.prokka_reference}" } gram_stain_argument = "" + /* + * If ignore_contamination_screen is used, gram_stain is a string with + * potentially several comma-separated gram stain assignments. We just + * use the first one. + */ + if ( gram_stain.split(", ").size() > 1 ) { + gram_stain = gram_stain.split(", ")[0] + } if (gram_stain) { gram_stain_argument = "--gram ${gram_stain}" } diff --git a/conf/ctmrnas.config b/conf/ctmrnas.config index 35817c7..fa1a487 100755 --- a/conf/ctmrnas.config +++ b/conf/ctmrnas.config @@ -7,6 +7,7 @@ params { } process { + errorStrategy = 'ignore' executor = 'local' clusterOptions = { " -A ${params.project}" + (params.clusterOptions ?: '') @@ -16,27 +17,27 @@ process { stageOutMode = 'copy' //Resource and module requirements - $screen_for_contaminants { + withName: screen_for_contaminants { cpus = 8 time = 15.m } - $bbduk { + withName: bbduk { cpus = 4 time = 15.m } - $fastqc { + withName: fastqc { cpus = 2 time = 30.m } - $shovill { + withName: shovill { cpus = 8 time = 1.h } - $prokka { + withName: prokka { cpus = 1 time = 2.h } - $multiqc { + withName: multiqc { cpus = 1 time = 10.m } diff --git a/conf/local.config b/conf/local.config index c8d7236..c532873 100755 --- a/conf/local.config +++ b/conf/local.config @@ -1,33 +1,34 @@ // vim: syntax=groovy expandtab // BACTpipe Nextflow configuration file process { + errorStrategy = 'ignore' executor = 'local' scratch = true stageInMode = 'copy' stageOutMode = 'copy' //Resource and module requirements - $screen_for_contaminants { + withName: screen_for_contaminants { cpus = 1 time = 20.m } - $bbduk { + withName: bbduk { cpus = 1 time = 20.m } - $fastqc { + withName: fastqc { cpus = 1 time = 40.m } - $shovill { + withName: shovill { cpus = 1 time = 3.h } - $prokka { + withName: prokka { cpus = 1 time = 2.h } - $multiqc { + withName: multiqc { cpus = 1 time = 10.m } diff --git a/conf/params.config b/conf/params.config index 0872928..3bbc885 100755 --- a/conf/params.config +++ b/conf/params.config @@ -8,6 +8,7 @@ params { reads = "" // Set on command line as e.g.: --reads 'path/to/*_R{1,2}.fastq.gz' mashscreen_database = "" // Often set in specific profiles + ignore_contamination_screen = false bbduk_adapters = "adapters" // Set to "adapters" to use adapters bundled with BBDuk bbduk_minlen = "30" diff --git a/conf/rackham.config b/conf/rackham.config index c493c3a..e3ee80c 100755 --- a/conf/rackham.config +++ b/conf/rackham.config @@ -6,6 +6,7 @@ params { } process { + errorStrategy = 'ignore' executor = 'slurm' clusterOptions = { " -A ${params.project}" + (params.clusterOptions ?: '') @@ -16,36 +17,36 @@ process { //Resource and module requirements - $screen_for_contaminants { - module = 'python/3.6.0' + withName: screen_for_contaminants { + module = 'bioinfo-tools:mash/2.0:python/3.6.0' cpus = 2 time = 30.m } - $bbduk { + withName: bbduk { module = 'bioinfo-tools:bbmap' cpus = 1 memory = 8.GB time = 20.m } - $fastqc { + withName: fastqc { module = 'bioinfo-tools:FastQC' cpus = 2 time = 40.m memory = 16.GB } - $shovill { + withName: shovill { module = 'bioinfo-tools:shovill/1.0.0' cpus = 16 time = 3.h memory = 32.GB } - $prokka { + withName: prokka { module = 'bioinfo-tools:prokka/1.12-12547ca' cpus = 1 time = 2.h memory = 8.GB } - $multiqc { + withName: multiqc { module = 'bioinfo-tools:MultiQC/1.5' cpus = 1 time = 10.m diff --git a/docs/source/conf.py b/docs/source/conf.py index b5085d0..d5554ae 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -57,9 +57,9 @@ # built documents. # # The short X.Y version. -version = '2.6' +version = '2.7' # The full version, including alpha/beta/rc tags. -release = '2.6.0' +release = '2.7.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/running.rst b/docs/source/running.rst index 924576f..e4cbea3 100644 --- a/docs/source/running.rst +++ b/docs/source/running.rst @@ -48,27 +48,28 @@ when running BACTpipe, e.g.:: The ``--bbduk_mink`` flag will modify the minimum kmer length for BBDuk. The following parameters can be easily configured from the command line:: - Parameter name Default setting - output_dir BACTpipe_results - reads [empty] - mashscreen_database Path to refseq minhash sketches for Mash screen - bbduk_adapters [default BBDuk adapters] - bbduk_minlen 30 - bbduk_qtrim rl - bbduk_trimq 10 - bbduk_ktrim r - bbduk_k 30 - bbduk_mink 11 - bbduk_hdist 1 - bbduk_trimbyoverlap trimbyoverlap - bbduk_trimpairsevenly trimpairsevenly - shovill_depth 100 - shovill_kmers 31,33,55,77,99,127 - shovill_minlen 500 - prokka_evalue 1e-09 - prokka_kingdom Bacteria - prokka_reference [not used] - prokka_gram_stain [not used] + Parameter name Default setting + output_dir BACTpipe_results + reads [empty] + mashscreen_database Path to refseq minhash sketches for Mash screen + ignore_contamination_screen [false] + bbduk_adapters [default BBDuk adapters] + bbduk_minlen 30 + bbduk_qtrim rl + bbduk_trimq 10 + bbduk_ktrim r + bbduk_k 30 + bbduk_mink 11 + bbduk_hdist 1 + bbduk_trimbyoverlap trimbyoverlap + bbduk_trimpairsevenly trimpairsevenly + shovill_depth 100 + shovill_kmers 31,33,55,77,99,127 + shovill_minlen 500 + prokka_evalue 1e-09 + prokka_kingdom Bacteria + prokka_reference [not used] + prokka_gram_stain [not used] To modify any parameter, just add ``-- `` on the command line when running BACTpipe, e.g. ``--shovill_depth 75`` to set