diff --git a/docs/params.md b/docs/params.md index b5ae38cd..88ea41e5 100644 --- a/docs/params.md +++ b/docs/params.md @@ -95,8 +95,9 @@ Parameters for the recombination subworkflow | `min_branch_length` | Minimum rSPR branch length | `integer` | 0 | | | | `max_support_threshold` | Maximum rSPR support threshold | `number` | 0.7 | | | | `max_approx_rspr` | Maximum approximate rSPR distance for filtering | `integer` | -1 | | | -| `core_gene_tree` | Core (or reference) genome tree. Used in the rSPR entry. | `string` | | | | +| `core_gene_tree` | Core (or reference) genome tree. Used in the rSPR and evolCCM entries. | `string` | | | | | `concatenated_annotation` | TSV table of annotations for all genomes. Such as the ones generated by Bakta or Prokka in ARETE. | `string` | | | | +| `feature_profile` | Feature profile TSV (A presence-absence matrix). Used in the evolCCM entry. | `string` | | | | ## Institutional config options diff --git a/lib/WorkflowArete.groovy b/lib/WorkflowArete.groovy index 1dc644ec..37d21de8 100755 --- a/lib/WorkflowArete.groovy +++ b/lib/WorkflowArete.groovy @@ -66,11 +66,6 @@ class WorkflowArete { // Check the hostnames against configured profiles NfcoreTemplate.hostName(workflow, params, log) - // Check input has been provided - if (!params.input_sample_table) { - log.error "Please provide an input samplesheet to the pipeline e.g. '--input_sample_table samplesheet.csv'" - System.exit(1) - } } // diff --git a/main.nf b/main.nf index 26b7efc0..ee77d46b 100755 --- a/main.nf +++ b/main.nf @@ -38,6 +38,7 @@ include { PHYLO } from './workflows/arete' include { QUALITYCHECK } from './workflows/arete' include { POPPUNK } from './workflows/arete' include { RUN_RSPR } from './workflows/arete' +include { RUN_EVOLCCM } from './workflows/arete' // @@ -72,6 +73,10 @@ workflow poppunk { workflow rspr { RUN_RSPR() } + +workflow evolccm { + RUN_EVOLCCM() +} /* ======================================================================================== RUN ALL WORKFLOWS diff --git a/nextflow.config b/nextflow.config index 713ff6dd..4a74c44f 100755 --- a/nextflow.config +++ b/nextflow.config @@ -66,9 +66,10 @@ params { max_support_threshold = 0.7 max_approx_rspr = -1 - // rSPR entry + // rSPR/evolCCM entries core_gene_tree = null concatenated_annotation = null + feature_profile = null // MultiQC options multiqc_config = null diff --git a/nextflow_schema.json b/nextflow_schema.json index 625ef320..31245778 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -10,7 +10,7 @@ "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": ["input_sample_table"], + "required": [], "properties": { "input_sample_table": { "type": "string", @@ -217,7 +217,7 @@ }, "accessory_similarity": { "type": "number", - "default": 99, + "default": 99.0, "fa_icon": "far fa-clone", "description": "Similarity threshold for accessory genes" } @@ -282,11 +282,15 @@ }, "core_gene_tree": { "type": "string", - "description": "Core (or reference) genome tree. Used in the rSPR entry." + "description": "Core (or reference) genome tree. Used in the rSPR and evolCCM entries." }, "concatenated_annotation": { "type": "string", "description": "TSV table of annotations for all genomes. Such as the ones generated by Bakta or Prokka in ARETE." + }, + "feature_profile": { + "type": "string", + "description": "Feature profile TSV (A presence-absence matrix). Used in the evolCCM entry." } }, "fa_icon": "fas fa-bezier-curve" diff --git a/workflows/arete.nf b/workflows/arete.nf index d31d2317..c6ffb9b1 100755 --- a/workflows/arete.nf +++ b/workflows/arete.nf @@ -11,10 +11,6 @@ def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params) def checkPathParamList = [ params.input_sample_table, params.multiqc_config, params.reference_genome ] for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true) } } -// Check mandatory parameters -if (params.input_sample_table) { ch_input = file(params.input_sample_table) } else { exit 1, 'Input samplesheet not specified!' } - - /* ======================================================================================== CONFIG FILES @@ -609,6 +605,16 @@ workflow RUN_RSPR { ) } +workflow RUN_EVOLCCM { + if (params.core_gene_tree) { ch_core = file(params.core_gene_tree) } else { exit 1, 'Core tree not specified!' } + if (params.feature_profile) { ch_input = file(params.feature_profile) } else { exit 1, 'Input feature profile not specified!' } + + EVOLCCM ( + ch_core, + ch_input + ) +} + /* ======================================================================================== COMPLETION EMAIL AND SUMMARY