Skip to content

Commit

Permalink
Merge pull request #660 from nf-core/dev
Browse files Browse the repository at this point in the history
Release 2.7.1
  • Loading branch information
d4straub authored Nov 13, 2023
2 parents 4e48b71 + bb23cb0 commit 113e90b
Show file tree
Hide file tree
Showing 41 changed files with 332 additions and 261 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
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).

## nf-core/ampliseq version 2.7.1 - 2023-11-14

### `Added`

### `Changed`

- [#657](https://github.com/nf-core/ampliseq/pull/657) - Improved parameter descriptions and sequence

### `Fixed`

- [#655](https://github.com/nf-core/ampliseq/pull/655) - Added `NUMBA_CACHE_DIR` to fix downstream analysis with QIIME2 that failed on some systems
- [#656](https://github.com/nf-core/ampliseq/pull/656) - Moved conda-check to script-section and replaced `exit 1` with `error()`
- [#657](https://github.com/nf-core/ampliseq/pull/657) - Corrected inaccurate reporting of QIIME2 taxonomic classifications and ASV length filtering

### `Dependencies`

### `Removed`

## nf-core/ampliseq version 2.7.0 - 2023-10-20

### `Added`
Expand Down
4 changes: 2 additions & 2 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/ampliseq/releases/tag/2.7.0" target="_blank">nf-core/ampliseq</a>
This report has been generated by the <a href="https://github.com/nf-core/ampliseq/releases/tag/2.7.1" target="_blank">nf-core/ampliseq</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/ampliseq/2.7.0/docs/output" target="_blank">documentation</a>.
<a href="https://nf-co.re/ampliseq/2.7.1/docs/output" target="_blank">documentation</a>.
report_section_order:
"nf-core-ampliseq-methods-description":
order: -1000
Expand Down
32 changes: 17 additions & 15 deletions assets/report_template.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ cat(paste0("
Overall read quality profiles are displayed as heat map of the frequency of each quality score at each base position.
The mean quality score at each position is shown by the green line, and the quartiles of the quality score
distribution by the orange lines. The red line shows the scaled proportion of reads that extend to at least
that position. Original plots can be found [folder dada2/QC/](../dada2/QC/) with names that end in `_qual_stats.pdf`.
that position. Original plots can be found in folder [dada2/QC/](../dada2/QC/) with names that end in `_qual_stats.pdf`.
"))
```

Expand Down Expand Up @@ -426,8 +426,8 @@ cat(paste0("
Estimated error rates are displayed for each possible transition. The black line shows the estimated error rates after
convergence of the machine-learning algorithm. The red line shows the error rates expected under the nominal
definition of the Q-score. The estimated error rates (black line) should be a good fit to the observed rates
(points), and the error rates should drop with increased quality. Original plots can be found in
[folder dada2/QC/](../dada2/QC/) with names that end in `.err.pdf`.
(points), and the error rates should drop with increased quality. Original plots can be found in folder
[dada2/QC/](../dada2/QC/) with names that end in `.err.pdf`.
"))
```

Expand Down Expand Up @@ -724,9 +724,10 @@ if ( params$max_len_asv != 0 ) {
}
# replace 1 with 1.5 to display on log scale
filter_len_profile$Counts[filter_len_profile$Counts == 1] <- 1.5
filter_len_profile_replaced <- filter_len_profile
filter_len_profile_replaced$Counts[filter_len_profile_replaced$Counts == 1] <- 1.5
plot_filter_len_profile <- ggplot(filter_len_profile,
plot_filter_len_profile <- ggplot(filter_len_profile_replaced,
aes(x = Length, y = Counts)) +
geom_bar(stat = "identity", fill = rgb(0.1, 0.4, 0.75), width = 0.5) +
ylab("Number of ASVs") +
Expand Down Expand Up @@ -989,17 +990,18 @@ asv_tax <- read.table(params$qiime2_taxonomy, header = TRUE, sep = "\t")
asv_tax <- subset(asv_tax, select = Taxon)
# Remove greengenes85 ".__" placeholders
df = as.data.frame(lapply(asv_tax, function(x) gsub(".__", "", x)))
# remove all last, empty ;
df = as.data.frame(lapply(df, function(x) gsub(" ;","",x)))
df = as.data.frame(lapply(asv_tax, function(x) gsub(" .__", "", x)))
# remove all empty ;
df = as.data.frame(lapply(df, function(x) gsub(";;","",x)))
# remove last remaining, empty ;
df = as.data.frame(lapply(df, function(x) gsub("; $","",x)))
df = as.data.frame(lapply(df, function(x) gsub(";$","",x)))
# get maximum amount of taxa levels per ASV
max_taxa <- lengths(regmatches(df$Taxon, gregexpr("; ", df$Taxon)))+1
max_taxa <- lengths(regmatches(df$Taxon, gregexpr(";", df$Taxon)))+1
# Currently, all QIIME2 databases seem to have the same levels!
# Currently, all QIIME2 databases seem to have the same levels! But for compatibility, restrict number of levels to max_taxa
level <- c("Kingdom","Phylum","Class","Order","Family","Genus","Species")
level <- head(level, n = max(max_taxa) )
# Calculate the classified numbers/percent of asv
n_asv_tax = nrow(asv_tax)
Expand Down Expand Up @@ -1811,7 +1813,7 @@ if ( !isFALSE(params$dada2_ref_tax_title) ) {
"- citation: `", params$dada2_ref_tax_citation, "`\n\n", sep = "")
} else if (!isFALSE(params$dada2_taxonomy)) {
cat("Taxonomic classification by DADA2:\n\n",
"- database: unknown - user provided\n\n", sep = "")
"- database: user provided file(s)\n\n", sep = "")
}
if ( !isFALSE(params$sintax_ref_tax_title) ) {
Expand All @@ -1821,7 +1823,7 @@ if ( !isFALSE(params$sintax_ref_tax_title) ) {
"- citation: `", params$sintax_ref_tax_citation, "`\n\n", sep = "")
} else if (!isFALSE(params$sintax_taxonomy)) {
cat("Taxonomic classification by SINTAX:\n\n",
"- database: unknown - user provided\n\n", sep = "")
"- database: user provided file\n\n", sep = "")
}
if ( !isFALSE(params$kraken2_ref_tax_title) ) {
Expand All @@ -1831,7 +1833,7 @@ if ( !isFALSE(params$kraken2_ref_tax_title) ) {
"- citation: `", params$kraken2_ref_tax_citation, "`\n\n", sep = "")
} else if (!isFALSE(params$kraken2_taxonomy)) {
cat("Taxonomic classification by Kraken2:\n\n",
"- database: unknown - user provided\n\n", sep = "")
"- database: user provided files\n\n", sep = "")
}
if ( !isFALSE(params$qiime2_ref_tax_title) ) {
Expand All @@ -1841,7 +1843,7 @@ if ( !isFALSE(params$qiime2_ref_tax_title) ) {
"- citation: `", params$qiime2_ref_tax_citation, "`\n\n", sep = "")
} else if (!isFALSE(params$qiime2_taxonomy)) {
cat("Taxonomic classification by QIIME2:\n\n",
"- database: unknown - user provided\n\n", sep = "")
"- database: user provided file\n\n", sep = "")
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The typical command for running the pipeline is as follows:

```bash
nextflow run nf-core/ampliseq \
-r 2.7.0 \
-r 2.7.1 \
-profile singularity \
--input "samplesheet.tsv" \
--FW_primer GTGYCAGCMGCCGCGGTAA \
Expand All @@ -45,7 +45,7 @@ nextflow run nf-core/ampliseq \
--outdir "./results"
```

In this example, `--input` is the [Samplesheet input](#samplesheet-input), other options are [Direct FASTQ input](#direct-fastq-input) and [ASV/OTU fasta input](#asvotu-fasta-input). For more details on metadata, see [Metadata](#metadata). For [Reproducibility](#reproducibility), specify the version to run using `-r` (= release, e.g. 2.7.0, please use the most recent release). See the [nf-core/ampliseq website documentation](https://nf-co.re/ampliseq/parameters) for more information about pipeline specific parameters.
In this example, `--input` is the [Samplesheet input](#samplesheet-input), other options are [Direct FASTQ input](#direct-fastq-input) and [ASV/OTU fasta input](#asvotu-fasta-input). For more details on metadata, see [Metadata](#metadata). For [Reproducibility](#reproducibility), specify the version to run using `-r` (= release, e.g. 2.7.1, please use the most recent release). See the [nf-core/ampliseq website documentation](https://nf-co.re/ampliseq/parameters) for more information about pipeline specific parameters.

It is possible to not provide primer sequences (`--FW_primer` & `--RV_primer`) and skip primer trimming using `--skip_cutadapt`, but this is only for data that indeed does not contain any PCR primers in their sequences. Also, metadata (`--metadata`) isnt required, but aids downstream analysis.

Expand Down
13 changes: 7 additions & 6 deletions modules/local/qiime2_alphararefaction.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ process QIIME2_ALPHARAREFACTION {

container "qiime2/core:2023.7"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
path(metadata)
path(table)
Expand All @@ -22,8 +17,14 @@ process QIIME2_ALPHARAREFACTION {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
maxdepth=\$(count_table_minmax_reads.py $stats maximum 2>&1)
Expand Down
13 changes: 7 additions & 6 deletions modules/local/qiime2_ancom_asv.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ process QIIME2_ANCOM_ASV {

container "qiime2/core:2023.7"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple path(metadata), path(table)

Expand All @@ -23,8 +18,14 @@ process QIIME2_ANCOM_ASV {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime composition add-pseudocount \\
--i-table ${table} \\
Expand Down
13 changes: 7 additions & 6 deletions modules/local/qiime2_ancom_tax.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ process QIIME2_ANCOM_TAX {

container "qiime2/core:2023.7"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple path(metadata), path(table), path(taxonomy) ,val(taxlevel)

Expand All @@ -21,8 +16,14 @@ process QIIME2_ANCOM_TAX {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
mkdir ancom
# Sum data at the specified level
Expand Down
13 changes: 7 additions & 6 deletions modules/local/qiime2_barplot.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ process QIIME2_BARPLOT {

container "qiime2/core:2023.7"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
path(metadata)
path(table)
Expand All @@ -22,10 +17,16 @@ process QIIME2_BARPLOT {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
suffix = setting ? "_${table.baseName}" : ""
def metadata_cmd = metadata ? "--m-metadata-file ${metadata}": ""
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime taxa barplot \\
--i-table ${table} \\
Expand Down
13 changes: 7 additions & 6 deletions modules/local/qiime2_classify.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process QIIME2_CLASSIFY {

container "qiime2/core:2023.7"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
path(trained_classifier)
path(repseq)
Expand All @@ -22,8 +17,14 @@ process QIIME2_CLASSIFY {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime feature-classifier classify-sklearn \\
--i-classifier ${trained_classifier} \\
Expand Down
13 changes: 7 additions & 6 deletions modules/local/qiime2_diversity_adonis.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process QIIME2_DIVERSITY_ADONIS {

container "qiime2/core:2023.7"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple path(metadata), path(core), val(formula)

Expand All @@ -20,9 +15,15 @@ process QIIME2_DIVERSITY_ADONIS {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime diversity adonis \\
--p-n-jobs $task.cpus \\
Expand Down
13 changes: 7 additions & 6 deletions modules/local/qiime2_diversity_alpha.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process QIIME2_DIVERSITY_ALPHA {

container "qiime2/core:2023.7"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple path(metadata), path(core)

Expand All @@ -20,8 +15,14 @@ process QIIME2_DIVERSITY_ALPHA {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime diversity alpha-group-significance \\
--i-alpha-diversity ${core} \\
Expand Down
13 changes: 7 additions & 6 deletions modules/local/qiime2_diversity_beta.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process QIIME2_DIVERSITY_BETA {

container "qiime2/core:2023.7"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple path(metadata), path(core), val(category)

Expand All @@ -20,8 +15,14 @@ process QIIME2_DIVERSITY_BETA {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime diversity beta-group-significance \\
--i-distance-matrix ${core} \\
Expand Down
Loading

0 comments on commit 113e90b

Please sign in to comment.