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

feat: Add evolCCM entry #174

Merged
merged 4 commits into from
Nov 5, 2023
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
3 changes: 2 additions & 1 deletion docs/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 0 additions & 5 deletions lib/WorkflowArete.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

//
Expand Down
5 changes: 5 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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'


//
Expand Down Expand Up @@ -72,6 +73,10 @@ workflow poppunk {
workflow rspr {
RUN_RSPR()
}

workflow evolccm {
RUN_EVOLCCM()
}
/*
========================================================================================
RUN ALL WORKFLOWS
Expand Down
3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -217,7 +217,7 @@
},
"accessory_similarity": {
"type": "number",
"default": 99,
"default": 99.0,
"fa_icon": "far fa-clone",
"description": "Similarity threshold for accessory genes"
}
Expand Down Expand Up @@ -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"
Expand Down
14 changes: 10 additions & 4 deletions workflows/arete.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading