Skip to content

Commit

Permalink
Merge pull request #230 from drpatelh/updates
Browse files Browse the repository at this point in the history
Pre-release bug fixes
  • Loading branch information
drpatelh authored Jul 28, 2021
2 parents 232827f + a9c51b7 commit 0e659df
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 41 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [[2.2](https://github.com/nf-core/rnaseq/releases/tag/2.2)] - 2021-07-28
## [[2.2](https://github.com/nf-core/rnaseq/releases/tag/2.2)] - 2021-07-29

### Enhancements & fixes

* Updated pipeline template to [nf-core/tools 2.1](https://github.com/nf-core/tools/releases/tag/2.1)
* Remove custom content to render Pangolin report in MultiQC as it was officially added as a module in [v1.11](https://github.com/ewels/MultiQC/pull/1458)
* [[#212](https://github.com/nf-core/viralrecon/issues/212)] - Access to `PYCOQC.out` is undefined
* [[#229](https://github.com/nf-core/viralrecon/issues/229)] - ARTIC Guppyplex settings for 1200bp ARTIC primers with Nanopore data

### Software dependencies

Expand Down
20 changes: 10 additions & 10 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ process {

// Process-specific resource requirements
withLabel:process_low {
cpus = { check_max( 2 * task.attempt, 'cpus' ) }
memory = { check_max( 12.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
cpus = { check_max( 2 * task.attempt, 'cpus' ) }
memory = { check_max( 12.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
}
withLabel:process_medium {
cpus = { check_max( 6 * task.attempt, 'cpus' ) }
memory = { check_max( 36.GB * task.attempt, 'memory' ) }
time = { check_max( 8.h * task.attempt, 'time' ) }
cpus = { check_max( 6 * task.attempt, 'cpus' ) }
memory = { check_max( 36.GB * task.attempt, 'memory' ) }
time = { check_max( 8.h * task.attempt, 'time' ) }
}
withLabel:process_high {
cpus = { check_max( 12 * task.attempt, 'cpus' ) }
memory = { check_max( 72.GB * task.attempt, 'memory' ) }
time = { check_max( 16.h * task.attempt, 'time' ) }
cpus = { check_max( 12 * task.attempt, 'cpus' ) }
memory = { check_max( 72.GB * task.attempt, 'memory' ) }
time = { check_max( 16.h * task.attempt, 'time' ) }
}
withLabel:process_long {
time = { check_max( 20.h * task.attempt, 'time' ) }
time = { check_max( 20.h * task.attempt, 'time' ) }
}
withLabel:process_high_memory {
memory = { check_max( 200.GB * task.attempt, 'memory' ) }
Expand Down
3 changes: 3 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ params {
publish_dir = "${params.artic_minion_caller}/pangolin"
}
'nanopore_nextclade' {
publish_files = ['csv':'']
publish_dir = "${params.artic_minion_caller}/nextclade"
}
'nanopore_asciigenome' {
Expand Down Expand Up @@ -298,6 +299,7 @@ params {
publish_dir = 'variants/ivar/pangolin'
}
'illumina_ivar_nextclade' {
publish_files = ['csv':'']
publish_dir = 'variants/ivar/nextclade'
}
'illumina_ivar_asciigenome' {
Expand Down Expand Up @@ -369,6 +371,7 @@ params {
publish_dir = 'variants/bcftools/pangolin'
}
'illumina_bcftools_nextclade' {
publish_files = ['csv':'']
publish_dir = 'variants/bcftools/nextclade'
}
'illumina_bcftools_asciigenome' {
Expand Down
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"git_sha": "e937c7950af70930d1f34bb961403d9d2aa81c7d"
},
"nextclade": {
"git_sha": "e937c7950af70930d1f34bb961403d9d2aa81c7d"
"git_sha": "29c847424034eb04765d7378fb384ad3094a66a6"
},
"pangolin": {
"git_sha": "e7e30b6da631ce5288151af4e46488ac6d294ff4"
Expand Down
4 changes: 2 additions & 2 deletions modules/local/multiqc_illumina.nf
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ process MULTIQC {
multiqc_to_custom_csv.py --platform illumina
## Manually remove files that we don't want in the report
if grep -q skip_assembly workflow_summary_mqc.yaml; then
if grep -q ">skip_assembly<" workflow_summary_mqc.yaml; then
rm -f *assembly_metrics_mqc.csv
fi
if grep -q skip_variants workflow_summary_mqc.yaml; then
if grep -q ">skip_variants<" workflow_summary_mqc.yaml; then
rm -f *variants_metrics_mqc.csv
fi
Expand Down
25 changes: 9 additions & 16 deletions modules/nf-core/modules/nextclade/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,28 @@ process NEXTCLADE {

input:
tuple val(meta), path(fasta)
val output_format

output:
tuple val(meta), path("${prefix}.csv") , optional:true, emit: csv
tuple val(meta), path("${prefix}.json") , optional:true, emit: json
tuple val(meta), path("${prefix}.tree.json") , optional:true, emit: json_tree
tuple val(meta), path("${prefix}.tsv") , optional:true, emit: tsv
tuple val(meta), path("${prefix}.csv") , emit: csv
tuple val(meta), path("${prefix}.json") , emit: json
tuple val(meta), path("${prefix}.tree.json") , emit: json_tree
tuple val(meta), path("${prefix}.tsv") , emit: tsv
tuple val(meta), path("${prefix}.clades.tsv"), optional:true, emit: tsv_clades
path "*.version.txt" , emit: version

script:
def software = getSoftwareName(task.process)
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def format = output_format
if (!(format in ['json', 'csv', 'tsv', 'tree', 'tsv-clades-only'])) {
format = 'json'
}
def extension = format
if (format in ['tsv-clades-only']) {
extension = '.clades.tsv'
} else if (format in ['tree']) {
extension = 'tree.json'
}
"""
nextclade \\
$options.args \\
--jobs $task.cpus \\
--input-fasta $fasta \\
--output-${format} ${prefix}.${extension}
--output-json ${prefix}.json \\
--output-csv ${prefix}.csv \\
--output-tsv ${prefix}.tsv \\
--output-tsv-clades-only ${prefix}.clades.tsv \\
--output-tree ${prefix}.tree.json
echo \$(nextclade --version 2>&1) > ${software}.version.txt
"""
Expand Down
7 changes: 1 addition & 6 deletions modules/nf-core/modules/nextclade/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tools:
documentation: None
tool_dev_url: https://github.com/nextstrain/nextclade
doi: ""
licence: ['MIT']
licence: ["MIT"]

input:
- meta:
Expand All @@ -23,11 +23,6 @@ input:
type: file
description: FASTA file containing one or more consensus sequences
pattern: "*.{fasta,fa}"
- output_format:
type: string
description: |
String for output format supported by nextclade
i.e one of 'json', 'csv', 'tsv', 'tree', 'tsv-clades-only'

output:
- meta:
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/variants_bcftools.nf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ workflow VARIANTS_BCFTOOLS {
}

if (!params.skip_nextclade) {
NEXTCLADE ( ch_consensus, 'csv' )
NEXTCLADE ( ch_consensus )
ch_nextclade_report = NEXTCLADE.out.csv
ch_nextclade_version = NEXTCLADE.out.version
}
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/variants_ivar.nf
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ workflow VARIANTS_IVAR {
}

if (!params.skip_nextclade) {
NEXTCLADE ( ch_consensus, 'csv' )
NEXTCLADE ( ch_consensus )
ch_nextclade_report = NEXTCLADE.out.csv
ch_nextclade_version = NEXTCLADE.out.version
}
Expand Down
19 changes: 16 additions & 3 deletions workflows/nanopore.nf
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,23 @@ def artic_minion_options = modules['nanopore_artic_minion']
artic_minion_options.args += params.artic_minion_caller == 'medaka' ? Utils.joinModuleArgs(['--medaka']) : ''
artic_minion_options.args += params.artic_minion_aligner == 'bwa' ? Utils.joinModuleArgs(['--bwa']) : Utils.joinModuleArgs(['--minimap2'])

def artic_guppyplex_options = modules['nanopore_artic_guppyplex']
if (params.primer_set_version == 1200) {
def args_split = artic_guppyplex_options.args.tokenize()
def min_idx = args_split.indexOf('--min-length')
def max_idx = args_split.indexOf('--max-length')
if (min_idx != -1) {
args_split[min_idx+1] = '250'
}
if (max_idx != -1) {
args_split[max_idx+1] = '1500'
}
artic_guppyplex_options.args = args_split.join(' ')
}

include { PYCOQC } from '../modules/nf-core/modules/pycoqc/main' addParams( options: modules['nanopore_pycoqc'] )
include { NANOPLOT } from '../modules/nf-core/modules/nanoplot/main' addParams( options: modules['nanopore_nanoplot'] )
include { ARTIC_GUPPYPLEX } from '../modules/nf-core/modules/artic/guppyplex/main' addParams( options: modules['nanopore_artic_guppyplex'] )
include { ARTIC_GUPPYPLEX } from '../modules/nf-core/modules/artic/guppyplex/main' addParams( options: artic_guppyplex_options )
include { ARTIC_MINION } from '../modules/nf-core/modules/artic/minion/main' addParams( options: artic_minion_options )
include { BCFTOOLS_STATS } from '../modules/nf-core/modules/bcftools/stats/main' addParams( options: modules['nanopore_bcftools_stats'] )
include { QUAST } from '../modules/nf-core/modules/quast/main' addParams( options: modules['nanopore_quast'] )
Expand Down Expand Up @@ -373,8 +387,7 @@ workflow NANOPORE {
ch_nextclade_multiqc = Channel.empty()
if (!params.skip_nextclade) {
NEXTCLADE (
ARTIC_MINION.out.fasta,
'csv'
ARTIC_MINION.out.fasta
)
ch_software_versions = ch_software_versions.mix(NEXTCLADE.out.version.ifEmpty(null))

Expand Down

0 comments on commit 0e659df

Please sign in to comment.