Skip to content

Commit

Permalink
Merge pull request #37 from CFIA-NCFAD/dev
Browse files Browse the repository at this point in the history
Release 3.3.1
  • Loading branch information
peterk87 committed Aug 2, 2023
2 parents b0d6575 + 2ccb2b4 commit 34c23be
Show file tree
Hide file tree
Showing 34 changed files with 72 additions and 445 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
# Nextflow versions: check pipeline minimum and current latest
nxf_ver: ['21.10.6', '23.04.1']
nxf_ver: ['22.10.1', '23.04.1']
steps:
- name: Check out pipeline code
uses: actions/checkout@v2
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
strategy:
matrix:
# Nextflow versions: check pipeline minimum and current latest
nxf_ver: ['21.10.6', '23.04.1']
nxf_ver: ['22.10.1', '23.04.1']
steps:
- name: Check out pipeline code
uses: actions/checkout@v2
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
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).

## [[3.3.1](https://github.com/CFIA-NCFAD/nf-flu/releases/tag/3.3.1)] - 2023-08-02

### Fixes

* Conda/Mamba env creation when using `conda`/`mamba` profile (#35)

## [[3.3.0](https://github.com/CFIA-NCFAD/nf-flu/releases/tag/3.3.0)] - 2023-07-11

This release migrates to more recently updated Influenza virus sequences since the last update for the [NCBI Influenza DB FTP data](https://ftp.ncbi.nih.gov/genomes/INFLUENZA/) was in 2020-10-13. By default, all Orthomyxoviridae virus sequences were parsed from the daily updated NCBI Viruses [`AllNucleotide.fa`](https://ftp.ncbi.nlm.nih.gov/genomes/Viruses/AllNucleotide/) and [`AllNuclMetadata.csv.gz`](https://ftp.ncbi.nlm.nih.gov/genomes/Viruses/AllNuclMetadata/AllNuclMetadata.csv.gz) and uploaded to [Figshare](https://figshare.com/articles/dataset/2023-06-14_-_NCBI_Viruses_-_Orthomyxoviridae/23608782) as Zstd compressed files. nf-flu no longer uses the [influenza.fna.gz](https://ftp.ncbi.nih.gov/genomes/INFLUENZA/influenza.fna.gz) and [genomeset.dat.gz](https://ftp.ncbi.nih.gov/genomes/INFLUENZA/genomeset.dat.gz) files for Influenza sequences and metadata, respectively.
Expand Down
11 changes: 11 additions & 0 deletions conf/modules_illumina.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Illumina subworkflow process configuration
process {
withName: 'CHECK_SAMPLE_SHEET' {
ext.args = ''
publishDir = [
[
path: { "${params.tracedir}/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
]
}

withName: 'IRMA' {
publishDir = [
[
Expand Down
11 changes: 11 additions & 0 deletions conf/modules_nanopore.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Nanopore subworkflow process configuration
process {
withName: 'CHECK_SAMPLE_SHEET' {
ext.args = ''
publishDir = [
[
path: { "${params.tracedir}/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
]
}

withName: 'IRMA' {
publishDir = [
[
Expand Down
14 changes: 0 additions & 14 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,20 +311,6 @@ Do not use coloured log outputs.

Directory to keep pipeline Nextflow logs and reports.

#### `--enable_conda`

- Optional
- Type: boolean

Run this workflow with Conda. You can also use '-profile conda' instead of providing this parameter.

#### `--use_mamba`

- Optional
- Type: boolean

Use Mamba in place of Conda for faster Conda env creation.

#### `--singularity_pull_docker_container`

- Optional
Expand Down
6 changes: 0 additions & 6 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
"nf-core/modules": {
"custom/dumpsoftwareversions": {
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
},
"multiqc": {
"git_sha": "49b18b1639f4f7104187058866a8fab33332bdfe"
},
"prokka": {
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions modules/local/bcftools.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BCF_CONSENSUS {
tag "$sample|$segment|$ref_id"
label 'process_medium'

conda (params.enable_conda ? 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7' : null)
conda 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/bcftools:1.15.1--h0ea216a_0'
} else {
Expand Down Expand Up @@ -49,7 +49,7 @@ process BCF_FILTER {
tag "$sample|$segment|$ref_id"
label 'process_low'

conda (params.enable_conda ? 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7' : null)
conda 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/bcftools:1.15.1--h0ea216a_0'
} else {
Expand Down Expand Up @@ -94,7 +94,7 @@ process BCFTOOLS_STATS {
tag "$sample|$segment|$ref_id"
label 'process_low'

conda (params.enable_conda ? 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7' : null)
conda 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/bcftools:1.15.1--h0ea216a_0'
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blast_makeblastdb.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ process BLAST_MAKEBLASTDB {
tag "$fasta"
label 'process_low'

conda (params.enable_conda ? 'bioconda::blast=2.14.0' : null)
conda 'bioconda::blast=2.14.0'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/blast:2.14.0--h7d5a4b4_1'
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blastn.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process BLAST_BLASTN {
tag "$meta.id"
label 'process_high'

conda (params.enable_conda ? 'bioconda::blast=2.14.0' : null)
conda 'bioconda::blast=2.14.0'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/blast:2.14.0--h7d5a4b4_1'
} else {
Expand Down
30 changes: 13 additions & 17 deletions modules/local/blastn_report.nf
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions'

params.options = [:]
options = initOptions(params.options)

process BLASTN_REPORT {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? 'conda-forge::python=3.9 conda-forge::biopython=1.78 conda-forge::openpyxl=3.0.7 conda-forge::pandas=1.2.4 conda-forge::rich=10.2.2 conda-forge::typer=0.3.2 conda-forge::xlsxwriter=1.4.3' : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/mulled-v2-693e24f156d01a5f55647120be99929b01b30949:609c862c3470382215fc1b2d9d8a4e9637b2e25f-0'
} else {
container 'quay.io/biocontainers/mulled-v2-693e24f156d01a5f55647120be99929b01b30949:609c862c3470382215fc1b2d9d8a4e9637b2e25f-0'
}
tag "$meta.id"
label 'process_low'
conda 'conda-forge::python=3.9 conda-forge::biopython=1.78 conda-forge::openpyxl=3.0.7 conda-forge::pandas=1.2.4 conda-forge::rich=10.2.2 conda-forge::typer=0.3.2 conda-forge::xlsxwriter=1.4.3'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/mulled-v2-693e24f156d01a5f55647120be99929b01b30949:609c862c3470382215fc1b2d9d8a4e9637b2e25f-0'
} else {
container 'quay.io/biocontainers/mulled-v2-693e24f156d01a5f55647120be99929b01b30949:609c862c3470382215fc1b2d9d8a4e9637b2e25f-0'
}

input:
tuple val(meta), path(blastn_results)
Expand All @@ -25,10 +19,12 @@ process BLASTN_REPORT {
script:
"""
get_blastn_report.py \\
-b $blastn_results \\
--min-aln-length ${params.min_aln_length} \\
-x ${meta.id}-blastn-report.xlsx
-b $blastn_results \\
--min-aln-length ${params.min_aln_length} \\
-x ${meta.id}-blastn-report.xlsx
ln -s .command.log get_blastn_report.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(python --version | sed 's/Python //g')
Expand Down
2 changes: 1 addition & 1 deletion modules/local/cat_illumina_fastq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process CAT_ILLUMINA_FASTQ {
tag "$meta.id"
label 'process_single'

conda (params.enable_conda ? "conda-forge::perl" : null)
conda "conda-forge::perl"
// use BLAST container here since it has Perl and is required by other
// processes in the pipeline
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/check_ref_fasta.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process CHECK_REF_FASTA {
tag "$fasta"
conda (params.enable_conda ? 'bioconda::shiptv=0.4.0' : null)
conda 'bioconda::shiptv=0.4.0'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/shiptv:0.4.0--pyh5e36f6f_0'
} else {
Expand Down
4 changes: 1 addition & 3 deletions modules/local/check_sample_sheet.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
process CHECK_SAMPLE_SHEET {
publishDir "${params.tracedir}/",
mode: params.publish_dir_mode
// using shiptv container since it has pandas, rich, typer installed
conda (params.enable_conda ? 'bioconda::shiptv=0.4.0' : null)
conda 'bioconda::shiptv=0.4.0'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/shiptv:0.4.0--pyh5e36f6f_0'
} else {
Expand Down
7 changes: 4 additions & 3 deletions modules/local/clair3.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process CLAIR3 {
tag "$sample|$segment|$ref_id"
label 'process_low'

conda (params.enable_conda ? 'bioconda::clair3==1.0.2' : null)
conda 'bioconda::clair3==1.0.2'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/clair3:1.0.2--py39hb9dc472_0'
} else {
Expand All @@ -30,14 +30,15 @@ process CLAIR3 {
clair3_dir = "${prefix}.clair3"
clair3_log = "${clair3_dir}/run_clair3.log"
model_suffix = "models/${params.clair3_variant_model}"
using_conda = (workflow.containerEngine == null || workflow.containerEngine == '')
"""
CLAIR_BIN_DIR=\$(dirname \$(which run_clair3.sh))
if [[ "${params.clair3_user_variant_model}" != "" ]] ; then
MODEL_PATH=${model_path}
else
if [[ ${params.enable_conda} = true ]] ; then
if [[ ${using_conda} = true ]] ; then
MODEL_PATH="\$CLAIR_BIN_DIR/${model_suffix}"
else [[ ${params.enable_conda} = false ]]
else [[ ${using_conda} = false ]]
MODEL_PATH="/usr/local/bin/models/${params.clair3_variant_model}"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion modules/local/coverage_plot.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process COVERAGE_PLOT{
tag "$sample|$segment|$ref_id"
label 'process_low'

conda (params.enable_conda ? 'python=3.9 conda-forge::typer=0.3.2 conda-forge::rich=10.6.0 conda-forge::seaborn=0.11.0 conda-forge::pandas=1.3.0 bioconda::bcbio-gff=0.6.6 bioconda::dna_features_viewer=3.0.3' : null)
conda 'python=3.9 conda-forge::typer=0.3.2 conda-forge::rich=10.6.0 conda-forge::seaborn=0.11.0 conda-forge::pandas=1.3.0 bioconda::bcbio-gff=0.6.6 bioconda::dna_features_viewer=3.0.3'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/mulled-v2-596f42d854e849eb773ecd1b48f2b698c2d09c9f:400d0a2593841aa0bfa3402fe85debd55a29cf37-0'
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/irma.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process IRMA {
tag "$meta.id"
label 'process_high'

conda (params.enable_conda ? "bioconda::irma=1.0.2" : null)
conda "bioconda::irma=1.0.2"
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/irma:1.0.2--pl5321hdfd78af_2'
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/medaka.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process MEDAKA {
tag "$sample|$segment|$id"
label 'process_low'

conda (params.enable_conda ? 'bioconda::medaka=1.4.4' : null)
conda 'bioconda::medaka=1.4.4'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/medaka:1.4.4--py38h130def0_0'
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/minimap2.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process MINIMAP2 {
tag "$sample|$segment|$ref_id"
label 'process_low'

conda (params.enable_conda ? 'bioconda::minimap2=2.24 bioconda::samtools=1.15' : null)
conda 'bioconda::minimap2=2.24 bioconda::samtools=1.15'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0'
} else {
Expand Down
4 changes: 2 additions & 2 deletions modules/local/misc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process CAT_NANOPORE_FASTQ {
tag "${meta.id}"
label 'process_low'

conda (params.enable_conda ? "conda-forge::pigz=2.6" : null)
conda "conda-forge::pigz=2.6"
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/mulled-v2-2b04072095278721dc9a5772e61e406f399b6030:7c7abf911e92d7fb831611ffb965f3cf7fe2c01d-0"
} else {
Expand Down Expand Up @@ -60,7 +60,7 @@ process CAT_DB {

process CAT_CONSENSUS {
tag "$sample"
conda (params.enable_conda ? 'bioconda::shiptv=0.4.0' : null)
conda 'bioconda::shiptv=0.4.0'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/shiptv:0.4.0--pyh5e36f6f_0'
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/mosdepth.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process MOSDEPTH_GENOME {
tag "$sample|$segment|$ref_id"
label 'process_low'

conda (params.enable_conda ? 'bioconda::mosdepth=0.3.3' : null)
conda 'bioconda::mosdepth=0.3.3'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/mosdepth:0.3.3--h37c5b7d_2"
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/multiqc.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
process MULTIQC {
label 'process_low'

conda (params.enable_conda ? "bioconda::multiqc=1.12" : null)
conda "bioconda::multiqc=1.12"
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/multiqc:1.12--pyhdfd78af_0'
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/pull_top_ref_id.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process PULL_TOP_REF_ID {
tag "$meta.id"
label 'process_low'

conda (params.enable_conda ? 'conda-forge::python=3.10 conda-forge::biopython=1.80 conda-forge::openpyxl=3.1.0 conda-forge::pandas=1.5.3 conda-forge::rich=12.6.0 conda-forge::typer=0.7.0 conda-forge::xlsxwriter=3.0.8 conda-forge::polars=0.17.9 conda-forge::pyarrow=11.0.0' : null)
conda 'conda-forge::python=3.10 conda-forge::biopython=1.80 conda-forge::openpyxl=3.1.0 conda-forge::pandas=1.5.3 conda-forge::rich=12.6.0 conda-forge::typer=0.7.0 conda-forge::xlsxwriter=3.0.8 conda-forge::polars=0.17.9 conda-forge::pyarrow=11.0.0'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/mulled-v2-cfa20dfeb068db79c8620a11753add64c23d013a:019cd79f70be602ca625a1a0a4eabab462611a3a-0'
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/seqtk_seq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process SEQTK_SEQ{
tag "$sample|$segment|$ref_id"
// use default process resources

conda (params.enable_conda ? "bioconda::seqtk=1.3" : null)
conda "bioconda::seqtk=1.3"
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/seqtk:1.3--h5bf99c6_3'
} else {
Expand Down
4 changes: 3 additions & 1 deletion modules/local/subtyping_report.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ process SUBTYPING_REPORT {
"2 GB"
}
}
conda (params.enable_conda ? 'conda-forge::python=3.10 conda-forge::biopython=1.80 conda-forge::openpyxl=3.1.0 conda-forge::pandas=1.5.3 conda-forge::rich=12.6.0 conda-forge::typer=0.7.0 conda-forge::xlsxwriter=3.0.8 conda-forge::polars=0.17.9 conda-forge::pyarrow=11.0.0' : null)
conda 'conda-forge::python=3.10 conda-forge::biopython=1.80 conda-forge::openpyxl=3.1.0 conda-forge::pandas=1.5.3 conda-forge::rich=12.6.0 conda-forge::typer=0.7.0 conda-forge::xlsxwriter=3.0.8 conda-forge::polars=0.17.9 conda-forge::pyarrow=11.0.0'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/mulled-v2-cfa20dfeb068db79c8620a11753add64c23d013a:019cd79f70be602ca625a1a0a4eabab462611a3a-0'
} else {
Expand All @@ -39,7 +39,9 @@ process SUBTYPING_REPORT {
--excel-report nf-flu-subtyping-report.xlsx \\
--pident-threshold $params.pident_threshold \\
$blastn_results
ln -s .command.log parse_influenza_blast_results.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(python --version | sed 's/Python //g')
Expand Down
2 changes: 1 addition & 1 deletion modules/local/vcf_filter_frameshift.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process VCF_FILTER_FRAMESHIFT {
tag "$sample|$segment|$ref_id"
// use default process resources

conda (params.enable_conda ? 'conda-forge::python=3.9 conda-forge::pandas=1.3.5 conda-forge::typer=0.4.1' : null)
conda 'conda-forge::python=3.9 conda-forge::pandas=1.3.5 conda-forge::typer=0.4.1'
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container 'https://depot.galaxyproject.org/singularity/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0'
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process CUSTOM_DUMPSOFTWAREVERSIONS {
label 'process_low'

// Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container
conda (params.enable_conda ? "bioconda::multiqc=1.11" : null)
conda "bioconda::multiqc=1.11"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/multiqc:1.11--pyhdfd78af_0' :
'quay.io/biocontainers/multiqc:1.11--pyhdfd78af_0' }"
Expand Down
Loading

0 comments on commit 34c23be

Please sign in to comment.