Skip to content

Commit

Permalink
update nextflow options
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcolq committed Nov 2, 2023
1 parent ecdca9b commit ec6ac25
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 7 deletions.
26 changes: 25 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,33 @@ process run_piranha {
path "published_data"

script:
extra = ""
if ( params.config )
extra += " --config ${params.config}"
if ( params.output_intermediates )
extra += " --no-temp"
if ( params.min_map_quality )
extra += " --min-map-quality ${params.min_map_quality}"
if ( params.min_read_length )
extra += " --min-read-length ${params.min_read_length}"
if ( params.max_read_length )
extra += " --max-read-length ${params.max_read_length}"
if ( params.min_read_depth )
extra += " --min-read-depth ${params.min_read_depth}"
if ( params.min_read_pcent )
extra += " --min-read-pcent ${params.min_read_pcent}"
if ( params.primer_length )
extra += " --primer-length ${params.primer_length}"
if ( params.run_phylo )
extra += " --run-phylo"
if ( params.supplementary_sequences )
extra += " --supplementary-sequences ${params.supplementary_sequences}"
if ( params.supplementary_metadata )
extra += " --supplementary-metadata ${params.supplementary_metadata}"
"""
piranha -b ${barcodes_csv} -i ${run_dir} -o piranha_output --tempdir piranha_tmp -t ${task.cpus}
piranha -b ${barcodes_csv} -i ${run_dir} -o piranha_output --tempdir piranha_tmp -t ${task.cpus} ${extra}
mv piranha_output/* .
rm -rf piranha_output
mv report.html piranha_report.html
"""

Expand Down
16 changes: 16 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ params {
run_dir = null

out_dir = "output"
output_intermediates = false
config = null

// Analysis options
min_map_quality = null
min_read_length = null
max_read_length = null
min_read_depth = null
min_read_pcent = null
min_aln_block = null
primer_length = null

// Phylo options
run_phylo = false
supplementary_sequences = null
supplementary_metadata = null

// Other options
disable_ping = false
Expand Down
72 changes: 66 additions & 6 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,81 @@
"output_options": {
"title": "Output Options",
"type": "object",
"fa_icon": "fas fa-terminal",
"description": "Parameters for saving and naming workflow outputs.",
"default": "",
"properties": {
"out_dir": {
"type": "string",
"format": "directory-path",
"default": "output",
"title": "Output folder name",
"description": "Directory for output of all user-facing files."
},
"output_intermediates": {
"type": "boolean",
"title": "Output intermediate files"
}
}
},
"advanced_options": {
"title": "Advanced Options",
"analysis_options": {
"title": "Analysis Options",
"type": "object",
"description": "Advanced options for configuring processes inside the workflow.",
"default": "",
"fa_icon": "fas fa-terminal",
"description": "Define the thresholds for filtering and assembly.",
"properties": {
"config": {
"type": "string",
"format": "path",
"title": "Config file",
"description": "A config file with parameters for piranha."
},
"min_map_quality": {
"type": "integer",
"title": "Minimum mapping quality"
},
"min_read_length": {
"type": "integer",
"title": "Minimum read length"
},
"max_read_length": {
"type": "integer",
"title": "Maximum read length"
},
"min_read_depth": {
"type": "integer",
"title": "Minimum read depth required for consensus generation"
},
"min_read_pcent": {
"type": "number",
"title": "Minimum percentage of sample required for consensus generation"
},
"primer_length": {
"type": "integer",
"title": "Length of primer sequences to trim off start and end of reads"
}
}
},
"phylo_options": {
"title": "Phylogenetic Options",
"type": "object",
"description": "Options for running the phylogenetics module.",
"properties": {
"run_phylo": {
"type": "boolean",
"title": "Run phylogenetics pipeline"
},
"supplementary_sequences": {
"type": "string",
"format": "path",
"title": "Supplementary sequences",
"description": "Supplementary sequence FASTA file to be incorporated into phylogenetic analysis"
},
"supplementary_metadata": {
"type": "string",
"format": "path",
"title": "Supplementary metadata",
"description": " Supplementary metadata file associated with the supplementary sequence FASTA file"
}
}
},
"miscellaneous_options": {
Expand Down Expand Up @@ -93,7 +150,10 @@
"$ref": "#/definitions/output_options"
},
{
"$ref": "#/definitions/advanced_options"
"$ref": "#/definitions/analysis_options"
},
{
"$ref": "#/definitions/phylo_options"
},
{
"$ref": "#/definitions/miscellaneous_options"
Expand Down

0 comments on commit ec6ac25

Please sign in to comment.