Skip to content

Commit

Permalink
export phyloseq and tse by default
Browse files Browse the repository at this point in the history
  • Loading branch information
d4straub committed Nov 26, 2024
1 parent cf4eeba commit bd7a1ff
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 29 deletions.
4 changes: 2 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ params {
ancombc_significance = 0.05
ancombc_formula = null
ancombc_formula_reflvl = null
phyloseq = false
treesummarizedexperiment = false

// Report options
report_template = "${projectDir}/assets/report_template.Rmd"
Expand All @@ -107,6 +105,8 @@ params {
skip_dada_addspecies = false
skip_alpha_rarefaction = false
skip_diversity_indices = false
skip_phyloseq = false
skip_tse = false
skip_multiqc = false
skip_report = false

Expand Down
28 changes: 8 additions & 20 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -732,23 +732,6 @@
},
"fa_icon": "fas fa-book-open"
},
"exporting_results": {
"title": "Exporting objects for downstream analysis",
"type": "object",
"description": "Opt-in to create R objects",
"default": "",
"properties": {
"phyloseq": {
"type": "boolean",
"description": "Export phyloseq rds object(s)"
},
"treesummarizedexperiment": {
"type": "boolean",
"description": "Export TreeSummarizedExperiment rds object(s)"
}
},
"fa_icon": "fas fa-book-open"
},
"skipping_specific_steps": {
"title": "Skipping specific steps",
"type": "object",
Expand Down Expand Up @@ -807,6 +790,14 @@
"type": "boolean",
"description": "Skip alpha and beta diversity analysis"
},
"skip_phyloseq": {
"type": "boolean",
"description": "Skip exporting phyloseq rds object(s)"
},
"skip_tse": {
"type": "boolean",
"description": "Skip exporting TreeSummarizedExperiment rds object(s)"
},
"skip_multiqc": {
"type": "boolean",
"description": "Skip MultiQC reporting"
Expand Down Expand Up @@ -1006,9 +997,6 @@
{
"$ref": "#/$defs/pipeline_report"
},
{
"$ref": "#/$defs/exporting_results"
},
{
"$ref": "#/$defs/skipping_specific_steps"
},
Expand Down
10 changes: 5 additions & 5 deletions subworkflows/local/robject_workflow.nf
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ workflow ROBJECT_WORKFLOW {
ch_robject_inasv = ch_tsv
}

if ( params.phyloseq ) {
if ( !params.skip_phyloseq ) {
PHYLOSEQ ( ch_tax.combine(ch_robject_inasv), ch_robject_inmeta, ch_robject_intree )
ch_versions_robject_workflow = ch_versions_robject_workflow.mix(PHYLOSEQ.out.versions)
}

if ( params.treesummarizedexperiment ) {
if ( !params.skip_tse ) {
TREESUMMARIZEDEXPERIMENT ( ch_tax.combine(ch_robject_inasv), ch_robject_inmeta, ch_robject_intree )
ch_versions_robject_workflow = ch_versions_robject_workflow.mix(TREESUMMARIZEDEXPERIMENT.out.versions)
}

emit:
phyloseq = params.phyloseq ? PHYLOSEQ.out.rds : []
treesummarizedexperiment = params.treesummarizedexperiment ? TREESUMMARIZEDEXPERIMENT.out.rds : []
versions = ch_versions_robject_workflow
phyloseq = !params.skip_phyloseq ? PHYLOSEQ.out.rds : []
tse = !params.skip_tse ? TREESUMMARIZEDEXPERIMENT.out.rds : []
versions = ch_versions_robject_workflow
}
4 changes: 2 additions & 2 deletions workflows/ampliseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ workflow AMPLISEQ {
//
// SUBWORKFLOW: Create R objects
//
if ( !params.skip_taxonomy && ( params.phyloseq || params.treesummarizedexperiment ) ) {
if ( !params.skip_taxonomy && ( !params.skip_phyloseq || !params.skip_tse ) ) {
if ( params.pplace_tree ) {
ch_tree_for_robject = FASTA_NEWICK_EPANG_GAPPA.out.grafted_phylogeny
} else {
Expand Down Expand Up @@ -1012,7 +1012,7 @@ workflow AMPLISEQ {
run_qiime2 && params.ancombc_formula && params.metadata ? QIIME2_ANCOM.out.ancombc_formula.collect().ifEmpty( [] ) : [],
params.picrust ? PICRUST.out.pathways.ifEmpty( [] ) : [],
params.sbdiexport ? SBDIEXPORT.out.sbditables.mix(SBDIEXPORTREANNOTATE.out.sbdiannottables).collect().ifEmpty( [] ) : [],
!params.skip_taxonomy && params.phyloseq ? ROBJECT_WORKFLOW.out.phyloseq.map{info,rds -> [rds]}.collect().ifEmpty( [] ) : []
!params.skip_taxonomy && !params.skip_phyloseq ? ROBJECT_WORKFLOW.out.phyloseq.map{info,rds -> [rds]}.collect().ifEmpty( [] ) : []
//TODO: add treesummarizedexperiment
)
ch_versions = ch_versions.mix(SUMMARY_REPORT.out.versions)
Expand Down

0 comments on commit bd7a1ff

Please sign in to comment.