Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added --save_intermediates #700

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Added`

- [#700](https://github.com/nf-core/ampliseq/pull/700) - Optional `--save_intermediates` to publish QIIME2 data objects (.qza) and visualisation objects (.qzv)

### `Changed`

### `Fixed`
Expand Down
52 changes: 41 additions & 11 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -664,10 +664,10 @@ process {

withName: 'QIIME2_INASV_BPAVG' {
publishDir = [
path: { "${params.outdir}/qiime2/input" },
path: { "${params.outdir}/qiime2/barplot_average" },
mode: params.publish_dir_mode,
pattern: "*.qza",
enabled: false
enabled: params.save_intermediates
]
}

Expand Down Expand Up @@ -758,25 +758,55 @@ process {

withName: QIIME2_ALPHARAREFACTION {
publishDir = [
path: { "${params.outdir}/qiime2" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
[
path: { "${params.outdir}/qiime2" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.qzv') ? null : filename }
],
[
path: { "${params.outdir}/qiime2/alpha-rarefaction" },
mode: params.publish_dir_mode,
pattern: "*.qzv",
enabled: params.save_intermediates
]
]
}

withName: 'QIIME2_DIVERSITY_CORE|QIIME2_DIVERSITY_ALPHA|QIIME2_DIVERSITY_BETA|QIIME2_DIVERSITY_BETAORD' {
publishDir = [
path: { "${params.outdir}/qiime2/diversity" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.qza') ? null : filename }
[
path: { "${params.outdir}/qiime2/diversity" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.qza') || filename.endsWith('.qzv') ? null : filename }
],
[
path: { "${params.outdir}/qiime2/diversity/qza_qzv" },
mode: params.publish_dir_mode,
pattern: "*{.qza,.qzv}",
enabled: params.save_intermediates
],
[
path: { "${params.outdir}/qiime2/diversity/qza_qzv" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.endsWith('.qza') ? filename : null },
enabled: params.save_intermediates
]
]
}

withName: QIIME2_DIVERSITY_ADONIS {
publishDir = [
path: { "${params.outdir}/qiime2/diversity/beta_diversity" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
[
path: { "${params.outdir}/qiime2/diversity/beta_diversity" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.qzv') ? null : filename }
],
[
path: { "${params.outdir}/qiime2/diversity/beta_diversity/adonis" },
mode: params.publish_dir_mode,
pattern: "*.qzv",
enabled: params.save_intermediates
]
]
}

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

output:
path("alpha-rarefaction/*"), emit: rarefaction
path("*.qzv") , emit: qzv
path "versions.yml" , emit: versions

when:
Expand Down
1 change: 1 addition & 0 deletions modules/local/qiime2_diversity_adonis.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ process QIIME2_DIVERSITY_ADONIS {

output:
path("adonis/*") , emit: html
path("*.qzv") , emit: qzv
path "versions.yml" , emit: versions

when:
Expand Down
1 change: 1 addition & 0 deletions modules/local/qiime2_diversity_alpha.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ process QIIME2_DIVERSITY_ALPHA {

output:
path("alpha_diversity/*"), emit: alpha
path("*.qzv") , emit: qzv
path "versions.yml" , emit: versions

when:
Expand Down
1 change: 1 addition & 0 deletions modules/local/qiime2_diversity_beta.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ process QIIME2_DIVERSITY_BETA {

output:
path("beta_diversity/*"), emit: beta
path("*.qzv") , emit: qzv
path "versions.yml" , emit: versions

when:
Expand Down
1 change: 1 addition & 0 deletions modules/local/qiime2_diversity_betaord.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ process QIIME2_DIVERSITY_BETAORD {

output:
path("beta_diversity/*"), emit: beta
path("*.qzv") , emit: qzv
path "versions.yml" , emit: versions

when:
Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ params {
metadata = null

// Other options
save_intermediates= false
d4straub marked this conversation as resolved.
Show resolved Hide resolved
trunc_qmin = 25
trunc_rmin = 0.75
trunclenf = null
Expand Down
5 changes: 5 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
"description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.",
"fa_icon": "fas fa-folder-open"
},
"save_intermediates": {
"type": "boolean",
"description": "Save intermediate results such as QIIME2's qza and qzv files",
"fa_icon": "fas fa-folder-open"
},
"email": {
"type": "string",
"description": "Email address for completion summary.",
Expand Down
Loading