Build branch main with version main (26bd658)

Build pipeline: viash-hub.demultiplex.main-qzwsk

Source commit: 26bd658d6e

Source message: Add detect_demultiplexer subworkflow (#52)
This commit is contained in:
CI
2025-06-10 07:25:05 +00:00
parent 22aedc71cc
commit 10ff085552
29 changed files with 4223 additions and 198 deletions

View File

@@ -100,6 +100,8 @@ dependencies:
repository: bb
- name: multiqc
repository: bb
- name: detect_demultiplexer
repository: local
repositories:
- name: bb
type: vsh

View File

@@ -21,88 +21,21 @@ workflow run_wf {
state + ["input": result.output]
},
)
// Gather input files from folder
| map {id, state ->
def newState = [:]
println("Provided run information: ${state.run_information} and demultiplexer: ${state.demultiplexer}")
// No auto-detection of run information file (it is user provided),
// in this case the demultiplexer should also be specified.
assert (!state.run_information || state.demultiplexer): "When setting --run_information, " +
"you must also provide a demultiplexer"
if (!state.run_information) {
println("Run information was not specified, auto-detecting...")
// The supported_platforms hashmap must be a 1-on-1 mapping
// Also, it's keys must be present in the 'choices' field
// for the 'run_information' argument in the viash config.
def supported_platforms = [
"bclconvert": "SampleSheet.csv", // Illumina
"bases2fastq": "RunManifest.csv" // Element Biosciences
// detect demultiplexer
| detect_demultiplexer.run(
fromState: [
"input": "input",
"run_information": "run_information",
"demultiplexer": "demultiplexer",
],
toState: { id, result, state ->
state + [
"demultiplexer": result.demultiplexer_output,
"run_information": result.run_information_output
]
def found_sample_information = supported_platforms.collectEntries{demultiplexer, filename ->
println("Checking if ${filename} can be found in input folder ${state.input}.")
def resolved_filename = state.input.resolve(filename)
if (!resolved_filename.isFile()) {
resolved_filename = null
}
println("Result after looking for run information for ${demultiplexer}: ${resolved_filename}.")
[demultiplexer, resolved_filename]
}
def demultiplexer = null
def run_information = null
found_sample_information.each{demultiplexer_candidate, file_path ->
if (file_path) {
// At this point, a candicate run information file was found.
assert !run_information: "Autodetection of run information " +
"(SampleSheet, RunManifest) failed: " +
"multiple candidate files found in input folder. " +
"Please specify one using --run_information."
run_information = file_path
demultiplexer = demultiplexer_candidate
}
}
// When autodetecting, the run information should have been found
assert run_information: "No run information file (SampleSheet, RunManifest) " +
"found in input directory."
// When autodetecting, the demultiplexer must be set if the run information was found
assert demultiplexer: "State error: the demultiplexer should have been autodetected. " +
"Please report this as a bug."
// When autodetecting, the found demultiplexer must match
// with the demultiplexer that the user has provided (in case it was provided).
if (state.demultiplexer) {
assert state.demultiplexer == demultiplexer,
"Requested to use demultiplexer ${state.demultiplexer} " +
"but demultiplexer based on the autodetected run information "
"file ${run_information} seems to indicate that the demultiplexer "
"should be ${demultiplexer}. Either avoid specifying the demultiplexer "
"or override the autodetection of the run information by providing "
"the file."
}
println("Using run information ${run_information} and demultiplexer ${demultiplexer}")
// At this point, the autodetected state can override the user provided state.
newState = newState + [
"run_information": run_information,
"demultiplexer": demultiplexer,
]
} // end auto-detection logic
if (newState.demultiplexer in ["bclconvert"]) {
// Do not add InterOp to state because we generate the summary csv's in the next
// step based on the run dir, not the InterOp dir.
def interop_dir = state.input.resolve("InterOp")
assert interop_dir.isDirectory(): "Expected InterOp directory to be present."
def copycomplete_file = state.input.resolve("CopyComplete.txt")
assert (copycomplete_file.isFile() || state.skip_copycomplete_check):
"'CopyComplete.txt' file was not found!"
}
def resultState = state + newState
[id, resultState]
}
)
| interop_summary_to_csv.run(
runIf: {id, state -> state.demultiplexer in ["bclconvert"]},

View File

@@ -0,0 +1,57 @@
name: detect_demultiplexer
description: |
Detects the demultiplexer and accompanying sample information file which can be
used to generate the fastq files.
arguments:
- name: --id
description: Unique identifier for the run
type: string
- name: --input
description: Directory containing raw sequencing data
type: file
required: true
- name: --run_information
description: |
CSV file containing sample information, which will be used as
input for the demultiplexer. Canonically called 'SampleSheet.csv' (Illumina)
or 'RunManifest.csv' (Element Biosciences). If not specified,
will try to autodetect the sample sheet in the input directory.
Requires --demultiplexer to be set.
type: file
required: false
- name: "--demultiplexer"
type: string
required: false
choices: ["bases2fastq", "bclconvert"]
description: |
Demultiplexer to use, choice depends on the provider
of the instrument that was used to generate the data.
When not using --sample_sheet, specifying this argument is not
required.
- name: --demultiplexer_output
description: |
Demultiplexer program. The demultiplexer is either provided (with --demultiplexer),
or inferred from the contents of the input data.
type: string
direction: output
required: false
- name: --run_information_output
description: |
Sample information that can be used to demultiplex the input data.
An appropriate file was either provided (with --run_information), or
inferred from the contents of the input data.
type: file
direction: output
required: false
resources:
- type: nextflow_script
path: main.nf
entrypoint: run_wf
runners:
- type: nextflow
engines:
- type: native

View File

@@ -0,0 +1,96 @@
workflow run_wf {
take:
input_ch // Channel with [id, state] pairs
main:
output_ch = input_ch
// Gather input files from folder
| map {id, state ->
def newState = [:]
println("Provided run information: ${state.run_information} and demultiplexer: ${state.demultiplexer}")
// No auto-detection of run information file (it is user provided),
// in this case the demultiplexer should also be specified.
assert (!state.run_information || state.demultiplexer): "When setting --run_information, " +
"you must also provide a demultiplexer"
if (!state.run_information) {
println("Run information was not specified, auto-detecting...")
// The supported_platforms hashmap must be a 1-on-1 mapping
// Also, it's keys must be present in the 'choices' field
// for the 'run_information' argument in the viash config.
def supported_platforms = [
"bclconvert": "SampleSheet.csv", // Illumina
"bases2fastq": "RunManifest.csv" // Element Biosciences
]
def found_sample_information = supported_platforms.collectEntries{demultiplexer, filename ->
println("Checking if ${filename} can be found in input folder ${state.input}.")
def resolved_filename = state.input.resolve(filename)
if (!resolved_filename.isFile()) {
resolved_filename = null
}
println("Result after looking for run information for ${demultiplexer}: ${resolved_filename}.")
[demultiplexer, resolved_filename]
}
def demultiplexer = null
def run_information = null
found_sample_information.each{demultiplexer_candidate, file_path ->
if (file_path) {
// At this point, a candicate run information file was found.
assert !run_information: "Autodetection of run information " +
"(SampleSheet, RunManifest) failed: " +
"multiple candidate files found in input folder. " +
"Please specify one using --run_information."
run_information = file_path
demultiplexer = demultiplexer_candidate
}
}
// When autodetecting, the run information should have been found
assert run_information: "No run information file (SampleSheet, RunManifest) " +
"found in input directory."
// When autodetecting, the demultiplexer must be set if the run information was found
assert demultiplexer: "State error: the demultiplexer should have been autodetected. " +
"Please report this as a bug."
// When autodetecting, the found demultiplexer must match
// with the demultiplexer that the user has provided (in case it was provided).
if (state.demultiplexer) {
assert state.demultiplexer == demultiplexer,
"Requested to use demultiplexer ${state.demultiplexer} " +
"but demultiplexer based on the autodetected run information "
"file ${run_information} seems to indicate that the demultiplexer "
"should be ${demultiplexer}. Either avoid specifying the demultiplexer "
"or override the autodetection of the run information by providing "
"the file."
}
println("Using run information ${run_information} and demultiplexer ${demultiplexer}")
// At this point, the autodetected state can override the user provided state.
newState = newState + [
"run_information": run_information,
"demultiplexer": demultiplexer,
]
} // end auto-detection logic
if (newState.demultiplexer in ["bclconvert"]) {
// Do not add InterOp to state because we generate the summary csv's in the next
// step based on the run dir, not the InterOp dir.
def interop_dir = state.input.resolve("InterOp")
assert interop_dir.isDirectory(): "Expected InterOp directory to be present."
def copycomplete_file = state.input.resolve("CopyComplete.txt")
assert (copycomplete_file.isFile() || state.skip_copycomplete_check):
"'CopyComplete.txt' file was not found!"
}
def resultState = state + newState
[id, resultState]
}
| setState(["demultiplexer_output": "demultiplexer",
"run_information_output": "run_information"])
emit:
output_ch
}

View File

@@ -157,9 +157,9 @@ build_info:
output: "target/executable/io/interop_summary_to_csv"
executable: "target/executable/io/interop_summary_to_csv/interop_summary_to_csv"
viash_version: "0.9.4"
git_commit: "6e71519815566a057711019a23a56a22479dd655"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-31-g6e71519"
git_tag: "v0.1.1-32-g26bd658"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -454,9 +454,9 @@ tar -C /tmp/ --no-same-owner --no-same-permissions -xvf /tmp/interop.tar.gz && \
mv /tmp/interop-1.3.1-Linux-GNU/bin/index-summary /tmp/interop-1.3.1-Linux-GNU/bin/summary /usr/local/bin/
LABEL org.opencontainers.image.description="Companion container for running component io interop_summary_to_csv"
LABEL org.opencontainers.image.created="2025-06-04T10:22:33Z"
LABEL org.opencontainers.image.created="2025-06-10T07:00:17Z"
LABEL org.opencontainers.image.source="https://github.com/viash-hub/demultiplex"
LABEL org.opencontainers.image.revision="6e71519815566a057711019a23a56a22479dd655"
LABEL org.opencontainers.image.revision="26bd658d6e8462c8bf049889349814ab33630e87"
LABEL org.opencontainers.image.version="main"
VIASHDOCKER

View File

@@ -219,9 +219,9 @@ build_info:
output: "target/executable/io/publish"
executable: "target/executable/io/publish/publish"
viash_version: "0.9.4"
git_commit: "6e71519815566a057711019a23a56a22479dd655"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-31-g6e71519"
git_tag: "v0.1.1-32-g26bd658"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -450,9 +450,9 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
LABEL org.opencontainers.image.description="Companion container for running component io publish"
LABEL org.opencontainers.image.created="2025-06-04T10:22:33Z"
LABEL org.opencontainers.image.created="2025-06-10T07:00:17Z"
LABEL org.opencontainers.image.source="https://github.com/viash-hub/demultiplex"
LABEL org.opencontainers.image.revision="6e71519815566a057711019a23a56a22479dd655"
LABEL org.opencontainers.image.revision="26bd658d6e8462c8bf049889349814ab33630e87"
LABEL org.opencontainers.image.version="main"
VIASHDOCKER

View File

@@ -156,9 +156,9 @@ build_info:
output: "target/executable/io/untar"
executable: "target/executable/io/untar/untar"
viash_version: "0.9.4"
git_commit: "6e71519815566a057711019a23a56a22479dd655"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-31-g6e71519"
git_tag: "v0.1.1-32-g26bd658"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -450,9 +450,9 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
LABEL org.opencontainers.image.description="Companion container for running component io untar"
LABEL org.opencontainers.image.created="2025-06-04T10:22:33Z"
LABEL org.opencontainers.image.created="2025-06-10T07:00:17Z"
LABEL org.opencontainers.image.source="https://github.com/viash-hub/demultiplex"
LABEL org.opencontainers.image.revision="6e71519815566a057711019a23a56a22479dd655"
LABEL org.opencontainers.image.revision="26bd658d6e8462c8bf049889349814ab33630e87"
LABEL org.opencontainers.image.version="main"
VIASHDOCKER

View File

@@ -165,9 +165,9 @@ build_info:
output: "target/nextflow/dataflow/combine_samples"
executable: "target/nextflow/dataflow/combine_samples/main.nf"
viash_version: "0.9.4"
git_commit: "6e71519815566a057711019a23a56a22479dd655"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-31-g6e71519"
git_tag: "v0.1.1-32-g26bd658"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -3230,9 +3230,9 @@ meta = [
"engine" : "native|native",
"output" : "target/nextflow/dataflow/combine_samples",
"viash_version" : "0.9.4",
"git_commit" : "6e71519815566a057711019a23a56a22479dd655",
"git_commit" : "26bd658d6e8462c8bf049889349814ab33630e87",
"git_remote" : "https://github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-31-g6e71519"
"git_tag" : "v0.1.1-32-g26bd658"
},
"package_config" : {
"name" : "demultiplex",

View File

@@ -156,9 +156,9 @@ build_info:
output: "target/nextflow/dataflow/gather_fastqs_and_validate"
executable: "target/nextflow/dataflow/gather_fastqs_and_validate/main.nf"
viash_version: "0.9.4"
git_commit: "6e71519815566a057711019a23a56a22479dd655"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-31-g6e71519"
git_tag: "v0.1.1-32-g26bd658"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -3227,9 +3227,9 @@ meta = [
"engine" : "native|native",
"output" : "target/nextflow/dataflow/gather_fastqs_and_validate",
"viash_version" : "0.9.4",
"git_commit" : "6e71519815566a057711019a23a56a22479dd655",
"git_commit" : "26bd658d6e8462c8bf049889349814ab33630e87",
"git_remote" : "https://github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-31-g6e71519"
"git_tag" : "v0.1.1-32-g26bd658"
},
"package_config" : {
"name" : "demultiplex",

View File

@@ -178,6 +178,9 @@ dependencies:
type: "vsh"
repo: "biobox"
tag: "v0.3.1"
- name: "detect_demultiplexer"
repository:
type: "local"
repositories:
- type: "vsh"
name: "bb"
@@ -262,9 +265,9 @@ build_info:
output: "target/nextflow/demultiplex"
executable: "target/nextflow/demultiplex/main.nf"
viash_version: "0.9.4"
git_commit: "6e71519815566a057711019a23a56a22479dd655"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-31-g6e71519"
git_tag: "v0.1.1-32-g26bd658"
dependencies:
- "target/nextflow/io/untar"
- "target/nextflow/dataflow/gather_fastqs_and_validate"
@@ -274,6 +277,7 @@ build_info:
- "target/dependencies/vsh/vsh/biobox/v0.3.1/nextflow/bases2fastq"
- "target/dependencies/vsh/vsh/biobox/v0.3.1/nextflow/fastqc"
- "target/dependencies/vsh/vsh/biobox/v0.3.1/nextflow/multiqc"
- "target/nextflow/detect_demultiplexer"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -3267,6 +3267,12 @@ meta = [
"repo" : "biobox",
"tag" : "v0.3.1"
}
},
{
"name" : "detect_demultiplexer",
"repository" : {
"type" : "local"
}
}
],
"repositories" : [
@@ -3369,9 +3375,9 @@ meta = [
"engine" : "native|native",
"output" : "target/nextflow/demultiplex",
"viash_version" : "0.9.4",
"git_commit" : "6e71519815566a057711019a23a56a22479dd655",
"git_commit" : "26bd658d6e8462c8bf049889349814ab33630e87",
"git_remote" : "https://github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-31-g6e71519"
"git_tag" : "v0.1.1-32-g26bd658"
},
"package_config" : {
"name" : "demultiplex",
@@ -3420,6 +3426,7 @@ include { bcl_convert } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.3.
include { bases2fastq } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.3.1/nextflow/bases2fastq/main.nf"
include { fastqc } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.3.1/nextflow/fastqc/main.nf"
include { multiqc } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.3.1/nextflow/multiqc/main.nf"
include { detect_demultiplexer } from "${meta.resources_dir}/../../nextflow/detect_demultiplexer/main.nf"
// inner workflow
// user-provided Nextflow code
@@ -3446,88 +3453,21 @@ workflow run_wf {
state + ["input": result.output]
},
)
// Gather input files from folder
| map {id, state ->
def newState = [:]
println("Provided run information: ${state.run_information} and demultiplexer: ${state.demultiplexer}")
// No auto-detection of run information file (it is user provided),
// in this case the demultiplexer should also be specified.
assert (!state.run_information || state.demultiplexer): "When setting --run_information, " +
"you must also provide a demultiplexer"
if (!state.run_information) {
println("Run information was not specified, auto-detecting...")
// The supported_platforms hashmap must be a 1-on-1 mapping
// Also, it's keys must be present in the 'choices' field
// for the 'run_information' argument in the viash config.
def supported_platforms = [
"bclconvert": "SampleSheet.csv", // Illumina
"bases2fastq": "RunManifest.csv" // Element Biosciences
// detect demultiplexer
| detect_demultiplexer.run(
fromState: [
"input": "input",
"run_information": "run_information",
"demultiplexer": "demultiplexer",
],
toState: { id, result, state ->
state + [
"demultiplexer": result.demultiplexer_output,
"run_information": result.run_information_output
]
def found_sample_information = supported_platforms.collectEntries{demultiplexer, filename ->
println("Checking if ${filename} can be found in input folder ${state.input}.")
def resolved_filename = state.input.resolve(filename)
if (!resolved_filename.isFile()) {
resolved_filename = null
}
println("Result after looking for run information for ${demultiplexer}: ${resolved_filename}.")
[demultiplexer, resolved_filename]
}
def demultiplexer = null
def run_information = null
found_sample_information.each{demultiplexer_candidate, file_path ->
if (file_path) {
// At this point, a candicate run information file was found.
assert !run_information: "Autodetection of run information " +
"(SampleSheet, RunManifest) failed: " +
"multiple candidate files found in input folder. " +
"Please specify one using --run_information."
run_information = file_path
demultiplexer = demultiplexer_candidate
}
}
// When autodetecting, the run information should have been found
assert run_information: "No run information file (SampleSheet, RunManifest) " +
"found in input directory."
// When autodetecting, the demultiplexer must be set if the run information was found
assert demultiplexer: "State error: the demultiplexer should have been autodetected. " +
"Please report this as a bug."
// When autodetecting, the found demultiplexer must match
// with the demultiplexer that the user has provided (in case it was provided).
if (state.demultiplexer) {
assert state.demultiplexer == demultiplexer,
"Requested to use demultiplexer ${state.demultiplexer} " +
"but demultiplexer based on the autodetected run information "
"file ${run_information} seems to indicate that the demultiplexer "
"should be ${demultiplexer}. Either avoid specifying the demultiplexer "
"or override the autodetection of the run information by providing "
"the file."
}
println("Using run information ${run_information} and demultiplexer ${demultiplexer}")
// At this point, the autodetected state can override the user provided state.
newState = newState + [
"run_information": run_information,
"demultiplexer": demultiplexer,
]
} // end auto-detection logic
if (newState.demultiplexer in ["bclconvert"]) {
// Do not add InterOp to state because we generate the summary csv's in the next
// step based on the run dir, not the InterOp dir.
def interop_dir = state.input.resolve("InterOp")
assert interop_dir.isDirectory(): "Expected InterOp directory to be present."
def copycomplete_file = state.input.resolve("CopyComplete.txt")
assert (copycomplete_file.isFile() || state.skip_copycomplete_check):
"'CopyComplete.txt' file was not found!"
}
def resultState = state + newState
[id, resultState]
}
)
| interop_summary_to_csv.run(
runIf: {id, state -> state.demultiplexer in ["bclconvert"]},

View File

@@ -0,0 +1,199 @@
name: "detect_demultiplexer"
version: "main"
argument_groups:
- name: "Arguments"
arguments:
- type: "string"
name: "--id"
description: "Unique identifier for the run"
info: null
required: false
direction: "input"
multiple: false
multiple_sep: ";"
- type: "file"
name: "--input"
description: "Directory containing raw sequencing data"
info: null
must_exist: true
create_parent: true
required: true
direction: "input"
multiple: false
multiple_sep: ";"
- type: "file"
name: "--run_information"
description: "CSV file containing sample information, which will be used as \n\
input for the demultiplexer. Canonically called 'SampleSheet.csv' (Illumina)\n\
or 'RunManifest.csv' (Element Biosciences). If not specified,\nwill try to autodetect\
\ the sample sheet in the input directory.\nRequires --demultiplexer to be set.\n"
info: null
must_exist: true
create_parent: true
required: false
direction: "input"
multiple: false
multiple_sep: ";"
- type: "string"
name: "--demultiplexer"
description: "Demultiplexer to use, choice depends on the provider\nof the instrument\
\ that was used to generate the data.\nWhen not using --sample_sheet, specifying\
\ this argument is not\nrequired.\n"
info: null
required: false
choices:
- "bases2fastq"
- "bclconvert"
direction: "input"
multiple: false
multiple_sep: ";"
- type: "string"
name: "--demultiplexer_output"
description: "Demultiplexer program. The demultiplexer is either provided (with\
\ --demultiplexer), \nor inferred from the contents of the input data.\n"
info: null
required: false
direction: "output"
multiple: false
multiple_sep: ";"
- type: "file"
name: "--run_information_output"
description: "Sample information that can be used to demultiplex the input data.\
\ \nAn appropriate file was either provided (with --run_information), or \n\
inferred from the contents of the input data.\n"
info: null
must_exist: true
create_parent: true
required: false
direction: "output"
multiple: false
multiple_sep: ";"
resources:
- type: "nextflow_script"
path: "main.nf"
is_executable: true
entrypoint: "run_wf"
- type: "file"
path: "nextflow_labels.config"
dest: "nextflow_labels.config"
description: "Detects the demultiplexer and accompanying sample information file which\
\ can be \nused to generate the fastq files.\n"
info: null
status: "enabled"
scope:
image: "public"
target: "public"
requirements:
commands:
- "ps"
license: "MIT"
links:
repository: "https://github.com/viash-hub/demultiplex"
runners:
- type: "nextflow"
id: "nextflow"
directives:
tag: "$id"
auto:
simplifyInput: true
simplifyOutput: false
transcript: false
publish: false
config:
labels:
mem1gb: "memory = 1000000000.B"
mem2gb: "memory = 2000000000.B"
mem5gb: "memory = 5000000000.B"
mem10gb: "memory = 10000000000.B"
mem20gb: "memory = 20000000000.B"
mem50gb: "memory = 50000000000.B"
mem100gb: "memory = 100000000000.B"
mem200gb: "memory = 200000000000.B"
mem500gb: "memory = 500000000000.B"
mem1tb: "memory = 1000000000000.B"
mem2tb: "memory = 2000000000000.B"
mem5tb: "memory = 5000000000000.B"
mem10tb: "memory = 10000000000000.B"
mem20tb: "memory = 20000000000000.B"
mem50tb: "memory = 50000000000000.B"
mem100tb: "memory = 100000000000000.B"
mem200tb: "memory = 200000000000000.B"
mem500tb: "memory = 500000000000000.B"
mem1gib: "memory = 1073741824.B"
mem2gib: "memory = 2147483648.B"
mem4gib: "memory = 4294967296.B"
mem8gib: "memory = 8589934592.B"
mem16gib: "memory = 17179869184.B"
mem32gib: "memory = 34359738368.B"
mem64gib: "memory = 68719476736.B"
mem128gib: "memory = 137438953472.B"
mem256gib: "memory = 274877906944.B"
mem512gib: "memory = 549755813888.B"
mem1tib: "memory = 1099511627776.B"
mem2tib: "memory = 2199023255552.B"
mem4tib: "memory = 4398046511104.B"
mem8tib: "memory = 8796093022208.B"
mem16tib: "memory = 17592186044416.B"
mem32tib: "memory = 35184372088832.B"
mem64tib: "memory = 70368744177664.B"
mem128tib: "memory = 140737488355328.B"
mem256tib: "memory = 281474976710656.B"
mem512tib: "memory = 562949953421312.B"
cpu1: "cpus = 1"
cpu2: "cpus = 2"
cpu5: "cpus = 5"
cpu10: "cpus = 10"
cpu20: "cpus = 20"
cpu50: "cpus = 50"
cpu100: "cpus = 100"
cpu200: "cpus = 200"
cpu500: "cpus = 500"
cpu1000: "cpus = 1000"
script:
- "includeConfig(\"nextflow_labels.config\")"
debug: false
container: "docker"
engines:
- type: "native"
id: "native"
- type: "native"
id: "native"
build_info:
config: "src/detect_demultiplexer/config.vsh.yaml"
runner: "nextflow"
engine: "native|native"
output: "target/nextflow/detect_demultiplexer"
executable: "target/nextflow/detect_demultiplexer/main.nf"
viash_version: "0.9.4"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-32-g26bd658"
package_config:
name: "demultiplex"
version: "main"
description: "Demultiplexing pipeline\n"
info:
test_resources:
- path: "gs://viash-hub-resources/demultiplex/v4"
dest: "testData"
viash_version: "0.9.4"
source: "src"
target: "target"
config_mods:
- ".requirements.commands += ['ps']\n.runners[.type == 'nextflow'].directives.tag\
\ := '$id'\n.resources += {path: '/src/config/labels.config', dest: 'nextflow_labels.config'}\n\
.runners[.type == 'nextflow'].config.script := 'includeConfig(\"nextflow_labels.config\"\
)'\n"
- ".engines += { type: \"native\" }"
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
- ".engines[.type == 'docker'].target_tag := 'main'"
keywords:
- "bioinformatics"
- "sequence"
- "demultiplexing"
- "pipeline"
license: "MIT"
organization: "vsh"
links:
repository: "https://github.com/viash-hub/demultiplex"
issue_tracker: "https://github.com/viash-hub/demultiplex/issues"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,125 @@
manifest {
name = 'detect_demultiplexer'
mainScript = 'main.nf'
nextflowVersion = '!>=20.12.1-edge'
version = 'main'
description = 'Detects the demultiplexer and accompanying sample information file which can be \nused to generate the fastq files.\n'
}
process.container = 'nextflow/bash:latest'
// detect tempdir
tempDir = java.nio.file.Paths.get(
System.getenv('NXF_TEMP') ?:
System.getenv('VIASH_TEMP') ?:
System.getenv('TEMPDIR') ?:
System.getenv('TMPDIR') ?:
'/tmp'
).toAbsolutePath()
profiles {
no_publish {
process {
withName: '.*' {
publishDir = [
enabled: false
]
}
}
}
mount_temp {
docker.temp = tempDir
podman.temp = tempDir
charliecloud.temp = tempDir
}
docker {
docker.enabled = true
// docker.userEmulation = true
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
singularity {
singularity.enabled = true
singularity.autoMounts = true
docker.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
podman {
podman.enabled = true
docker.enabled = false
singularity.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
shifter {
shifter.enabled = true
docker.enabled = false
singularity.enabled = false
podman.enabled = false
charliecloud.enabled = false
}
charliecloud {
charliecloud.enabled = true
docker.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
}
}
process{
withLabel: mem1gb { memory = 1000000000.B }
withLabel: mem2gb { memory = 2000000000.B }
withLabel: mem5gb { memory = 5000000000.B }
withLabel: mem10gb { memory = 10000000000.B }
withLabel: mem20gb { memory = 20000000000.B }
withLabel: mem50gb { memory = 50000000000.B }
withLabel: mem100gb { memory = 100000000000.B }
withLabel: mem200gb { memory = 200000000000.B }
withLabel: mem500gb { memory = 500000000000.B }
withLabel: mem1tb { memory = 1000000000000.B }
withLabel: mem2tb { memory = 2000000000000.B }
withLabel: mem5tb { memory = 5000000000000.B }
withLabel: mem10tb { memory = 10000000000000.B }
withLabel: mem20tb { memory = 20000000000000.B }
withLabel: mem50tb { memory = 50000000000000.B }
withLabel: mem100tb { memory = 100000000000000.B }
withLabel: mem200tb { memory = 200000000000000.B }
withLabel: mem500tb { memory = 500000000000000.B }
withLabel: mem1gib { memory = 1073741824.B }
withLabel: mem2gib { memory = 2147483648.B }
withLabel: mem4gib { memory = 4294967296.B }
withLabel: mem8gib { memory = 8589934592.B }
withLabel: mem16gib { memory = 17179869184.B }
withLabel: mem32gib { memory = 34359738368.B }
withLabel: mem64gib { memory = 68719476736.B }
withLabel: mem128gib { memory = 137438953472.B }
withLabel: mem256gib { memory = 274877906944.B }
withLabel: mem512gib { memory = 549755813888.B }
withLabel: mem1tib { memory = 1099511627776.B }
withLabel: mem2tib { memory = 2199023255552.B }
withLabel: mem4tib { memory = 4398046511104.B }
withLabel: mem8tib { memory = 8796093022208.B }
withLabel: mem16tib { memory = 17592186044416.B }
withLabel: mem32tib { memory = 35184372088832.B }
withLabel: mem64tib { memory = 70368744177664.B }
withLabel: mem128tib { memory = 140737488355328.B }
withLabel: mem256tib { memory = 281474976710656.B }
withLabel: mem512tib { memory = 562949953421312.B }
withLabel: cpu1 { cpus = 1 }
withLabel: cpu2 { cpus = 2 }
withLabel: cpu5 { cpus = 5 }
withLabel: cpu10 { cpus = 10 }
withLabel: cpu20 { cpus = 20 }
withLabel: cpu50 { cpus = 50 }
withLabel: cpu100 { cpus = 100 }
withLabel: cpu200 { cpus = 200 }
withLabel: cpu500 { cpus = 500 }
withLabel: cpu1000 { cpus = 1000 }
}
includeConfig("nextflow_labels.config")

View File

@@ -0,0 +1,98 @@
process {
container = 'nextflow/bash:latest'
// default resources
memory = { 8.Gb * task.attempt }
cpus = 8
maxForks = 36
// Retry for exit codes that have something to do with memory issues
errorStrategy = { task.exitStatus in 137..140 ? 'retry' : 'terminate' }
maxRetries = 3
maxMemory = 192.GB
// Resource labels
withLabel: verylowcpu { cpus = 2 }
withLabel: lowcpu { cpus = 8 }
withLabel: midcpu { cpus = 16 }
withLabel: highcpu { cpus = 32 }
withLabel: verylowmem { memory = { get_memory( 4.GB * task.attempt ) } }
withLabel: lowmem { memory = { get_memory( 8.GB * task.attempt ) } }
withLabel: midmem { memory = { get_memory( 16.GB * task.attempt ) } }
withLabel: highmem { memory = { get_memory( 64.GB * task.attempt ) } }
}
profiles {
// detect tempdir
tempDir = java.nio.file.Paths.get(
System.getenv('NXF_TEMP') ?:
System.getenv('VIASH_TEMP') ?:
System.getenv('TEMPDIR') ?:
System.getenv('TMPDIR') ?:
'/tmp'
).toAbsolutePath()
mount_temp {
docker.temp = tempDir
podman.temp = tempDir
charliecloud.temp = tempDir
}
no_publish {
process {
withName: '.*' {
publishDir = [
enabled: false
]
}
}
}
docker {
docker.fixOwnership = true
docker.enabled = true
// docker.userEmulation = true
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
local {
// This config is for local processing.
process {
maxMemory = 25.GB
withLabel: verylowcpu { cpus = 2 }
withLabel: lowcpu { cpus = 4 }
withLabel: midcpu { cpus = 6 }
withLabel: highcpu { cpus = 12 }
withLabel: lowmem { memory = { get_memory( 8.GB * task.attempt ) } }
withLabel: midmem { memory = { get_memory( 12.GB * task.attempt ) } }
withLabel: highmem { memory = { get_memory( 20.GB * task.attempt ) } }
}
}
}
def get_memory(to_compare) {
if (!process.containsKey("maxMemory") || !process.maxMemory) {
return to_compare
}
try {
if (process.containsKey("maxRetries") && process.maxRetries && task.attempt == (process.maxRetries as int)) {
return process.maxMemory
}
else if (to_compare.compareTo(process.maxMemory as nextflow.util.MemoryUnit) == 1) {
return max_memory as nextflow.util.MemoryUnit
}
else {
return to_compare
}
} catch (all) {
println "Error processing memory resources. Please check that process.maxMemory '${process.maxMemory}' and process.maxRetries '${process.maxRetries}' are valid!"
System.exit(1)
}
}

View File

@@ -0,0 +1,74 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "detect_demultiplexer",
"description": "Detects the demultiplexer and accompanying sample information file which can be \nused to generate the fastq files.\n",
"type": "object",
"$defs": {
"arguments": {
"title": "Arguments",
"type": "object",
"description": "No description",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the run",
"help_text": "Type: `string`, multiple: `False`. "
},
"input": {
"type": "string",
"format": "path",
"exists": true,
"description": "Directory containing raw sequencing data",
"help_text": "Type: `file`, multiple: `False`, required, direction: `input`. "
},
"run_information": {
"type": "string",
"format": "path",
"description": "CSV file containing sample information, which will be used as \ninput for the demultiplexer",
"help_text": "Type: `file`, multiple: `False`, direction: `input`. "
},
"demultiplexer": {
"type": "string",
"description": "Demultiplexer to use, choice depends on the provider\nof the instrument that was used to generate the data.\nWhen not using --sample_sheet, specifying this argument is not\nrequired.\n",
"help_text": "Type: `string`, multiple: `False`, choices: ``bases2fastq`, `bclconvert``. ",
"enum": [
"bases2fastq",
"bclconvert"
]
},
"demultiplexer_output": {
"type": "string",
"description": "Demultiplexer program",
"help_text": "Type: `string`, multiple: `False`. "
},
"run_information_output": {
"type": "string",
"format": "path",
"description": "Sample information that can be used to demultiplex the input data",
"help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.run_information_output\"`, direction: `output`. ",
"default": "$id.$key.run_information_output"
}
}
},
"nextflow input-output arguments": {
"title": "Nextflow input-output arguments",
"type": "object",
"description": "Input/output parameters for Nextflow itself. Please note that both publishDir and publish_dir are supported but at least one has to be configured.",
"properties": {
"publish_dir": {
"type": "string",
"description": "Path to an output directory.",
"help_text": "Type: `string`, multiple: `False`, required, example: `\"output/\"`. "
}
}
}
},
"allOf": [
{
"$ref": "#/$defs/arguments"
},
{
"$ref": "#/$defs/nextflow input-output arguments"
}
]
}

View File

@@ -157,9 +157,9 @@ build_info:
output: "target/nextflow/io/interop_summary_to_csv"
executable: "target/nextflow/io/interop_summary_to_csv/main.nf"
viash_version: "0.9.4"
git_commit: "6e71519815566a057711019a23a56a22479dd655"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-31-g6e71519"
git_tag: "v0.1.1-32-g26bd658"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -3228,9 +3228,9 @@ meta = [
"engine" : "docker|native",
"output" : "target/nextflow/io/interop_summary_to_csv",
"viash_version" : "0.9.4",
"git_commit" : "6e71519815566a057711019a23a56a22479dd655",
"git_commit" : "26bd658d6e8462c8bf049889349814ab33630e87",
"git_remote" : "https://github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-31-g6e71519"
"git_tag" : "v0.1.1-32-g26bd658"
},
"package_config" : {
"name" : "demultiplex",

View File

@@ -219,9 +219,9 @@ build_info:
output: "target/nextflow/io/publish"
executable: "target/nextflow/io/publish/main.nf"
viash_version: "0.9.4"
git_commit: "6e71519815566a057711019a23a56a22479dd655"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-31-g6e71519"
git_tag: "v0.1.1-32-g26bd658"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -3297,9 +3297,9 @@ meta = [
"engine" : "docker|native",
"output" : "target/nextflow/io/publish",
"viash_version" : "0.9.4",
"git_commit" : "6e71519815566a057711019a23a56a22479dd655",
"git_commit" : "26bd658d6e8462c8bf049889349814ab33630e87",
"git_remote" : "https://github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-31-g6e71519"
"git_tag" : "v0.1.1-32-g26bd658"
},
"package_config" : {
"name" : "demultiplex",

View File

@@ -156,9 +156,9 @@ build_info:
output: "target/nextflow/io/untar"
executable: "target/nextflow/io/untar/main.nf"
viash_version: "0.9.4"
git_commit: "6e71519815566a057711019a23a56a22479dd655"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-31-g6e71519"
git_tag: "v0.1.1-32-g26bd658"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -3227,9 +3227,9 @@ meta = [
"engine" : "docker|native",
"output" : "target/nextflow/io/untar",
"viash_version" : "0.9.4",
"git_commit" : "6e71519815566a057711019a23a56a22479dd655",
"git_commit" : "26bd658d6e8462c8bf049889349814ab33630e87",
"git_remote" : "https://github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-31-g6e71519"
"git_tag" : "v0.1.1-32-g26bd658"
},
"package_config" : {
"name" : "demultiplex",

View File

@@ -211,9 +211,9 @@ build_info:
output: "target/nextflow/runner"
executable: "target/nextflow/runner/main.nf"
viash_version: "0.9.4"
git_commit: "6e71519815566a057711019a23a56a22479dd655"
git_commit: "26bd658d6e8462c8bf049889349814ab33630e87"
git_remote: "https://github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-31-g6e71519"
git_tag: "v0.1.1-32-g26bd658"
dependencies:
- "target/nextflow/demultiplex"
- "target/nextflow/io/publish"

View File

@@ -3291,9 +3291,9 @@ meta = [
"engine" : "native|native",
"output" : "target/nextflow/runner",
"viash_version" : "0.9.4",
"git_commit" : "6e71519815566a057711019a23a56a22479dd655",
"git_commit" : "26bd658d6e8462c8bf049889349814ab33630e87",
"git_remote" : "https://github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-31-g6e71519"
"git_tag" : "v0.1.1-32-g26bd658"
},
"package_config" : {
"name" : "demultiplex",