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 all 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
105 changes: 53 additions & 52 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,58 +22,59 @@ params {
metadata = null

// Other options
trunc_qmin = 25
trunc_rmin = 0.75
trunclenf = null
trunclenr = null
max_ee = 2
max_len = null
ignore_failed_filtering = false
min_len = 50
metadata_category = null
metadata_category_barplot = null
double_primer = false
retain_untrimmed = false
cutadapt_min_overlap = 3
cutadapt_max_error_rate = 0.1
exclude_taxa = "mitochondria,chloroplast"
min_frequency = 1
min_samples = 1
multiple_sequencing_runs = false
single_end = false
sample_inference = "independent"
illumina_novaseq = false
illumina_pe_its = false
concatenate_reads = false
cut_its = "none"
its_partial = 0
picrust = false
sbdiexport = false
addsh = false
tax_agglom_min = 2
tax_agglom_max = 6
min_read_counts = 1
ignore_failed_trimming = false
ignore_empty_input_files = false
qiime_adonis_formula = null
seed = 100
filter_ssu = null
min_len_asv = null
max_len_asv = null
filter_codons = null
orf_start = 1
orf_end = null
stop_codons = "TAA,TAG"
pplace_tree = null
pplace_aln = null
pplace_model = null
pplace_alnmethod = 'hmmer'
pplace_taxonomy = null
pplace_name = null
diversity_rarefaction_depth = 500
ancom_sample_min_count = 1
vsearch_cluster = null
vsearch_cluster_id= 0.97
save_intermediates = false
trunc_qmin = 25
trunc_rmin = 0.75
trunclenf = null
trunclenr = null
max_ee = 2
max_len = null
ignore_failed_filtering = false
min_len = 50
metadata_category = null
metadata_category_barplot = null
double_primer = false
retain_untrimmed = false
cutadapt_min_overlap = 3
cutadapt_max_error_rate = 0.1
exclude_taxa = "mitochondria,chloroplast"
min_frequency = 1
min_samples = 1
multiple_sequencing_runs = false
single_end = false
sample_inference = "independent"
illumina_novaseq = false
illumina_pe_its = false
concatenate_reads = false
cut_its = "none"
its_partial = 0
picrust = false
sbdiexport = false
addsh = false
tax_agglom_min = 2
tax_agglom_max = 6
min_read_counts = 1
ignore_failed_trimming = false
ignore_empty_input_files = false
qiime_adonis_formula = null
seed = 100
filter_ssu = null
min_len_asv = null
max_len_asv = null
filter_codons = null
orf_start = 1
orf_end = null
stop_codons = "TAA,TAG"
pplace_tree = null
pplace_aln = null
pplace_model = null
pplace_alnmethod = 'hmmer'
pplace_taxonomy = null
pplace_name = null
diversity_rarefaction_depth= 500
ancom_sample_min_count = 1
vsearch_cluster = null
vsearch_cluster_id = 0.97

// Report options
report_template = "${projectDir}/assets/report_template.Rmd"
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