Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/aineniamh/piranha into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aineniamh committed Oct 24, 2023
2 parents e5b6280 + 71a76c8 commit 2a973be
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 17 deletions.
9 changes: 7 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ process run_piranha {
path run_dir

output:
path "piranha_output"
path "piranha_report.html"
path "barcode_reports"
path "detailed_run_report.csv"
path "published_data"

script:
"""
piranha -b ${barcodes_csv} -i ${run_dir} -o piranha_output --tempdir piranha_tmp -t ${task.cpus}
mv piranha_output/* .
mv report.html piranha_report.html
"""

}
Expand All @@ -23,4 +28,4 @@ workflow {
run_dir = Channel.of(file("${params.run_dir}", type: "dir", checkIfExists:true))

run_piranha(barcodes_csv, run_dir)
}
}
5 changes: 1 addition & 4 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ manifest {
description = 'Polio investigation resource automating nanopore haplotype analysis.'
mainScript = 'main.nf'
nextflowVersion = '>=23.04.2'
version = 'v1.1'
version = '1.1'
}


Expand All @@ -73,9 +73,6 @@ profiles {
standard {
docker {
enabled = true
// this ensures container is run as host user and group, but
// also adds host user to the within-container group
runOptions = "--user \$(id -u):\$(id -g) --group-add 100 --env XDG_CACHE_HOME=\$NXF_TASK_WORKDIR/.cache"
}
}

Expand Down
77 changes: 66 additions & 11 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"title": "polio-nanopore/piranha",
"description": "Polio investigation resource automating nanopore haplotype analysis.",
"url": "https://github.com/polio-nanopore/piranha",
"demo_url": "https://raw.githubusercontent.com/polio-nanopore/piranha/main/piranha/test/pak_run",
"type": "object",
"definitions": {
"input_options": {
Expand All @@ -15,35 +16,89 @@
"barcodes_csv": {
"type": "string",
"format": "path",
"title": "BARCODES_CSV",
"title": "Barcodes",
"description": "A CSV file with barcode and sample columns.",
"help_text": ".",
"demo_data": "piranha/test/pak_run/barcodes01.csv"
"demo_data": "barcodes01.csv"
},
"run_dir": {
"type": "string",
"format": "path",
"title": "RUN_DIR",
"title": "Run directory",
"description": "A directory containing a directory of fastq for a each barcode in a run.",
"help_text": "A directory containing subdirectories of fastq files as created by MinKNOW.",
"demo_data": "piranha/test/pak_run/demultiplexed"
"demo_data": "demultiplexed"
}
},
"oneOf": [
"allOf": [
{
"required": [
"run_dir",
"barcodes_csv"
"barcodes_csv",
"run_dir"
]
}
]
},
"allOf": [
{
"$ref": "#/definitions/input_options"
"output_options": {
"title": "Output Options",
"type": "object",
"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."
}
}
},
"advanced_options": {
"title": "Advanced Options",
"type": "object",
"description": "Advanced options for configuring processes inside the workflow.",
"default": "",
"properties": {
}
]
},
"miscellaneous_options": {
"title": "Miscellaneous Options",
"type": "object",
"fa_icon": "fas fa-file-import",
"description": "Everything else.",
"help_text": "These options are common to all nf-core pipelines and allow you to customise some of the core preferences for how the pipeline runs.\n\nTypically these options would be set in a Nextflow config file loaded for all pipeline runs, such as `~/.nextflow/config`.",
"properties": {
"help": {
"type": "boolean",
"title": "Display help text",
"fa_icon": "fas fa-question-circle",
"hidden": true
},
"version": {
"type": "boolean",
"title": "Display version",
"description": "Display version and exit.",
"fa_icon": "fas fa-question-circle",
"hidden": true
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/input_options"
},
{
"$ref": "#/definitions/output_options"
},
{
"$ref": "#/definitions/advanced_options"
},
{
"$ref": "#/definitions/miscellaneous_options"
}
],
"properties": {
"aws_image_prefix": {
"type": "string",
Expand Down
5 changes: 5 additions & 0 deletions piranha/test/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
params {
barcodes_csv = "pak_run/barcodes01.csv"
run_dir = "pak_run/demultiplexed"
out_dir = "output"
}

0 comments on commit 2a973be

Please sign in to comment.