Skip to content

Commit

Permalink
Merge pull request #700 from d4straub/export-more-qza
Browse files Browse the repository at this point in the history
Added --save_intermediates
  • Loading branch information
d4straub authored Feb 6, 2024
2 parents 2aa390c + 739ccbd commit 2a23b1b
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 63 deletions.
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

0 comments on commit 2a23b1b

Please sign in to comment.