Skip to content

Commit

Permalink
Merge pull request #99 from ctmrbio/develop
Browse files Browse the repository at this point in the history
Merge 2.7.0
  • Loading branch information
boulund committed Jan 16, 2019
2 parents b64371d + e80d48b commit 784baba
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 45 deletions.
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. `<sample>.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
Expand Down
15 changes: 13 additions & 2 deletions bactpipe.nf
Original file line number Diff line number Diff line change
@@ -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, "=")
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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}"
}
Expand Down
13 changes: 7 additions & 6 deletions conf/ctmrnas.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ params {
}

process {
errorStrategy = 'ignore'
executor = 'local'
clusterOptions = {
" -A ${params.project}" + (params.clusterOptions ?: '')
Expand All @@ -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
}
Expand Down
13 changes: 7 additions & 6 deletions conf/local.config
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down
1 change: 1 addition & 0 deletions conf/params.config
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 8 additions & 7 deletions conf/rackham.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ params {
}

process {
errorStrategy = 'ignore'
executor = 'slurm'
clusterOptions = {
" -A ${params.project}" + (params.clusterOptions ?: '')
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
43 changes: 22 additions & 21 deletions docs/source/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 ``--<parameter_name> <new_setting>`` on the
command line when running BACTpipe, e.g. ``--shovill_depth 75`` to set
Expand Down

0 comments on commit 784baba

Please sign in to comment.