Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac1b39e004 | |||
| 5d74ec3308 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,7 +1,8 @@
|
||||
target
|
||||
testData
|
||||
test_resources
|
||||
|
||||
# Nextflow related files
|
||||
.nextflow
|
||||
.nextflow.log*
|
||||
work
|
||||
work
|
||||
|
||||
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,17 +1,13 @@
|
||||
# 0.1.2
|
||||
# v0.1.1
|
||||
|
||||
## NEW FEATURES
|
||||
## Minor updates
|
||||
|
||||
* Bump viash to 0.9.0 (PR #14).
|
||||
|
||||
* `demultiplex` workflow: use `v0.2.0` release instead of `main` branch for `biobox` dependencies (PR #11).
|
||||
|
||||
* Renamed `biobase` repository to `biobox` (PR #13 and PR #15).
|
||||
|
||||
* Bump viash to 0.9.0-RC6 (PR #14).
|
||||
|
||||
# v0.1.1
|
||||
|
||||
## NEW FEATURES
|
||||
|
||||
* `demultiplex` workflow: use `v0.1.0` release instead of `main` branch for `biobase` dependencies (PR #11).
|
||||
|
||||
# v0.1.0
|
||||
|
||||
Initial release
|
||||
Initial release
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: demultiplex
|
||||
version: v0.1.0
|
||||
version: v0.1.1
|
||||
description: |
|
||||
Demultiplexing pipeline
|
||||
license: MIT
|
||||
@@ -12,7 +12,7 @@ info:
|
||||
- path: https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NovaSeq6000/200624_A00834_0183_BHMTFYDRXX.tar.gz
|
||||
dest: test_resources
|
||||
|
||||
viash_version: 0.9.0-RC6
|
||||
viash_version: 0.9.0
|
||||
|
||||
config_mods: |
|
||||
.requirements.commands := ['ps']
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
manifest {
|
||||
name = "demultiplex"
|
||||
version = "v0.1.0"
|
||||
version = "v0.1.1"
|
||||
defaultBranch = "main"
|
||||
nextflowVersion = "!>=20.12.1-edge"
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ repositories:
|
||||
- name: bb
|
||||
type: vsh
|
||||
repo: biobox
|
||||
tag: v0.1.0
|
||||
tag: v0.2.0
|
||||
|
||||
runners:
|
||||
- type: nextflow
|
||||
|
||||
@@ -1,5 +1,30 @@
|
||||
name: "bcl_convert"
|
||||
version: "v0.1.0"
|
||||
version: "0.2.0"
|
||||
authors:
|
||||
- name: "Toni Verbeiren"
|
||||
roles:
|
||||
- "author"
|
||||
- "maintainer"
|
||||
info:
|
||||
links:
|
||||
github: "tverbeiren"
|
||||
linkedin: "verbeiren"
|
||||
organizations:
|
||||
- name: "Data Intuitive"
|
||||
href: "https://www.data-intuitive.com"
|
||||
role: "Data Scientist and CEO"
|
||||
- name: "Dorien Roosen"
|
||||
roles:
|
||||
- "author"
|
||||
info:
|
||||
links:
|
||||
email: "dorien@data-intuitive.com"
|
||||
github: "dorien-er"
|
||||
linkedin: "dorien-roosen"
|
||||
organizations:
|
||||
- name: "Data Intuitive"
|
||||
href: "https://www.data-intuitive.com"
|
||||
role: "Data Scientist"
|
||||
argument_groups:
|
||||
- name: "Input arguments"
|
||||
arguments:
|
||||
@@ -281,9 +306,16 @@ status: "enabled"
|
||||
requirements:
|
||||
commands:
|
||||
- "ps"
|
||||
license: "MIT"
|
||||
keywords:
|
||||
- "demultiplex"
|
||||
- "fastq"
|
||||
- "bcl"
|
||||
- "illumina"
|
||||
license: "Proprietary"
|
||||
links:
|
||||
repository: "https://github.com/viash-hub/biobox"
|
||||
homepage: "https://support.illumina.com/sequencing/sequencing_software/bcl-convert.html"
|
||||
documentation: "https://support.illumina.com/downloads/bcl-convert-user-guide.html"
|
||||
runners:
|
||||
- type: "executable"
|
||||
id: "executable"
|
||||
@@ -354,7 +386,7 @@ engines:
|
||||
id: "docker"
|
||||
image: "debian:trixie-slim"
|
||||
target_registry: "images.viash-hub.com"
|
||||
target_tag: "v0.1.0"
|
||||
target_tag: "0.2.0"
|
||||
namespace_separator: "/"
|
||||
setup:
|
||||
- type: "apt"
|
||||
@@ -385,22 +417,22 @@ build_info:
|
||||
engine: "docker|native"
|
||||
output: "target/nextflow/bcl_convert"
|
||||
executable: "target/nextflow/bcl_convert/main.nf"
|
||||
viash_version: "0.9.0-RC6"
|
||||
git_commit: "b84b29747d0635f2ac83ea63b496be9a9edb6724"
|
||||
viash_version: "0.9.0"
|
||||
git_commit: "5526b3e939030daea80595fa98387b469329bbfa"
|
||||
git_remote: "https://github.com/viash-hub/biobox"
|
||||
package_config:
|
||||
name: "biobox"
|
||||
version: "v0.1.0"
|
||||
version: "0.2.0"
|
||||
description: "A collection of bioinformatics tools for working with sequence data.\n"
|
||||
info: null
|
||||
viash_version: "0.9.0-RC6"
|
||||
viash_version: "0.9.0"
|
||||
source: "src"
|
||||
target: "target"
|
||||
config_mods:
|
||||
- ".requirements.commands := ['ps']\n"
|
||||
- ".engines += { type: \"native\" }"
|
||||
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
- ".engines[.type == 'docker'].target_tag := '0.2.0'"
|
||||
keywords:
|
||||
- "bioinformatics"
|
||||
- "modules"
|
||||
@@ -1,13 +1,17 @@
|
||||
// bcl_convert v0.1.0
|
||||
// bcl_convert 0.2.0
|
||||
//
|
||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||
// Data Intuitive.
|
||||
// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative
|
||||
// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data
|
||||
// Intuitive.
|
||||
//
|
||||
// The component may contain files which fall under a different license. The
|
||||
// authors of this component should specify the license in the header of such
|
||||
// files, or include a separate license file detailing the licenses of all included
|
||||
// files.
|
||||
//
|
||||
// Component authors:
|
||||
// * Toni Verbeiren (author, maintainer)
|
||||
// * Dorien Roosen (author)
|
||||
|
||||
////////////////////////////
|
||||
// VDSL3 helper functions //
|
||||
@@ -760,8 +764,11 @@ def runEach(Map args) {
|
||||
def fromState_ = args.fromState
|
||||
def toState_ = args.toState
|
||||
def filter_ = args.filter
|
||||
def runIf_ = args.runIf
|
||||
def id_ = args.id
|
||||
|
||||
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||
|
||||
workflow runEachWf {
|
||||
take: input_ch
|
||||
main:
|
||||
@@ -783,7 +790,20 @@ def runEach(Map args) {
|
||||
[new_id] + tup.drop(1)
|
||||
}
|
||||
: filter_ch
|
||||
def data_ch = id_ch | map{tup ->
|
||||
def chPassthrough = null
|
||||
def chRun = null
|
||||
if (runIf_) {
|
||||
def idRunIfBranch = id_ch.branch{ tup ->
|
||||
run: runIf_(tup[0], tup[1], comp_)
|
||||
passthrough: true
|
||||
}
|
||||
chPassthrough = idRunIfBranch.passthrough
|
||||
chRun = idRunIfBranch.run
|
||||
} else {
|
||||
chRun = id_ch
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
def data_ch = chRun | map{tup ->
|
||||
def new_data = tup[1]
|
||||
if (fromState_ instanceof Map) {
|
||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||
@@ -821,8 +841,11 @@ def runEach(Map args) {
|
||||
[tup[0], new_state] + tup.drop(3)
|
||||
}
|
||||
: out_ch
|
||||
|
||||
def return_ch = post_ch
|
||||
| concat(chPassthrough)
|
||||
|
||||
post_ch
|
||||
return_ch
|
||||
}
|
||||
|
||||
// mix all results
|
||||
@@ -1598,8 +1621,8 @@ def findStates(Map params, Map config) {
|
||||
// construct renameMap
|
||||
if (args.rename_keys) {
|
||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||
def split = renameString.split(";")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
||||
def split = renameString.split(":")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||
split
|
||||
}
|
||||
|
||||
@@ -1709,7 +1732,9 @@ def publishStates(Map args) {
|
||||
|
||||
def yamlFilename = yamlTemplate_
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
|
||||
// TODO: do the pathnames in state_ match up with the outputFilenames_?
|
||||
|
||||
@@ -1780,7 +1805,9 @@ def publishStatesByConfig(Map args) {
|
||||
def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml'
|
||||
def yamlFilename = yamlTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent()
|
||||
|
||||
// the processed state is a list of [key, value, inputPath, outputFilename] tuples, where
|
||||
@@ -1822,7 +1849,9 @@ def publishStatesByConfig(Map args) {
|
||||
// instantiate the template
|
||||
def filename = filenameTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
if (par.multiple) {
|
||||
// if the parameter is multiple: true, the filename
|
||||
// should contain a wildcard '*' that is replaced with
|
||||
@@ -2626,30 +2655,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
tuple
|
||||
}
|
||||
|
||||
def chModifiedFiltered = workflowArgs.filter ?
|
||||
chModified | filter{workflowArgs.filter(it)} :
|
||||
chModified
|
||||
|
||||
def chRun = null
|
||||
def chPassthrough = null
|
||||
if (workflowArgs.runIf) {
|
||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
||||
def runIfBranch = chModified.branch{ tup ->
|
||||
run: workflowArgs.runIf(tup[0], tup[1])
|
||||
passthrough: true
|
||||
}
|
||||
chRun = runIfBranch.run
|
||||
chPassthrough = runIfBranch.passthrough
|
||||
} else {
|
||||
chRun = chModifiedFiltered
|
||||
chRun = chModified
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
|
||||
def chRunFiltered = workflowArgs.filter ?
|
||||
chRun | filter{workflowArgs.filter(it)} :
|
||||
chRun
|
||||
|
||||
def chArgs = workflowArgs.fromState ?
|
||||
chRun | map{
|
||||
chRunFiltered | map{
|
||||
def new_data = workflowArgs.fromState(it.take(2))
|
||||
[it[0], new_data]
|
||||
} :
|
||||
chRun | map {tup -> tup.take(2)}
|
||||
chRunFiltered | map {tup -> tup.take(2)}
|
||||
|
||||
// fill in defaults
|
||||
def chArgsWithDefaults = chArgs
|
||||
@@ -2720,7 +2750,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||
|
||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
||||
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||
// output tuple format: [join_id, id, new_state, ...]
|
||||
| map{ tup ->
|
||||
@@ -2779,7 +2809,49 @@ meta = [
|
||||
"resources_dir": moduleDir.toRealPath().normalize(),
|
||||
"config": processConfig(readJsonBlob('''{
|
||||
"name" : "bcl_convert",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "0.2.0",
|
||||
"authors" : [
|
||||
{
|
||||
"name" : "Toni Verbeiren",
|
||||
"roles" : [
|
||||
"author",
|
||||
"maintainer"
|
||||
],
|
||||
"info" : {
|
||||
"links" : {
|
||||
"github" : "tverbeiren",
|
||||
"linkedin" : "verbeiren"
|
||||
},
|
||||
"organizations" : [
|
||||
{
|
||||
"name" : "Data Intuitive",
|
||||
"href" : "https://www.data-intuitive.com",
|
||||
"role" : "Data Scientist and CEO"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name" : "Dorien Roosen",
|
||||
"roles" : [
|
||||
"author"
|
||||
],
|
||||
"info" : {
|
||||
"links" : {
|
||||
"email" : "dorien@data-intuitive.com",
|
||||
"github" : "dorien-er",
|
||||
"linkedin" : "dorien-roosen"
|
||||
},
|
||||
"organizations" : [
|
||||
{
|
||||
"name" : "Data Intuitive",
|
||||
"href" : "https://www.data-intuitive.com",
|
||||
"role" : "Data Scientist"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"argument_groups" : [
|
||||
{
|
||||
"name" : "Input arguments",
|
||||
@@ -3125,9 +3197,17 @@ meta = [
|
||||
"ps"
|
||||
]
|
||||
},
|
||||
"license" : "MIT",
|
||||
"keywords" : [
|
||||
"demultiplex",
|
||||
"fastq",
|
||||
"bcl",
|
||||
"illumina"
|
||||
],
|
||||
"license" : "Proprietary",
|
||||
"links" : {
|
||||
"repository" : "https://github.com/viash-hub/biobox"
|
||||
"repository" : "https://github.com/viash-hub/biobox",
|
||||
"homepage" : "https://support.illumina.com/sequencing/sequencing_software/bcl-convert.html",
|
||||
"documentation" : "https://support.illumina.com/downloads/bcl-convert-user-guide.html"
|
||||
},
|
||||
"runners" : [
|
||||
{
|
||||
@@ -3209,7 +3289,7 @@ meta = [
|
||||
"id" : "docker",
|
||||
"image" : "debian:trixie-slim",
|
||||
"target_registry" : "images.viash-hub.com",
|
||||
"target_tag" : "v0.1.0",
|
||||
"target_tag" : "0.2.0",
|
||||
"namespace_separator" : "/",
|
||||
"setup" : [
|
||||
{
|
||||
@@ -3248,22 +3328,22 @@ meta = [
|
||||
"runner" : "nextflow",
|
||||
"engine" : "docker|native",
|
||||
"output" : "target/nextflow/bcl_convert",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"git_commit" : "b84b29747d0635f2ac83ea63b496be9a9edb6724",
|
||||
"viash_version" : "0.9.0",
|
||||
"git_commit" : "5526b3e939030daea80595fa98387b469329bbfa",
|
||||
"git_remote" : "https://github.com/viash-hub/biobox"
|
||||
},
|
||||
"package_config" : {
|
||||
"name" : "biobox",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "0.2.0",
|
||||
"description" : "A collection of bioinformatics tools for working with sequence data.\n",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"viash_version" : "0.9.0",
|
||||
"source" : "src",
|
||||
"target" : "target",
|
||||
"config_mods" : [
|
||||
".requirements.commands := ['ps']\n",
|
||||
".engines += { type: \\"native\\" }",
|
||||
".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'",
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
".engines[.type == 'docker'].target_tag := '0.2.0'"
|
||||
],
|
||||
"keywords" : [
|
||||
"bioinformatics",
|
||||
@@ -3454,7 +3534,11 @@ def vdsl3WorkflowFactory(Map args, Map meta, String rawScript) {
|
||||
val = val.join(par.multiple_sep)
|
||||
}
|
||||
if (par.direction == "output" && par.type == "file") {
|
||||
val = val.replaceAll('\\$id', id).replaceAll('\\$key', key)
|
||||
val = val
|
||||
.replaceAll('\\$id', id)
|
||||
.replaceAll('\\$\\{id\\}', id)
|
||||
.replaceAll('\\$key', key)
|
||||
.replaceAll('\\$\\{key\\}', key)
|
||||
}
|
||||
[parName, val]
|
||||
}
|
||||
@@ -3585,7 +3669,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def createParentStr = meta.config.allArguments
|
||||
.findAll { it.type == "file" && it.direction == "output" && it.create_parent }
|
||||
.collect { par ->
|
||||
"\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent \\\"\" + (args[\"${par.plainName}\"] instanceof String ? args[\"${par.plainName}\"] : args[\"${par.plainName}\"].join('\" \"')) + \"\\\"\" : \"\" }"
|
||||
def contents = "args[\"${par.plainName}\"] instanceof List ? args[\"${par.plainName}\"].join('\" \"') : args[\"${par.plainName}\"]"
|
||||
"\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent '\" + escapeText(${contents}) + \"'\" : \"\" }"
|
||||
}
|
||||
.join("\n")
|
||||
|
||||
@@ -3593,8 +3678,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def inputFileExports = meta.config.allArguments
|
||||
.findAll { it.type == "file" && it.direction.toLowerCase() == "input" }
|
||||
.collect { par ->
|
||||
def viash_par_contents = "(viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName})"
|
||||
"\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}=\\\"\" + ${viash_par_contents} + \"\\\"\"}"
|
||||
def contents = "viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName}"
|
||||
"\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}='\" + escapeText(${contents}) + \"'\"}"
|
||||
}
|
||||
|
||||
// NOTE: if using docker, use /tmp instead of tmpDir!
|
||||
@@ -3631,6 +3716,7 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def procStr =
|
||||
"""nextflow.enable.dsl=2
|
||||
|
|
||||
|def escapeText = { s -> s.toString().replaceAll("'", "'\\\"'\\\"'") }
|
||||
|process $procKey {$drctvStrs
|
||||
|input:
|
||||
| tuple val(id)$inputPaths, val(args), path(resourcesDir, stageAs: ".viash_meta_resources")
|
||||
@@ -3642,10 +3728,9 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
|$stub
|
||||
|\"\"\"
|
||||
|script:$assertStr
|
||||
|def escapeText = { s -> s.toString().replaceAll('([`"])', '\\\\\\\\\$1') }
|
||||
|def parInject = args
|
||||
| .findAll{key, value -> value != null}
|
||||
| .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}=\\\"\${escapeText(value)}\\\""}
|
||||
| .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}='\${escapeText(value)}'"}
|
||||
| .join("\\n")
|
||||
|\"\"\"
|
||||
|# meta exports
|
||||
@@ -3730,7 +3815,7 @@ meta["defaults"] = [
|
||||
"container" : {
|
||||
"registry" : "images.viash-hub.com",
|
||||
"image" : "vsh/biobox/bcl_convert",
|
||||
"tag" : "v0.1.0"
|
||||
"tag" : "0.2.0"
|
||||
},
|
||||
"tag" : "$id"
|
||||
}'''),
|
||||
@@ -2,8 +2,9 @@ manifest {
|
||||
name = 'bcl_convert'
|
||||
mainScript = 'main.nf'
|
||||
nextflowVersion = '!>=20.12.1-edge'
|
||||
version = 'v0.1.0'
|
||||
version = '0.2.0'
|
||||
description = 'Convert bcl files to fastq files using bcl-convert.\nInformation about upgrading from bcl2fastq via\n[Upgrading from bcl2fastq to BCL Convert](https://emea.support.illumina.com/bulletins/2020/10/upgrading-from-bcl2fastq-to-bcl-convert.html)\nand [BCL Convert Compatible Products](https://support.illumina.com/sequencing/sequencing_software/bcl-convert/compatibility.html)\n'
|
||||
author = 'Toni Verbeiren, Dorien Roosen'
|
||||
}
|
||||
|
||||
process.container = 'nextflow/bash:latest'
|
||||
@@ -1,5 +1,18 @@
|
||||
name: "falco"
|
||||
version: "v0.1.0"
|
||||
version: "0.2.0"
|
||||
authors:
|
||||
- name: "Toni Verbeiren"
|
||||
roles:
|
||||
- "author"
|
||||
- "maintainer"
|
||||
info:
|
||||
links:
|
||||
github: "tverbeiren"
|
||||
linkedin: "verbeiren"
|
||||
organizations:
|
||||
- name: "Data Intuitive"
|
||||
href: "https://www.data-intuitive.com"
|
||||
role: "Data Scientist and CEO"
|
||||
argument_groups:
|
||||
- name: "Input arguments"
|
||||
arguments:
|
||||
@@ -274,7 +287,7 @@ engines:
|
||||
id: "docker"
|
||||
image: "debian:trixie-slim"
|
||||
target_registry: "images.viash-hub.com"
|
||||
target_tag: "v0.1.0"
|
||||
target_tag: "0.2.0"
|
||||
namespace_separator: "/"
|
||||
setup:
|
||||
- type: "apt"
|
||||
@@ -303,22 +316,22 @@ build_info:
|
||||
engine: "docker|native"
|
||||
output: "target/nextflow/falco"
|
||||
executable: "target/nextflow/falco/main.nf"
|
||||
viash_version: "0.9.0-RC6"
|
||||
git_commit: "b84b29747d0635f2ac83ea63b496be9a9edb6724"
|
||||
viash_version: "0.9.0"
|
||||
git_commit: "5526b3e939030daea80595fa98387b469329bbfa"
|
||||
git_remote: "https://github.com/viash-hub/biobox"
|
||||
package_config:
|
||||
name: "biobox"
|
||||
version: "v0.1.0"
|
||||
version: "0.2.0"
|
||||
description: "A collection of bioinformatics tools for working with sequence data.\n"
|
||||
info: null
|
||||
viash_version: "0.9.0-RC6"
|
||||
viash_version: "0.9.0"
|
||||
source: "src"
|
||||
target: "target"
|
||||
config_mods:
|
||||
- ".requirements.commands := ['ps']\n"
|
||||
- ".engines += { type: \"native\" }"
|
||||
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
- ".engines[.type == 'docker'].target_tag := '0.2.0'"
|
||||
keywords:
|
||||
- "bioinformatics"
|
||||
- "modules"
|
||||
@@ -1,13 +1,16 @@
|
||||
// falco v0.1.0
|
||||
// falco 0.2.0
|
||||
//
|
||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||
// Data Intuitive.
|
||||
// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative
|
||||
// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data
|
||||
// Intuitive.
|
||||
//
|
||||
// The component may contain files which fall under a different license. The
|
||||
// authors of this component should specify the license in the header of such
|
||||
// files, or include a separate license file detailing the licenses of all included
|
||||
// files.
|
||||
//
|
||||
// Component authors:
|
||||
// * Toni Verbeiren (author, maintainer)
|
||||
|
||||
////////////////////////////
|
||||
// VDSL3 helper functions //
|
||||
@@ -760,8 +763,11 @@ def runEach(Map args) {
|
||||
def fromState_ = args.fromState
|
||||
def toState_ = args.toState
|
||||
def filter_ = args.filter
|
||||
def runIf_ = args.runIf
|
||||
def id_ = args.id
|
||||
|
||||
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||
|
||||
workflow runEachWf {
|
||||
take: input_ch
|
||||
main:
|
||||
@@ -783,7 +789,20 @@ def runEach(Map args) {
|
||||
[new_id] + tup.drop(1)
|
||||
}
|
||||
: filter_ch
|
||||
def data_ch = id_ch | map{tup ->
|
||||
def chPassthrough = null
|
||||
def chRun = null
|
||||
if (runIf_) {
|
||||
def idRunIfBranch = id_ch.branch{ tup ->
|
||||
run: runIf_(tup[0], tup[1], comp_)
|
||||
passthrough: true
|
||||
}
|
||||
chPassthrough = idRunIfBranch.passthrough
|
||||
chRun = idRunIfBranch.run
|
||||
} else {
|
||||
chRun = id_ch
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
def data_ch = chRun | map{tup ->
|
||||
def new_data = tup[1]
|
||||
if (fromState_ instanceof Map) {
|
||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||
@@ -821,8 +840,11 @@ def runEach(Map args) {
|
||||
[tup[0], new_state] + tup.drop(3)
|
||||
}
|
||||
: out_ch
|
||||
|
||||
def return_ch = post_ch
|
||||
| concat(chPassthrough)
|
||||
|
||||
post_ch
|
||||
return_ch
|
||||
}
|
||||
|
||||
// mix all results
|
||||
@@ -1598,8 +1620,8 @@ def findStates(Map params, Map config) {
|
||||
// construct renameMap
|
||||
if (args.rename_keys) {
|
||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||
def split = renameString.split(";")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
||||
def split = renameString.split(":")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||
split
|
||||
}
|
||||
|
||||
@@ -1709,7 +1731,9 @@ def publishStates(Map args) {
|
||||
|
||||
def yamlFilename = yamlTemplate_
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
|
||||
// TODO: do the pathnames in state_ match up with the outputFilenames_?
|
||||
|
||||
@@ -1780,7 +1804,9 @@ def publishStatesByConfig(Map args) {
|
||||
def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml'
|
||||
def yamlFilename = yamlTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent()
|
||||
|
||||
// the processed state is a list of [key, value, inputPath, outputFilename] tuples, where
|
||||
@@ -1822,7 +1848,9 @@ def publishStatesByConfig(Map args) {
|
||||
// instantiate the template
|
||||
def filename = filenameTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
if (par.multiple) {
|
||||
// if the parameter is multiple: true, the filename
|
||||
// should contain a wildcard '*' that is replaced with
|
||||
@@ -2626,30 +2654,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
tuple
|
||||
}
|
||||
|
||||
def chModifiedFiltered = workflowArgs.filter ?
|
||||
chModified | filter{workflowArgs.filter(it)} :
|
||||
chModified
|
||||
|
||||
def chRun = null
|
||||
def chPassthrough = null
|
||||
if (workflowArgs.runIf) {
|
||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
||||
def runIfBranch = chModified.branch{ tup ->
|
||||
run: workflowArgs.runIf(tup[0], tup[1])
|
||||
passthrough: true
|
||||
}
|
||||
chRun = runIfBranch.run
|
||||
chPassthrough = runIfBranch.passthrough
|
||||
} else {
|
||||
chRun = chModifiedFiltered
|
||||
chRun = chModified
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
|
||||
def chRunFiltered = workflowArgs.filter ?
|
||||
chRun | filter{workflowArgs.filter(it)} :
|
||||
chRun
|
||||
|
||||
def chArgs = workflowArgs.fromState ?
|
||||
chRun | map{
|
||||
chRunFiltered | map{
|
||||
def new_data = workflowArgs.fromState(it.take(2))
|
||||
[it[0], new_data]
|
||||
} :
|
||||
chRun | map {tup -> tup.take(2)}
|
||||
chRunFiltered | map {tup -> tup.take(2)}
|
||||
|
||||
// fill in defaults
|
||||
def chArgsWithDefaults = chArgs
|
||||
@@ -2720,7 +2749,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||
|
||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
||||
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||
// output tuple format: [join_id, id, new_state, ...]
|
||||
| map{ tup ->
|
||||
@@ -2779,7 +2808,29 @@ meta = [
|
||||
"resources_dir": moduleDir.toRealPath().normalize(),
|
||||
"config": processConfig(readJsonBlob('''{
|
||||
"name" : "falco",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "0.2.0",
|
||||
"authors" : [
|
||||
{
|
||||
"name" : "Toni Verbeiren",
|
||||
"roles" : [
|
||||
"author",
|
||||
"maintainer"
|
||||
],
|
||||
"info" : {
|
||||
"links" : {
|
||||
"github" : "tverbeiren",
|
||||
"linkedin" : "verbeiren"
|
||||
},
|
||||
"organizations" : [
|
||||
{
|
||||
"name" : "Data Intuitive",
|
||||
"href" : "https://www.data-intuitive.com",
|
||||
"role" : "Data Scientist and CEO"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"argument_groups" : [
|
||||
{
|
||||
"name" : "Input arguments",
|
||||
@@ -3080,7 +3131,7 @@ meta = [
|
||||
"id" : "docker",
|
||||
"image" : "debian:trixie-slim",
|
||||
"target_registry" : "images.viash-hub.com",
|
||||
"target_tag" : "v0.1.0",
|
||||
"target_tag" : "0.2.0",
|
||||
"namespace_separator" : "/",
|
||||
"setup" : [
|
||||
{
|
||||
@@ -3118,22 +3169,22 @@ meta = [
|
||||
"runner" : "nextflow",
|
||||
"engine" : "docker|native",
|
||||
"output" : "target/nextflow/falco",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"git_commit" : "b84b29747d0635f2ac83ea63b496be9a9edb6724",
|
||||
"viash_version" : "0.9.0",
|
||||
"git_commit" : "5526b3e939030daea80595fa98387b469329bbfa",
|
||||
"git_remote" : "https://github.com/viash-hub/biobox"
|
||||
},
|
||||
"package_config" : {
|
||||
"name" : "biobox",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "0.2.0",
|
||||
"description" : "A collection of bioinformatics tools for working with sequence data.\n",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"viash_version" : "0.9.0",
|
||||
"source" : "src",
|
||||
"target" : "target",
|
||||
"config_mods" : [
|
||||
".requirements.commands := ['ps']\n",
|
||||
".engines += { type: \\"native\\" }",
|
||||
".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'",
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
".engines[.type == 'docker'].target_tag := '0.2.0'"
|
||||
],
|
||||
"keywords" : [
|
||||
"bioinformatics",
|
||||
@@ -3298,7 +3349,11 @@ def vdsl3WorkflowFactory(Map args, Map meta, String rawScript) {
|
||||
val = val.join(par.multiple_sep)
|
||||
}
|
||||
if (par.direction == "output" && par.type == "file") {
|
||||
val = val.replaceAll('\\$id', id).replaceAll('\\$key', key)
|
||||
val = val
|
||||
.replaceAll('\\$id', id)
|
||||
.replaceAll('\\$\\{id\\}', id)
|
||||
.replaceAll('\\$key', key)
|
||||
.replaceAll('\\$\\{key\\}', key)
|
||||
}
|
||||
[parName, val]
|
||||
}
|
||||
@@ -3429,7 +3484,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def createParentStr = meta.config.allArguments
|
||||
.findAll { it.type == "file" && it.direction == "output" && it.create_parent }
|
||||
.collect { par ->
|
||||
"\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent \\\"\" + (args[\"${par.plainName}\"] instanceof String ? args[\"${par.plainName}\"] : args[\"${par.plainName}\"].join('\" \"')) + \"\\\"\" : \"\" }"
|
||||
def contents = "args[\"${par.plainName}\"] instanceof List ? args[\"${par.plainName}\"].join('\" \"') : args[\"${par.plainName}\"]"
|
||||
"\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent '\" + escapeText(${contents}) + \"'\" : \"\" }"
|
||||
}
|
||||
.join("\n")
|
||||
|
||||
@@ -3437,8 +3493,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def inputFileExports = meta.config.allArguments
|
||||
.findAll { it.type == "file" && it.direction.toLowerCase() == "input" }
|
||||
.collect { par ->
|
||||
def viash_par_contents = "(viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName})"
|
||||
"\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}=\\\"\" + ${viash_par_contents} + \"\\\"\"}"
|
||||
def contents = "viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName}"
|
||||
"\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}='\" + escapeText(${contents}) + \"'\"}"
|
||||
}
|
||||
|
||||
// NOTE: if using docker, use /tmp instead of tmpDir!
|
||||
@@ -3475,6 +3531,7 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def procStr =
|
||||
"""nextflow.enable.dsl=2
|
||||
|
|
||||
|def escapeText = { s -> s.toString().replaceAll("'", "'\\\"'\\\"'") }
|
||||
|process $procKey {$drctvStrs
|
||||
|input:
|
||||
| tuple val(id)$inputPaths, val(args), path(resourcesDir, stageAs: ".viash_meta_resources")
|
||||
@@ -3486,10 +3543,9 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
|$stub
|
||||
|\"\"\"
|
||||
|script:$assertStr
|
||||
|def escapeText = { s -> s.toString().replaceAll('([`"])', '\\\\\\\\\$1') }
|
||||
|def parInject = args
|
||||
| .findAll{key, value -> value != null}
|
||||
| .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}=\\\"\${escapeText(value)}\\\""}
|
||||
| .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}='\${escapeText(value)}'"}
|
||||
| .join("\\n")
|
||||
|\"\"\"
|
||||
|# meta exports
|
||||
@@ -3574,7 +3630,7 @@ meta["defaults"] = [
|
||||
"container" : {
|
||||
"registry" : "images.viash-hub.com",
|
||||
"image" : "vsh/biobox/falco",
|
||||
"tag" : "v0.1.0"
|
||||
"tag" : "0.2.0"
|
||||
},
|
||||
"tag" : "$id"
|
||||
}'''),
|
||||
@@ -2,8 +2,9 @@ manifest {
|
||||
name = 'falco'
|
||||
mainScript = 'main.nf'
|
||||
nextflowVersion = '!>=20.12.1-edge'
|
||||
version = 'v0.1.0'
|
||||
version = '0.2.0'
|
||||
description = 'A C++ drop-in replacement of FastQC to assess the quality of sequence read data'
|
||||
author = 'Toni Verbeiren'
|
||||
}
|
||||
|
||||
process.container = 'nextflow/bash:latest'
|
||||
@@ -17,8 +17,8 @@
|
||||
"input": {
|
||||
"type":
|
||||
"string",
|
||||
"description": "Type: List of `file`, required, example: `input1.fastq;input2.fastq`, multiple_sep: `\":\"`. input fastq files",
|
||||
"help_text": "Type: List of `file`, required, example: `input1.fastq;input2.fastq`, multiple_sep: `\":\"`. input fastq files"
|
||||
"description": "Type: List of `file`, required, example: `input1.fastq;input2.fastq`, multiple_sep: `\";\"`. input fastq files",
|
||||
"help_text": "Type: List of `file`, required, example: `input1.fastq;input2.fastq`, multiple_sep: `\";\"`. input fastq files"
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
name: "multiqc"
|
||||
version: "v0.1.0"
|
||||
version: "0.2.0"
|
||||
authors:
|
||||
- name: "Dorien Roosen"
|
||||
roles:
|
||||
- "author"
|
||||
- "maintainer"
|
||||
info:
|
||||
links:
|
||||
email: "dorien@data-intuitive.com"
|
||||
github: "dorien-er"
|
||||
linkedin: "dorien-roosen"
|
||||
organizations:
|
||||
- name: "Data Intuitive"
|
||||
href: "https://www.data-intuitive.com"
|
||||
role: "Data Scientist"
|
||||
argument_groups:
|
||||
- name: "Input"
|
||||
arguments:
|
||||
@@ -63,39 +77,43 @@ argument_groups:
|
||||
description: "Use only these module"
|
||||
info: null
|
||||
example:
|
||||
- "fastqc,cutadapt"
|
||||
- "fastqc"
|
||||
- "cutadapt"
|
||||
required: false
|
||||
direction: "input"
|
||||
multiple: true
|
||||
multiple_sep: ","
|
||||
multiple_sep: ";"
|
||||
- type: "string"
|
||||
name: "--exclude_modules"
|
||||
description: "Do not use only these modules"
|
||||
info: null
|
||||
example:
|
||||
- "fastqc,cutadapt"
|
||||
- "fastqc"
|
||||
- "cutadapt"
|
||||
required: false
|
||||
direction: "input"
|
||||
multiple: true
|
||||
multiple_sep: ","
|
||||
multiple_sep: ";"
|
||||
- type: "string"
|
||||
name: "--ignore_analysis"
|
||||
info: null
|
||||
example:
|
||||
- "run_one/*,run_two/*"
|
||||
- "run_one/*"
|
||||
- "run_two/*"
|
||||
required: false
|
||||
direction: "input"
|
||||
multiple: true
|
||||
multiple_sep: ","
|
||||
multiple_sep: ";"
|
||||
- type: "string"
|
||||
name: "--ignore_samples"
|
||||
info: null
|
||||
example:
|
||||
- "sample_1*,sample_3*"
|
||||
- "sample_1*"
|
||||
- "sample_3*"
|
||||
required: false
|
||||
direction: "input"
|
||||
multiple: true
|
||||
multiple_sep: ","
|
||||
multiple_sep: ";"
|
||||
- type: "boolean_true"
|
||||
name: "--ignore_symlinks"
|
||||
description: "Ignore symlinked directories and files"
|
||||
@@ -415,7 +433,7 @@ engines:
|
||||
id: "docker"
|
||||
image: "quay.io/biocontainers/multiqc:1.21--pyhdfd78af_0"
|
||||
target_registry: "images.viash-hub.com"
|
||||
target_tag: "v0.1.0"
|
||||
target_tag: "0.2.0"
|
||||
namespace_separator: "/"
|
||||
setup:
|
||||
- type: "docker"
|
||||
@@ -437,22 +455,22 @@ build_info:
|
||||
engine: "docker|native"
|
||||
output: "target/nextflow/multiqc"
|
||||
executable: "target/nextflow/multiqc/main.nf"
|
||||
viash_version: "0.9.0-RC6"
|
||||
git_commit: "b84b29747d0635f2ac83ea63b496be9a9edb6724"
|
||||
viash_version: "0.9.0"
|
||||
git_commit: "5526b3e939030daea80595fa98387b469329bbfa"
|
||||
git_remote: "https://github.com/viash-hub/biobox"
|
||||
package_config:
|
||||
name: "biobox"
|
||||
version: "v0.1.0"
|
||||
version: "0.2.0"
|
||||
description: "A collection of bioinformatics tools for working with sequence data.\n"
|
||||
info: null
|
||||
viash_version: "0.9.0-RC6"
|
||||
viash_version: "0.9.0"
|
||||
source: "src"
|
||||
target: "target"
|
||||
config_mods:
|
||||
- ".requirements.commands := ['ps']\n"
|
||||
- ".engines += { type: \"native\" }"
|
||||
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
- ".engines[.type == 'docker'].target_tag := '0.2.0'"
|
||||
keywords:
|
||||
- "bioinformatics"
|
||||
- "modules"
|
||||
@@ -1,13 +1,16 @@
|
||||
// multiqc v0.1.0
|
||||
// multiqc 0.2.0
|
||||
//
|
||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||
// Data Intuitive.
|
||||
// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative
|
||||
// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data
|
||||
// Intuitive.
|
||||
//
|
||||
// The component may contain files which fall under a different license. The
|
||||
// authors of this component should specify the license in the header of such
|
||||
// files, or include a separate license file detailing the licenses of all included
|
||||
// files.
|
||||
//
|
||||
// Component authors:
|
||||
// * Dorien Roosen (author, maintainer)
|
||||
|
||||
////////////////////////////
|
||||
// VDSL3 helper functions //
|
||||
@@ -760,8 +763,11 @@ def runEach(Map args) {
|
||||
def fromState_ = args.fromState
|
||||
def toState_ = args.toState
|
||||
def filter_ = args.filter
|
||||
def runIf_ = args.runIf
|
||||
def id_ = args.id
|
||||
|
||||
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||
|
||||
workflow runEachWf {
|
||||
take: input_ch
|
||||
main:
|
||||
@@ -783,7 +789,20 @@ def runEach(Map args) {
|
||||
[new_id] + tup.drop(1)
|
||||
}
|
||||
: filter_ch
|
||||
def data_ch = id_ch | map{tup ->
|
||||
def chPassthrough = null
|
||||
def chRun = null
|
||||
if (runIf_) {
|
||||
def idRunIfBranch = id_ch.branch{ tup ->
|
||||
run: runIf_(tup[0], tup[1], comp_)
|
||||
passthrough: true
|
||||
}
|
||||
chPassthrough = idRunIfBranch.passthrough
|
||||
chRun = idRunIfBranch.run
|
||||
} else {
|
||||
chRun = id_ch
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
def data_ch = chRun | map{tup ->
|
||||
def new_data = tup[1]
|
||||
if (fromState_ instanceof Map) {
|
||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||
@@ -821,8 +840,11 @@ def runEach(Map args) {
|
||||
[tup[0], new_state] + tup.drop(3)
|
||||
}
|
||||
: out_ch
|
||||
|
||||
def return_ch = post_ch
|
||||
| concat(chPassthrough)
|
||||
|
||||
post_ch
|
||||
return_ch
|
||||
}
|
||||
|
||||
// mix all results
|
||||
@@ -1598,8 +1620,8 @@ def findStates(Map params, Map config) {
|
||||
// construct renameMap
|
||||
if (args.rename_keys) {
|
||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||
def split = renameString.split(";")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
||||
def split = renameString.split(":")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||
split
|
||||
}
|
||||
|
||||
@@ -1709,7 +1731,9 @@ def publishStates(Map args) {
|
||||
|
||||
def yamlFilename = yamlTemplate_
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
|
||||
// TODO: do the pathnames in state_ match up with the outputFilenames_?
|
||||
|
||||
@@ -1780,7 +1804,9 @@ def publishStatesByConfig(Map args) {
|
||||
def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml'
|
||||
def yamlFilename = yamlTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent()
|
||||
|
||||
// the processed state is a list of [key, value, inputPath, outputFilename] tuples, where
|
||||
@@ -1822,7 +1848,9 @@ def publishStatesByConfig(Map args) {
|
||||
// instantiate the template
|
||||
def filename = filenameTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
if (par.multiple) {
|
||||
// if the parameter is multiple: true, the filename
|
||||
// should contain a wildcard '*' that is replaced with
|
||||
@@ -2626,30 +2654,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
tuple
|
||||
}
|
||||
|
||||
def chModifiedFiltered = workflowArgs.filter ?
|
||||
chModified | filter{workflowArgs.filter(it)} :
|
||||
chModified
|
||||
|
||||
def chRun = null
|
||||
def chPassthrough = null
|
||||
if (workflowArgs.runIf) {
|
||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
||||
def runIfBranch = chModified.branch{ tup ->
|
||||
run: workflowArgs.runIf(tup[0], tup[1])
|
||||
passthrough: true
|
||||
}
|
||||
chRun = runIfBranch.run
|
||||
chPassthrough = runIfBranch.passthrough
|
||||
} else {
|
||||
chRun = chModifiedFiltered
|
||||
chRun = chModified
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
|
||||
def chRunFiltered = workflowArgs.filter ?
|
||||
chRun | filter{workflowArgs.filter(it)} :
|
||||
chRun
|
||||
|
||||
def chArgs = workflowArgs.fromState ?
|
||||
chRun | map{
|
||||
chRunFiltered | map{
|
||||
def new_data = workflowArgs.fromState(it.take(2))
|
||||
[it[0], new_data]
|
||||
} :
|
||||
chRun | map {tup -> tup.take(2)}
|
||||
chRunFiltered | map {tup -> tup.take(2)}
|
||||
|
||||
// fill in defaults
|
||||
def chArgsWithDefaults = chArgs
|
||||
@@ -2720,7 +2749,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||
|
||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
||||
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||
// output tuple format: [join_id, id, new_state, ...]
|
||||
| map{ tup ->
|
||||
@@ -2779,7 +2808,30 @@ meta = [
|
||||
"resources_dir": moduleDir.toRealPath().normalize(),
|
||||
"config": processConfig(readJsonBlob('''{
|
||||
"name" : "multiqc",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "0.2.0",
|
||||
"authors" : [
|
||||
{
|
||||
"name" : "Dorien Roosen",
|
||||
"roles" : [
|
||||
"author",
|
||||
"maintainer"
|
||||
],
|
||||
"info" : {
|
||||
"links" : {
|
||||
"email" : "dorien@data-intuitive.com",
|
||||
"github" : "dorien-er",
|
||||
"linkedin" : "dorien-roosen"
|
||||
},
|
||||
"organizations" : [
|
||||
{
|
||||
"name" : "Data Intuitive",
|
||||
"href" : "https://www.data-intuitive.com",
|
||||
"role" : "Data Scientist"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"argument_groups" : [
|
||||
{
|
||||
"name" : "Input",
|
||||
@@ -2855,46 +2907,50 @@ meta = [
|
||||
"name" : "--include_modules",
|
||||
"description" : "Use only these module",
|
||||
"example" : [
|
||||
"fastqc,cutadapt"
|
||||
"fastqc",
|
||||
"cutadapt"
|
||||
],
|
||||
"required" : false,
|
||||
"direction" : "input",
|
||||
"multiple" : true,
|
||||
"multiple_sep" : ","
|
||||
"multiple_sep" : ";"
|
||||
},
|
||||
{
|
||||
"type" : "string",
|
||||
"name" : "--exclude_modules",
|
||||
"description" : "Do not use only these modules",
|
||||
"example" : [
|
||||
"fastqc,cutadapt"
|
||||
"fastqc",
|
||||
"cutadapt"
|
||||
],
|
||||
"required" : false,
|
||||
"direction" : "input",
|
||||
"multiple" : true,
|
||||
"multiple_sep" : ","
|
||||
"multiple_sep" : ";"
|
||||
},
|
||||
{
|
||||
"type" : "string",
|
||||
"name" : "--ignore_analysis",
|
||||
"example" : [
|
||||
"run_one/*,run_two/*"
|
||||
"run_one/*",
|
||||
"run_two/*"
|
||||
],
|
||||
"required" : false,
|
||||
"direction" : "input",
|
||||
"multiple" : true,
|
||||
"multiple_sep" : ","
|
||||
"multiple_sep" : ";"
|
||||
},
|
||||
{
|
||||
"type" : "string",
|
||||
"name" : "--ignore_samples",
|
||||
"example" : [
|
||||
"sample_1*,sample_3*"
|
||||
"sample_1*",
|
||||
"sample_3*"
|
||||
],
|
||||
"required" : false,
|
||||
"direction" : "input",
|
||||
"multiple" : true,
|
||||
"multiple_sep" : ","
|
||||
"multiple_sep" : ";"
|
||||
},
|
||||
{
|
||||
"type" : "boolean_true",
|
||||
@@ -3279,7 +3335,7 @@ meta = [
|
||||
"id" : "docker",
|
||||
"image" : "quay.io/biocontainers/multiqc:1.21--pyhdfd78af_0",
|
||||
"target_registry" : "images.viash-hub.com",
|
||||
"target_tag" : "v0.1.0",
|
||||
"target_tag" : "0.2.0",
|
||||
"namespace_separator" : "/",
|
||||
"setup" : [
|
||||
{
|
||||
@@ -3309,22 +3365,22 @@ meta = [
|
||||
"runner" : "nextflow",
|
||||
"engine" : "docker|native",
|
||||
"output" : "target/nextflow/multiqc",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"git_commit" : "b84b29747d0635f2ac83ea63b496be9a9edb6724",
|
||||
"viash_version" : "0.9.0",
|
||||
"git_commit" : "5526b3e939030daea80595fa98387b469329bbfa",
|
||||
"git_remote" : "https://github.com/viash-hub/biobox"
|
||||
},
|
||||
"package_config" : {
|
||||
"name" : "biobox",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "0.2.0",
|
||||
"description" : "A collection of bioinformatics tools for working with sequence data.\n",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"viash_version" : "0.9.0",
|
||||
"source" : "src",
|
||||
"target" : "target",
|
||||
"config_mods" : [
|
||||
".requirements.commands := ['ps']\n",
|
||||
".engines += { type: \\"native\\" }",
|
||||
".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'",
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
".engines[.type == 'docker'].target_tag := '0.2.0'"
|
||||
],
|
||||
"keywords" : [
|
||||
"bioinformatics",
|
||||
@@ -3411,26 +3467,32 @@ $( if [ ! -z ${VIASH_META_MEMORY_PIB+x} ]; then echo "${VIASH_META_MEMORY_PIB}"
|
||||
#!/bin/bash
|
||||
|
||||
# disable flags
|
||||
[[ "\\$par_ignore_symlinks" == "false" ]] && unset par_ignore_symlinks
|
||||
[[ "\\$par_dirs" == "false" ]] && unset par_dirs
|
||||
[[ "\\$par_full_names" == "false" ]] && unset par_full_names
|
||||
[[ "\\$par_fn_as_s_name" == "false" ]] && unset par_fn_as_s_name
|
||||
[[ "\\$par_profile_runtime" == "false" ]] && unset par_profile_runtime
|
||||
[[ "\\$par_verbose" == "false" ]] && unset par_verbose
|
||||
[[ "\\$par_quiet" == "false" ]] && unset par_quiet
|
||||
[[ "\\$par_strict" == "false" ]] && unset par_strict
|
||||
[[ "\\$par_development" == "false" ]] && unset par_development
|
||||
[[ "\\$par_require_logs" == "false" ]] && unset par_require_logs
|
||||
[[ "\\$par_no_megaqc_upload" == "false" ]] && unset par_no_megaqc_upload
|
||||
[[ "\\$par_no_ansi" == "false" ]] && unset par_no_ansi
|
||||
[[ "\\$par_flat" == "false" ]] && unset par_flat
|
||||
[[ "\\$par_interactive" == "false" ]] && unset par_interactive
|
||||
[[ "\\$par_static_plot_export" == "false" ]] && unset par_static_plot_export
|
||||
[[ "\\$par_data_dir" == "false" ]] && unset par_data_dir
|
||||
[[ "\\$par_no_data_dir" == "false" ]] && unset par_no_data_dir
|
||||
[[ "\\$par_zip_data_dir" == "false" ]] && unset par_zip_data_dir
|
||||
[[ "\\$par_pdf" == "false" ]] && unset par_pdf
|
||||
unset_if_false=(
|
||||
par_ignore_symlinks
|
||||
par_dirs
|
||||
par_full_names
|
||||
par_fn_as_s_name
|
||||
par_profile_runtime
|
||||
par_verbose
|
||||
par_quiet
|
||||
par_strict
|
||||
par_development
|
||||
par_require_logs
|
||||
par_no_megaqc_upload
|
||||
par_no_ansi
|
||||
par_flat
|
||||
par_interactive
|
||||
par_static_plot_export
|
||||
par_data_dir
|
||||
par_no_data_dir
|
||||
par_zip_data_dir
|
||||
par_pdf
|
||||
)
|
||||
|
||||
for par in \\${unset_if_false[@]}; do
|
||||
test_val="\\${!par}"
|
||||
[[ "\\$test_val" == "false" ]] && unset \\$par
|
||||
done
|
||||
|
||||
# handle inputs
|
||||
out_dir=\\$(dirname "\\$par_output_report")
|
||||
@@ -3448,7 +3510,7 @@ IFS=";" read -ra inputs <<< \\$par_input
|
||||
|
||||
if [[ -n "\\$par_include_modules" ]]; then
|
||||
include_modules=""
|
||||
IFS="," read -ra incl_modules <<< \\$par_include_modules
|
||||
IFS=";" read -ra incl_modules <<< \\$par_include_modules
|
||||
for i in "\\${incl_modules[@]}"; do
|
||||
include_modules+="--include \\$i "
|
||||
done
|
||||
@@ -3457,7 +3519,7 @@ fi
|
||||
|
||||
if [[ -n "\\$par_exclude_modules" ]]; then
|
||||
exclude_modules=""
|
||||
IFS="," read -ra excl_modules <<< \\$par_exclude_modules
|
||||
IFS=";" read -ra excl_modules <<< \\$par_exclude_modules
|
||||
for i in "\\${excl_modules[@]}"; do
|
||||
exclude_modules+="--exclude \\$i"
|
||||
done
|
||||
@@ -3466,7 +3528,7 @@ fi
|
||||
|
||||
if [[ -n "\\$par_ignore_analysis" ]]; then
|
||||
ignore=""
|
||||
IFS="," read -ra ignore_analysis <<< \\$par_ignore_analysis
|
||||
IFS=";" read -ra ignore_analysis <<< \\$par_ignore_analysis
|
||||
for i in "\\${ignore_analysis[@]}"; do
|
||||
ignore+="--ignore \\$i "
|
||||
done
|
||||
@@ -3475,7 +3537,7 @@ fi
|
||||
|
||||
if [[ -n "\\$par_ignore_samples" ]]; then
|
||||
ignore_samples=""
|
||||
IFS="," read -ra ign_samples <<< \\$par_ignore_samples
|
||||
IFS=";" read -ra ign_samples <<< \\$par_ignore_samples
|
||||
for i in "\\${ign_samples[@]}"; do
|
||||
ignore_samples+="--ignore-samples \\$i"
|
||||
done
|
||||
@@ -3618,7 +3680,11 @@ def vdsl3WorkflowFactory(Map args, Map meta, String rawScript) {
|
||||
val = val.join(par.multiple_sep)
|
||||
}
|
||||
if (par.direction == "output" && par.type == "file") {
|
||||
val = val.replaceAll('\\$id', id).replaceAll('\\$key', key)
|
||||
val = val
|
||||
.replaceAll('\\$id', id)
|
||||
.replaceAll('\\$\\{id\\}', id)
|
||||
.replaceAll('\\$key', key)
|
||||
.replaceAll('\\$\\{key\\}', key)
|
||||
}
|
||||
[parName, val]
|
||||
}
|
||||
@@ -3749,7 +3815,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def createParentStr = meta.config.allArguments
|
||||
.findAll { it.type == "file" && it.direction == "output" && it.create_parent }
|
||||
.collect { par ->
|
||||
"\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent \\\"\" + (args[\"${par.plainName}\"] instanceof String ? args[\"${par.plainName}\"] : args[\"${par.plainName}\"].join('\" \"')) + \"\\\"\" : \"\" }"
|
||||
def contents = "args[\"${par.plainName}\"] instanceof List ? args[\"${par.plainName}\"].join('\" \"') : args[\"${par.plainName}\"]"
|
||||
"\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent '\" + escapeText(${contents}) + \"'\" : \"\" }"
|
||||
}
|
||||
.join("\n")
|
||||
|
||||
@@ -3757,8 +3824,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def inputFileExports = meta.config.allArguments
|
||||
.findAll { it.type == "file" && it.direction.toLowerCase() == "input" }
|
||||
.collect { par ->
|
||||
def viash_par_contents = "(viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName})"
|
||||
"\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}=\\\"\" + ${viash_par_contents} + \"\\\"\"}"
|
||||
def contents = "viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName}"
|
||||
"\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}='\" + escapeText(${contents}) + \"'\"}"
|
||||
}
|
||||
|
||||
// NOTE: if using docker, use /tmp instead of tmpDir!
|
||||
@@ -3795,6 +3862,7 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def procStr =
|
||||
"""nextflow.enable.dsl=2
|
||||
|
|
||||
|def escapeText = { s -> s.toString().replaceAll("'", "'\\\"'\\\"'") }
|
||||
|process $procKey {$drctvStrs
|
||||
|input:
|
||||
| tuple val(id)$inputPaths, val(args), path(resourcesDir, stageAs: ".viash_meta_resources")
|
||||
@@ -3806,10 +3874,9 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
|$stub
|
||||
|\"\"\"
|
||||
|script:$assertStr
|
||||
|def escapeText = { s -> s.toString().replaceAll('([`"])', '\\\\\\\\\$1') }
|
||||
|def parInject = args
|
||||
| .findAll{key, value -> value != null}
|
||||
| .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}=\\\"\${escapeText(value)}\\\""}
|
||||
| .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}='\${escapeText(value)}'"}
|
||||
| .join("\\n")
|
||||
|\"\"\"
|
||||
|# meta exports
|
||||
@@ -3894,7 +3961,7 @@ meta["defaults"] = [
|
||||
"container" : {
|
||||
"registry" : "images.viash-hub.com",
|
||||
"image" : "vsh/biobox/multiqc",
|
||||
"tag" : "v0.1.0"
|
||||
"tag" : "0.2.0"
|
||||
},
|
||||
"tag" : "$id"
|
||||
}'''),
|
||||
@@ -2,8 +2,9 @@ manifest {
|
||||
name = 'multiqc'
|
||||
mainScript = 'main.nf'
|
||||
nextflowVersion = '!>=20.12.1-edge'
|
||||
version = 'v0.1.0'
|
||||
version = '0.2.0'
|
||||
description = 'MultiQC aggregates results from bioinformatics analyses across many samples into a single report.\nIt searches a given directory for analysis logs and compiles a HTML report. It\'s a general use tool, perfect for summarising the output from numerous bioinformatics tools.\n'
|
||||
author = 'Dorien Roosen'
|
||||
}
|
||||
|
||||
process.container = 'nextflow/bash:latest'
|
||||
@@ -17,8 +17,8 @@
|
||||
"input": {
|
||||
"type":
|
||||
"string",
|
||||
"description": "Type: List of `file`, required, example: `data/results/`, multiple_sep: `\":\"`. File paths to be searched for analysis results to be included in the report",
|
||||
"help_text": "Type: List of `file`, required, example: `data/results/`, multiple_sep: `\":\"`. File paths to be searched for analysis results to be included in the report.\n"
|
||||
"description": "Type: List of `file`, required, example: `data/results`, multiple_sep: `\";\"`. File paths to be searched for analysis results to be included in the report",
|
||||
"help_text": "Type: List of `file`, required, example: `data/results`, multiple_sep: `\";\"`. File paths to be searched for analysis results to be included in the report.\n"
|
||||
|
||||
}
|
||||
|
||||
@@ -80,8 +80,8 @@
|
||||
"include_modules": {
|
||||
"type":
|
||||
"string",
|
||||
"description": "Type: List of `string`, example: `fastqc,cutadapt`, multiple_sep: `\",\"`. Use only these module",
|
||||
"help_text": "Type: List of `string`, example: `fastqc,cutadapt`, multiple_sep: `\",\"`. Use only these module"
|
||||
"description": "Type: List of `string`, example: `fastqc;cutadapt`, multiple_sep: `\";\"`. Use only these module",
|
||||
"help_text": "Type: List of `string`, example: `fastqc;cutadapt`, multiple_sep: `\";\"`. Use only these module"
|
||||
|
||||
}
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
"exclude_modules": {
|
||||
"type":
|
||||
"string",
|
||||
"description": "Type: List of `string`, example: `fastqc,cutadapt`, multiple_sep: `\",\"`. Do not use only these modules",
|
||||
"help_text": "Type: List of `string`, example: `fastqc,cutadapt`, multiple_sep: `\",\"`. Do not use only these modules"
|
||||
"description": "Type: List of `string`, example: `fastqc;cutadapt`, multiple_sep: `\";\"`. Do not use only these modules",
|
||||
"help_text": "Type: List of `string`, example: `fastqc;cutadapt`, multiple_sep: `\";\"`. Do not use only these modules"
|
||||
|
||||
}
|
||||
|
||||
@@ -100,8 +100,8 @@
|
||||
"ignore_analysis": {
|
||||
"type":
|
||||
"string",
|
||||
"description": "Type: List of `string`, example: `run_one/*,run_two/*`, multiple_sep: `\",\"`. ",
|
||||
"help_text": "Type: List of `string`, example: `run_one/*,run_two/*`, multiple_sep: `\",\"`. "
|
||||
"description": "Type: List of `string`, example: `run_one/*;run_two/*`, multiple_sep: `\";\"`. ",
|
||||
"help_text": "Type: List of `string`, example: `run_one/*;run_two/*`, multiple_sep: `\";\"`. "
|
||||
|
||||
}
|
||||
|
||||
@@ -110,8 +110,8 @@
|
||||
"ignore_samples": {
|
||||
"type":
|
||||
"string",
|
||||
"description": "Type: List of `string`, example: `sample_1*,sample_3*`, multiple_sep: `\",\"`. ",
|
||||
"help_text": "Type: List of `string`, example: `sample_1*,sample_3*`, multiple_sep: `\",\"`. "
|
||||
"description": "Type: List of `string`, example: `sample_1*;sample_3*`, multiple_sep: `\";\"`. ",
|
||||
"help_text": "Type: List of `string`, example: `sample_1*;sample_3*`, multiple_sep: `\";\"`. "
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: "interop_summary_to_csv"
|
||||
namespace: "io"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
argument_groups:
|
||||
- name: "Input arguments"
|
||||
arguments:
|
||||
@@ -116,7 +116,7 @@ engines:
|
||||
id: "docker"
|
||||
image: "debian:stable-slim"
|
||||
target_registry: "images.viash-hub.com"
|
||||
target_tag: "v0.1.0"
|
||||
target_tag: "v0.1.1"
|
||||
namespace_separator: "/"
|
||||
setup:
|
||||
- type: "apt"
|
||||
@@ -140,25 +140,25 @@ build_info:
|
||||
engine: "docker|native"
|
||||
output: "target/executable/io/interop_summary_to_csv"
|
||||
executable: "target/executable/io/interop_summary_to_csv/interop_summary_to_csv"
|
||||
viash_version: "0.9.0-RC6"
|
||||
git_commit: "3d229bef584233f228330ff881dad685b92bf1e1"
|
||||
viash_version: "0.9.0"
|
||||
git_commit: "5ad947dd1e6d6783ac7905d665036733a420731f"
|
||||
git_remote: "https://github.com/viash-hub/demultiplex"
|
||||
package_config:
|
||||
name: "demultiplex"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
description: "Demultiplexing pipeline\n"
|
||||
info:
|
||||
test_resources:
|
||||
- path: "https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NovaSeq6000/200624_A00834_0183_BHMTFYDRXX.tar.gz"
|
||||
dest: "test_resources"
|
||||
viash_version: "0.9.0-RC6"
|
||||
viash_version: "0.9.0"
|
||||
source: "src"
|
||||
target: "target"
|
||||
config_mods:
|
||||
- ".requirements.commands := ['ps']\n"
|
||||
- ".engines += { type: \"native\" }"
|
||||
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
keywords:
|
||||
- "bioinformatics"
|
||||
- "sequence"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# interop_summary_to_csv v0.1.0
|
||||
# interop_summary_to_csv v0.1.1
|
||||
#
|
||||
# This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
||||
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||
# Data Intuitive.
|
||||
# This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative
|
||||
# work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data
|
||||
# Intuitive.
|
||||
#
|
||||
# The component may contain files which fall under a different license. The
|
||||
# authors of this component should specify the license in the header of such
|
||||
@@ -54,24 +54,24 @@ function ViashRemoveFlags {
|
||||
# $1 : Should always be set to ${BASH_SOURCE[0]}
|
||||
# returns : The absolute path of the bash file
|
||||
function ViashSourceDir {
|
||||
SOURCE="$1"
|
||||
while [ -h "$SOURCE" ]; do
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||
local source="$1"
|
||||
while [ -h "$source" ]; do
|
||||
local dir="$( cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
[[ $source != /* ]] && source="$dir/$source"
|
||||
done
|
||||
cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd
|
||||
cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd
|
||||
}
|
||||
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
|
||||
# usage : ViashFindTargetDir 'ScriptPath'
|
||||
# $1 : The location from where to start the upward search
|
||||
# returns : The absolute path of the '.build.yaml' file
|
||||
function ViashFindTargetDir {
|
||||
SOURCE="$1"
|
||||
while [[ "$SOURCE" != "" && ! -e "$SOURCE/.build.yaml" ]]; do
|
||||
SOURCE=${SOURCE%/*}
|
||||
local source="$1"
|
||||
while [[ "$source" != "" && ! -e "$source/.build.yaml" ]]; do
|
||||
source=${source%/*}
|
||||
done
|
||||
echo $SOURCE
|
||||
echo $source
|
||||
}
|
||||
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
|
||||
VIASH_LOGCODE_EMERGENCY=0
|
||||
@@ -171,7 +171,7 @@ VIASH_META_TEMP_DIR="$VIASH_TEMP"
|
||||
|
||||
# ViashHelp: Display helpful explanation about this executable
|
||||
function ViashHelp {
|
||||
echo "interop_summary_to_csv v0.1.0"
|
||||
echo "interop_summary_to_csv v0.1.1"
|
||||
echo ""
|
||||
echo "Input arguments:"
|
||||
echo " --input"
|
||||
@@ -205,9 +205,9 @@ function ViashDockerInstallationCheck {
|
||||
fi
|
||||
|
||||
ViashDebug "Checking whether the Docker daemon is running"
|
||||
save=$-; set +e
|
||||
docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
|
||||
out=$?
|
||||
local save=$-; set +e
|
||||
local docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
|
||||
local out=$?
|
||||
[[ $save =~ e ]] && set -e
|
||||
if [ $out -ne 0 ]; then
|
||||
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
|
||||
@@ -259,9 +259,9 @@ function ViashDockerPull {
|
||||
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
||||
docker pull $1 && return 0 || return 1
|
||||
else
|
||||
save=$-; set +e
|
||||
local save=$-; set +e
|
||||
docker pull $1 2> /dev/null > /dev/null
|
||||
out=$?
|
||||
local out=$?
|
||||
[[ $save =~ e ]] && set -e
|
||||
if [ $out -ne 0 ]; then
|
||||
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
|
||||
@@ -281,7 +281,8 @@ function ViashDockerPull {
|
||||
# echo $? # returns '1'
|
||||
function ViashDockerPush {
|
||||
ViashNotice "Pushing image to '$1'"
|
||||
save=$-; set +e
|
||||
local save=$-; set +e
|
||||
local out
|
||||
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
||||
docker push $1
|
||||
out=$?
|
||||
@@ -305,9 +306,9 @@ function ViashDockerPush {
|
||||
# examples:
|
||||
# ViashDockerPullElseBuild mynewcomponent
|
||||
function ViashDockerPullElseBuild {
|
||||
save=$-; set +e
|
||||
local save=$-; set +e
|
||||
ViashDockerPull $1
|
||||
out=$?
|
||||
local out=$?
|
||||
[[ $save =~ e ]] && set -e
|
||||
if [ $out -ne 0 ]; then
|
||||
ViashDockerBuild $@
|
||||
@@ -469,10 +470,10 @@ 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="2024-06-24T12:57:03Z"
|
||||
LABEL org.opencontainers.image.created="2024-09-13T10:00:09Z"
|
||||
LABEL org.opencontainers.image.source="https://github.com/viash-hub/demultiplex"
|
||||
LABEL org.opencontainers.image.revision="3d229bef584233f228330ff881dad685b92bf1e1"
|
||||
LABEL org.opencontainers.image.version="v0.1.0"
|
||||
LABEL org.opencontainers.image.revision="5ad947dd1e6d6783ac7905d665036733a420731f"
|
||||
LABEL org.opencontainers.image.version="v0.1.1"
|
||||
|
||||
VIASHDOCKER
|
||||
fi
|
||||
@@ -498,6 +499,9 @@ function ViashDockerBuildArgs {
|
||||
# ViashAbsolutePath /foo/bar/.. # returns /foo
|
||||
function ViashAbsolutePath {
|
||||
local thePath
|
||||
local parr
|
||||
local outp
|
||||
local len
|
||||
if [[ ! "$1" =~ ^/ ]]; then
|
||||
thePath="$PWD/$1"
|
||||
else
|
||||
@@ -528,14 +532,17 @@ function ViashAbsolutePath {
|
||||
)
|
||||
}
|
||||
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
|
||||
# $1 : The parameter value
|
||||
# returns : New parameter
|
||||
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
|
||||
# $1 : The parameter value
|
||||
# returns : New parameter
|
||||
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
|
||||
# $VIASH_DOCKER_AUTOMOUNT_PREFIX : The prefix to be used for the automounts
|
||||
# examples:
|
||||
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
|
||||
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
|
||||
function ViashDockerAutodetectMount {
|
||||
abs_path=$(ViashAbsolutePath "$1")
|
||||
local abs_path=$(ViashAbsolutePath "$1")
|
||||
local mount_source
|
||||
local base_name
|
||||
if [ -d "$abs_path" ]; then
|
||||
mount_source="$abs_path"
|
||||
base_name=""
|
||||
@@ -543,7 +550,7 @@ function ViashDockerAutodetectMount {
|
||||
mount_source=`dirname "$abs_path"`
|
||||
base_name=`basename "$abs_path"`
|
||||
fi
|
||||
mount_target="/viash_automount$mount_source"
|
||||
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
|
||||
if [ -z "$base_name" ]; then
|
||||
echo "$mount_target"
|
||||
else
|
||||
@@ -551,7 +558,9 @@ function ViashDockerAutodetectMount {
|
||||
fi
|
||||
}
|
||||
function ViashDockerAutodetectMountArg {
|
||||
abs_path=$(ViashAbsolutePath "$1")
|
||||
local abs_path=$(ViashAbsolutePath "$1")
|
||||
local mount_source
|
||||
local base_name
|
||||
if [ -d "$abs_path" ]; then
|
||||
mount_source="$abs_path"
|
||||
base_name=""
|
||||
@@ -559,17 +568,22 @@ function ViashDockerAutodetectMountArg {
|
||||
mount_source=`dirname "$abs_path"`
|
||||
base_name=`basename "$abs_path"`
|
||||
fi
|
||||
mount_target="/viash_automount$mount_source"
|
||||
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
|
||||
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
|
||||
echo "--volume=\"$mount_source:$mount_target\""
|
||||
}
|
||||
function ViashDockerStripAutomount {
|
||||
abs_path=$(ViashAbsolutePath "$1")
|
||||
echo "${abs_path#/viash_automount}"
|
||||
local abs_path=$(ViashAbsolutePath "$1")
|
||||
echo "${abs_path#$VIASH_DOCKER_AUTOMOUNT_PREFIX}"
|
||||
}
|
||||
# initialise variables
|
||||
VIASH_DIRECTORY_MOUNTS=()
|
||||
|
||||
# configure default docker automount prefix if it is unset
|
||||
if [ -z "${VIASH_DOCKER_AUTOMOUNT_PREFIX+x}" ]; then
|
||||
VIASH_DOCKER_AUTOMOUNT_PREFIX="/viash_automount"
|
||||
fi
|
||||
|
||||
# initialise docker variables
|
||||
VIASH_DOCKER_RUN_ARGS=(-i --rm)
|
||||
|
||||
@@ -595,7 +609,7 @@ while [[ $# -gt 0 ]]; do
|
||||
shift 1
|
||||
;;
|
||||
--version)
|
||||
echo "interop_summary_to_csv v0.1.0"
|
||||
echo "interop_summary_to_csv v0.1.1"
|
||||
exit
|
||||
;;
|
||||
--input)
|
||||
@@ -653,6 +667,18 @@ while [[ $# -gt 0 ]]; do
|
||||
VIASH_MODE='dockerfile'
|
||||
shift 1
|
||||
;;
|
||||
---docker_run_args)
|
||||
VIASH_DOCKER_RUN_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
---docker_run_args=*)
|
||||
VIASH_DOCKER_RUN_ARGS+=("$(ViashRemoveFlags "$1")")
|
||||
shift 1
|
||||
;;
|
||||
---docker_image_id)
|
||||
VIASH_MODE='docker_image_id'
|
||||
shift 1
|
||||
;;
|
||||
---debug)
|
||||
VIASH_MODE='debug'
|
||||
shift 1
|
||||
@@ -707,13 +733,17 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then
|
||||
|
||||
# determine docker image id
|
||||
if [[ "$VIASH_ENGINE_ID" == 'docker' ]]; then
|
||||
VIASH_DOCKER_IMAGE_ID='images.viash-hub.com/vsh/demultiplex/io/interop_summary_to_csv:v0.1.0'
|
||||
VIASH_DOCKER_IMAGE_ID='images.viash-hub.com/vsh/demultiplex/io/interop_summary_to_csv:v0.1.1'
|
||||
fi
|
||||
|
||||
# print dockerfile
|
||||
if [ "$VIASH_MODE" == "dockerfile" ]; then
|
||||
ViashDockerfile "$VIASH_ENGINE_ID"
|
||||
exit 0
|
||||
|
||||
elif [ "$VIASH_MODE" == "docker_image_id" ]; then
|
||||
echo "$VIASH_DOCKER_IMAGE_ID"
|
||||
exit 0
|
||||
|
||||
# enter docker container
|
||||
elif [[ "$VIASH_MODE" == "debug" ]]; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: "untar"
|
||||
namespace: "io"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
argument_groups:
|
||||
- name: "Input arguments"
|
||||
arguments:
|
||||
@@ -130,7 +130,7 @@ engines:
|
||||
id: "docker"
|
||||
image: "debian:stable-slim"
|
||||
target_registry: "images.viash-hub.com"
|
||||
target_tag: "v0.1.0"
|
||||
target_tag: "v0.1.1"
|
||||
namespace_separator: "/"
|
||||
setup:
|
||||
- type: "apt"
|
||||
@@ -147,25 +147,25 @@ build_info:
|
||||
engine: "docker|native"
|
||||
output: "target/executable/io/untar"
|
||||
executable: "target/executable/io/untar/untar"
|
||||
viash_version: "0.9.0-RC6"
|
||||
git_commit: "3d229bef584233f228330ff881dad685b92bf1e1"
|
||||
viash_version: "0.9.0"
|
||||
git_commit: "5ad947dd1e6d6783ac7905d665036733a420731f"
|
||||
git_remote: "https://github.com/viash-hub/demultiplex"
|
||||
package_config:
|
||||
name: "demultiplex"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
description: "Demultiplexing pipeline\n"
|
||||
info:
|
||||
test_resources:
|
||||
- path: "https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NovaSeq6000/200624_A00834_0183_BHMTFYDRXX.tar.gz"
|
||||
dest: "test_resources"
|
||||
viash_version: "0.9.0-RC6"
|
||||
viash_version: "0.9.0"
|
||||
source: "src"
|
||||
target: "target"
|
||||
config_mods:
|
||||
- ".requirements.commands := ['ps']\n"
|
||||
- ".engines += { type: \"native\" }"
|
||||
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
keywords:
|
||||
- "bioinformatics"
|
||||
- "sequence"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# untar v0.1.0
|
||||
# untar v0.1.1
|
||||
#
|
||||
# This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
||||
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||
# Data Intuitive.
|
||||
# This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative
|
||||
# work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data
|
||||
# Intuitive.
|
||||
#
|
||||
# The component may contain files which fall under a different license. The
|
||||
# authors of this component should specify the license in the header of such
|
||||
@@ -54,24 +54,24 @@ function ViashRemoveFlags {
|
||||
# $1 : Should always be set to ${BASH_SOURCE[0]}
|
||||
# returns : The absolute path of the bash file
|
||||
function ViashSourceDir {
|
||||
SOURCE="$1"
|
||||
while [ -h "$SOURCE" ]; do
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||
local source="$1"
|
||||
while [ -h "$source" ]; do
|
||||
local dir="$( cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
[[ $source != /* ]] && source="$dir/$source"
|
||||
done
|
||||
cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd
|
||||
cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd
|
||||
}
|
||||
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
|
||||
# usage : ViashFindTargetDir 'ScriptPath'
|
||||
# $1 : The location from where to start the upward search
|
||||
# returns : The absolute path of the '.build.yaml' file
|
||||
function ViashFindTargetDir {
|
||||
SOURCE="$1"
|
||||
while [[ "$SOURCE" != "" && ! -e "$SOURCE/.build.yaml" ]]; do
|
||||
SOURCE=${SOURCE%/*}
|
||||
local source="$1"
|
||||
while [[ "$source" != "" && ! -e "$source/.build.yaml" ]]; do
|
||||
source=${source%/*}
|
||||
done
|
||||
echo $SOURCE
|
||||
echo $source
|
||||
}
|
||||
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
|
||||
VIASH_LOGCODE_EMERGENCY=0
|
||||
@@ -171,7 +171,7 @@ VIASH_META_TEMP_DIR="$VIASH_TEMP"
|
||||
|
||||
# ViashHelp: Display helpful explanation about this executable
|
||||
function ViashHelp {
|
||||
echo "untar v0.1.0"
|
||||
echo "untar v0.1.1"
|
||||
echo ""
|
||||
echo "Unpack a .tar file. When the contents of the .tar file is just a single"
|
||||
echo "directory,"
|
||||
@@ -215,9 +215,9 @@ function ViashDockerInstallationCheck {
|
||||
fi
|
||||
|
||||
ViashDebug "Checking whether the Docker daemon is running"
|
||||
save=$-; set +e
|
||||
docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
|
||||
out=$?
|
||||
local save=$-; set +e
|
||||
local docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
|
||||
local out=$?
|
||||
[[ $save =~ e ]] && set -e
|
||||
if [ $out -ne 0 ]; then
|
||||
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
|
||||
@@ -269,9 +269,9 @@ function ViashDockerPull {
|
||||
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
||||
docker pull $1 && return 0 || return 1
|
||||
else
|
||||
save=$-; set +e
|
||||
local save=$-; set +e
|
||||
docker pull $1 2> /dev/null > /dev/null
|
||||
out=$?
|
||||
local out=$?
|
||||
[[ $save =~ e ]] && set -e
|
||||
if [ $out -ne 0 ]; then
|
||||
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
|
||||
@@ -291,7 +291,8 @@ function ViashDockerPull {
|
||||
# echo $? # returns '1'
|
||||
function ViashDockerPush {
|
||||
ViashNotice "Pushing image to '$1'"
|
||||
save=$-; set +e
|
||||
local save=$-; set +e
|
||||
local out
|
||||
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
||||
docker push $1
|
||||
out=$?
|
||||
@@ -315,9 +316,9 @@ function ViashDockerPush {
|
||||
# examples:
|
||||
# ViashDockerPullElseBuild mynewcomponent
|
||||
function ViashDockerPullElseBuild {
|
||||
save=$-; set +e
|
||||
local save=$-; set +e
|
||||
ViashDockerPull $1
|
||||
out=$?
|
||||
local out=$?
|
||||
[[ $save =~ e ]] && set -e
|
||||
if [ $out -ne 0 ]; then
|
||||
ViashDockerBuild $@
|
||||
@@ -475,10 +476,10 @@ 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="2024-06-24T12:57:03Z"
|
||||
LABEL org.opencontainers.image.created="2024-09-13T10:00:08Z"
|
||||
LABEL org.opencontainers.image.source="https://github.com/viash-hub/demultiplex"
|
||||
LABEL org.opencontainers.image.revision="3d229bef584233f228330ff881dad685b92bf1e1"
|
||||
LABEL org.opencontainers.image.version="v0.1.0"
|
||||
LABEL org.opencontainers.image.revision="5ad947dd1e6d6783ac7905d665036733a420731f"
|
||||
LABEL org.opencontainers.image.version="v0.1.1"
|
||||
|
||||
VIASHDOCKER
|
||||
fi
|
||||
@@ -504,6 +505,9 @@ function ViashDockerBuildArgs {
|
||||
# ViashAbsolutePath /foo/bar/.. # returns /foo
|
||||
function ViashAbsolutePath {
|
||||
local thePath
|
||||
local parr
|
||||
local outp
|
||||
local len
|
||||
if [[ ! "$1" =~ ^/ ]]; then
|
||||
thePath="$PWD/$1"
|
||||
else
|
||||
@@ -534,14 +538,17 @@ function ViashAbsolutePath {
|
||||
)
|
||||
}
|
||||
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
|
||||
# $1 : The parameter value
|
||||
# returns : New parameter
|
||||
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
|
||||
# $1 : The parameter value
|
||||
# returns : New parameter
|
||||
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
|
||||
# $VIASH_DOCKER_AUTOMOUNT_PREFIX : The prefix to be used for the automounts
|
||||
# examples:
|
||||
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
|
||||
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
|
||||
function ViashDockerAutodetectMount {
|
||||
abs_path=$(ViashAbsolutePath "$1")
|
||||
local abs_path=$(ViashAbsolutePath "$1")
|
||||
local mount_source
|
||||
local base_name
|
||||
if [ -d "$abs_path" ]; then
|
||||
mount_source="$abs_path"
|
||||
base_name=""
|
||||
@@ -549,7 +556,7 @@ function ViashDockerAutodetectMount {
|
||||
mount_source=`dirname "$abs_path"`
|
||||
base_name=`basename "$abs_path"`
|
||||
fi
|
||||
mount_target="/viash_automount$mount_source"
|
||||
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
|
||||
if [ -z "$base_name" ]; then
|
||||
echo "$mount_target"
|
||||
else
|
||||
@@ -557,7 +564,9 @@ function ViashDockerAutodetectMount {
|
||||
fi
|
||||
}
|
||||
function ViashDockerAutodetectMountArg {
|
||||
abs_path=$(ViashAbsolutePath "$1")
|
||||
local abs_path=$(ViashAbsolutePath "$1")
|
||||
local mount_source
|
||||
local base_name
|
||||
if [ -d "$abs_path" ]; then
|
||||
mount_source="$abs_path"
|
||||
base_name=""
|
||||
@@ -565,17 +574,22 @@ function ViashDockerAutodetectMountArg {
|
||||
mount_source=`dirname "$abs_path"`
|
||||
base_name=`basename "$abs_path"`
|
||||
fi
|
||||
mount_target="/viash_automount$mount_source"
|
||||
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
|
||||
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
|
||||
echo "--volume=\"$mount_source:$mount_target\""
|
||||
}
|
||||
function ViashDockerStripAutomount {
|
||||
abs_path=$(ViashAbsolutePath "$1")
|
||||
echo "${abs_path#/viash_automount}"
|
||||
local abs_path=$(ViashAbsolutePath "$1")
|
||||
echo "${abs_path#$VIASH_DOCKER_AUTOMOUNT_PREFIX}"
|
||||
}
|
||||
# initialise variables
|
||||
VIASH_DIRECTORY_MOUNTS=()
|
||||
|
||||
# configure default docker automount prefix if it is unset
|
||||
if [ -z "${VIASH_DOCKER_AUTOMOUNT_PREFIX+x}" ]; then
|
||||
VIASH_DOCKER_AUTOMOUNT_PREFIX="/viash_automount"
|
||||
fi
|
||||
|
||||
# initialise docker variables
|
||||
VIASH_DOCKER_RUN_ARGS=(-i --rm)
|
||||
|
||||
@@ -601,7 +615,7 @@ while [[ $# -gt 0 ]]; do
|
||||
shift 1
|
||||
;;
|
||||
--version)
|
||||
echo "untar v0.1.0"
|
||||
echo "untar v0.1.1"
|
||||
exit
|
||||
;;
|
||||
--input)
|
||||
@@ -665,6 +679,18 @@ while [[ $# -gt 0 ]]; do
|
||||
VIASH_MODE='dockerfile'
|
||||
shift 1
|
||||
;;
|
||||
---docker_run_args)
|
||||
VIASH_DOCKER_RUN_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
---docker_run_args=*)
|
||||
VIASH_DOCKER_RUN_ARGS+=("$(ViashRemoveFlags "$1")")
|
||||
shift 1
|
||||
;;
|
||||
---docker_image_id)
|
||||
VIASH_MODE='docker_image_id'
|
||||
shift 1
|
||||
;;
|
||||
---debug)
|
||||
VIASH_MODE='debug'
|
||||
shift 1
|
||||
@@ -719,13 +745,17 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then
|
||||
|
||||
# determine docker image id
|
||||
if [[ "$VIASH_ENGINE_ID" == 'docker' ]]; then
|
||||
VIASH_DOCKER_IMAGE_ID='images.viash-hub.com/vsh/demultiplex/io/untar:v0.1.0'
|
||||
VIASH_DOCKER_IMAGE_ID='images.viash-hub.com/vsh/demultiplex/io/untar:v0.1.1'
|
||||
fi
|
||||
|
||||
# print dockerfile
|
||||
if [ "$VIASH_MODE" == "dockerfile" ]; then
|
||||
ViashDockerfile "$VIASH_ENGINE_ID"
|
||||
exit 0
|
||||
|
||||
elif [ "$VIASH_MODE" == "docker_image_id" ]; then
|
||||
echo "$VIASH_DOCKER_IMAGE_ID"
|
||||
exit 0
|
||||
|
||||
# enter docker container
|
||||
elif [[ "$VIASH_MODE" == "debug" ]]; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: "combine_samples"
|
||||
namespace: "dataflow"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
argument_groups:
|
||||
- name: "Input arguments"
|
||||
arguments:
|
||||
@@ -138,25 +138,25 @@ build_info:
|
||||
engine: "native|native"
|
||||
output: "target/nextflow/dataflow/combine_samples"
|
||||
executable: "target/nextflow/dataflow/combine_samples/main.nf"
|
||||
viash_version: "0.9.0-RC6"
|
||||
git_commit: "3d229bef584233f228330ff881dad685b92bf1e1"
|
||||
viash_version: "0.9.0"
|
||||
git_commit: "5ad947dd1e6d6783ac7905d665036733a420731f"
|
||||
git_remote: "https://github.com/viash-hub/demultiplex"
|
||||
package_config:
|
||||
name: "demultiplex"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
description: "Demultiplexing pipeline\n"
|
||||
info:
|
||||
test_resources:
|
||||
- path: "https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NovaSeq6000/200624_A00834_0183_BHMTFYDRXX.tar.gz"
|
||||
dest: "test_resources"
|
||||
viash_version: "0.9.0-RC6"
|
||||
viash_version: "0.9.0"
|
||||
source: "src"
|
||||
target: "target"
|
||||
config_mods:
|
||||
- ".requirements.commands := ['ps']\n"
|
||||
- ".engines += { type: \"native\" }"
|
||||
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
keywords:
|
||||
- "bioinformatics"
|
||||
- "sequence"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// combine_samples v0.1.0
|
||||
// combine_samples v0.1.1
|
||||
//
|
||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||
// Data Intuitive.
|
||||
// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative
|
||||
// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data
|
||||
// Intuitive.
|
||||
//
|
||||
// The component may contain files which fall under a different license. The
|
||||
// authors of this component should specify the license in the header of such
|
||||
@@ -760,8 +760,11 @@ def runEach(Map args) {
|
||||
def fromState_ = args.fromState
|
||||
def toState_ = args.toState
|
||||
def filter_ = args.filter
|
||||
def runIf_ = args.runIf
|
||||
def id_ = args.id
|
||||
|
||||
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||
|
||||
workflow runEachWf {
|
||||
take: input_ch
|
||||
main:
|
||||
@@ -783,7 +786,20 @@ def runEach(Map args) {
|
||||
[new_id] + tup.drop(1)
|
||||
}
|
||||
: filter_ch
|
||||
def data_ch = id_ch | map{tup ->
|
||||
def chPassthrough = null
|
||||
def chRun = null
|
||||
if (runIf_) {
|
||||
def idRunIfBranch = id_ch.branch{ tup ->
|
||||
run: runIf_(tup[0], tup[1], comp_)
|
||||
passthrough: true
|
||||
}
|
||||
chPassthrough = idRunIfBranch.passthrough
|
||||
chRun = idRunIfBranch.run
|
||||
} else {
|
||||
chRun = id_ch
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
def data_ch = chRun | map{tup ->
|
||||
def new_data = tup[1]
|
||||
if (fromState_ instanceof Map) {
|
||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||
@@ -821,8 +837,11 @@ def runEach(Map args) {
|
||||
[tup[0], new_state] + tup.drop(3)
|
||||
}
|
||||
: out_ch
|
||||
|
||||
def return_ch = post_ch
|
||||
| concat(chPassthrough)
|
||||
|
||||
post_ch
|
||||
return_ch
|
||||
}
|
||||
|
||||
// mix all results
|
||||
@@ -1598,8 +1617,8 @@ def findStates(Map params, Map config) {
|
||||
// construct renameMap
|
||||
if (args.rename_keys) {
|
||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||
def split = renameString.split(";")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
||||
def split = renameString.split(":")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||
split
|
||||
}
|
||||
|
||||
@@ -1709,7 +1728,9 @@ def publishStates(Map args) {
|
||||
|
||||
def yamlFilename = yamlTemplate_
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
|
||||
// TODO: do the pathnames in state_ match up with the outputFilenames_?
|
||||
|
||||
@@ -1780,7 +1801,9 @@ def publishStatesByConfig(Map args) {
|
||||
def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml'
|
||||
def yamlFilename = yamlTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent()
|
||||
|
||||
// the processed state is a list of [key, value, inputPath, outputFilename] tuples, where
|
||||
@@ -1822,7 +1845,9 @@ def publishStatesByConfig(Map args) {
|
||||
// instantiate the template
|
||||
def filename = filenameTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
if (par.multiple) {
|
||||
// if the parameter is multiple: true, the filename
|
||||
// should contain a wildcard '*' that is replaced with
|
||||
@@ -2626,30 +2651,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
tuple
|
||||
}
|
||||
|
||||
def chModifiedFiltered = workflowArgs.filter ?
|
||||
chModified | filter{workflowArgs.filter(it)} :
|
||||
chModified
|
||||
|
||||
def chRun = null
|
||||
def chPassthrough = null
|
||||
if (workflowArgs.runIf) {
|
||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
||||
def runIfBranch = chModified.branch{ tup ->
|
||||
run: workflowArgs.runIf(tup[0], tup[1])
|
||||
passthrough: true
|
||||
}
|
||||
chRun = runIfBranch.run
|
||||
chPassthrough = runIfBranch.passthrough
|
||||
} else {
|
||||
chRun = chModifiedFiltered
|
||||
chRun = chModified
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
|
||||
def chRunFiltered = workflowArgs.filter ?
|
||||
chRun | filter{workflowArgs.filter(it)} :
|
||||
chRun
|
||||
|
||||
def chArgs = workflowArgs.fromState ?
|
||||
chRun | map{
|
||||
chRunFiltered | map{
|
||||
def new_data = workflowArgs.fromState(it.take(2))
|
||||
[it[0], new_data]
|
||||
} :
|
||||
chRun | map {tup -> tup.take(2)}
|
||||
chRunFiltered | map {tup -> tup.take(2)}
|
||||
|
||||
// fill in defaults
|
||||
def chArgsWithDefaults = chArgs
|
||||
@@ -2720,7 +2746,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||
|
||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
||||
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||
// output tuple format: [join_id, id, new_state, ...]
|
||||
| map{ tup ->
|
||||
@@ -2780,7 +2806,7 @@ meta = [
|
||||
"config": processConfig(readJsonBlob('''{
|
||||
"name" : "combine_samples",
|
||||
"namespace" : "dataflow",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "v0.1.1",
|
||||
"argument_groups" : [
|
||||
{
|
||||
"name" : "Input arguments",
|
||||
@@ -2945,13 +2971,13 @@ meta = [
|
||||
"runner" : "nextflow",
|
||||
"engine" : "native|native",
|
||||
"output" : "target/nextflow/dataflow/combine_samples",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"git_commit" : "3d229bef584233f228330ff881dad685b92bf1e1",
|
||||
"viash_version" : "0.9.0",
|
||||
"git_commit" : "5ad947dd1e6d6783ac7905d665036733a420731f",
|
||||
"git_remote" : "https://github.com/viash-hub/demultiplex"
|
||||
},
|
||||
"package_config" : {
|
||||
"name" : "demultiplex",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "v0.1.1",
|
||||
"description" : "Demultiplexing pipeline\n",
|
||||
"info" : {
|
||||
"test_resources" : [
|
||||
@@ -2961,14 +2987,14 @@ meta = [
|
||||
}
|
||||
]
|
||||
},
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"viash_version" : "0.9.0",
|
||||
"source" : "src",
|
||||
"target" : "target",
|
||||
"config_mods" : [
|
||||
".requirements.commands := ['ps']\n",
|
||||
".engines += { type: \\"native\\" }",
|
||||
".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'",
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
],
|
||||
"keywords" : [
|
||||
"bioinformatics",
|
||||
|
||||
@@ -2,7 +2,7 @@ manifest {
|
||||
name = 'dataflow/combine_samples'
|
||||
mainScript = 'main.nf'
|
||||
nextflowVersion = '!>=20.12.1-edge'
|
||||
version = 'v0.1.0'
|
||||
version = 'v0.1.1'
|
||||
description = 'Combine fastq files from across samples into one event with a list of fastq files per orientation.'
|
||||
}
|
||||
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
"output_forward": {
|
||||
"type":
|
||||
"string",
|
||||
"description": "Type: List of `file`, required, default: `$id.$key.output_forward_*.output_forward_*`, multiple_sep: `\":\"`. ",
|
||||
"help_text": "Type: List of `file`, required, default: `$id.$key.output_forward_*.output_forward_*`, multiple_sep: `\":\"`. "
|
||||
"description": "Type: List of `file`, required, default: `$id.$key.output_forward_*.output_forward_*`, multiple_sep: `\";\"`. ",
|
||||
"help_text": "Type: List of `file`, required, default: `$id.$key.output_forward_*.output_forward_*`, multiple_sep: `\";\"`. "
|
||||
,
|
||||
"default": "$id.$key.output_forward_*.output_forward_*"
|
||||
}
|
||||
@@ -68,8 +68,8 @@
|
||||
"output_reverse": {
|
||||
"type":
|
||||
"string",
|
||||
"description": "Type: List of `file`, default: `$id.$key.output_reverse_*.output_reverse_*`, multiple_sep: `\":\"`. ",
|
||||
"help_text": "Type: List of `file`, default: `$id.$key.output_reverse_*.output_reverse_*`, multiple_sep: `\":\"`. "
|
||||
"description": "Type: List of `file`, default: `$id.$key.output_reverse_*.output_reverse_*`, multiple_sep: `\";\"`. ",
|
||||
"help_text": "Type: List of `file`, default: `$id.$key.output_reverse_*.output_reverse_*`, multiple_sep: `\";\"`. "
|
||||
,
|
||||
"default": "$id.$key.output_reverse_*.output_reverse_*"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: "gather_fastqs_and_validate"
|
||||
namespace: "dataflow"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
argument_groups:
|
||||
- name: "Input arguments"
|
||||
arguments:
|
||||
@@ -132,25 +132,25 @@ build_info:
|
||||
engine: "native|native"
|
||||
output: "target/nextflow/dataflow/gather_fastqs_and_validate"
|
||||
executable: "target/nextflow/dataflow/gather_fastqs_and_validate/main.nf"
|
||||
viash_version: "0.9.0-RC6"
|
||||
git_commit: "3d229bef584233f228330ff881dad685b92bf1e1"
|
||||
viash_version: "0.9.0"
|
||||
git_commit: "5ad947dd1e6d6783ac7905d665036733a420731f"
|
||||
git_remote: "https://github.com/viash-hub/demultiplex"
|
||||
package_config:
|
||||
name: "demultiplex"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
description: "Demultiplexing pipeline\n"
|
||||
info:
|
||||
test_resources:
|
||||
- path: "https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NovaSeq6000/200624_A00834_0183_BHMTFYDRXX.tar.gz"
|
||||
dest: "test_resources"
|
||||
viash_version: "0.9.0-RC6"
|
||||
viash_version: "0.9.0"
|
||||
source: "src"
|
||||
target: "target"
|
||||
config_mods:
|
||||
- ".requirements.commands := ['ps']\n"
|
||||
- ".engines += { type: \"native\" }"
|
||||
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
keywords:
|
||||
- "bioinformatics"
|
||||
- "sequence"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// gather_fastqs_and_validate v0.1.0
|
||||
// gather_fastqs_and_validate v0.1.1
|
||||
//
|
||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||
// Data Intuitive.
|
||||
// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative
|
||||
// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data
|
||||
// Intuitive.
|
||||
//
|
||||
// The component may contain files which fall under a different license. The
|
||||
// authors of this component should specify the license in the header of such
|
||||
@@ -760,8 +760,11 @@ def runEach(Map args) {
|
||||
def fromState_ = args.fromState
|
||||
def toState_ = args.toState
|
||||
def filter_ = args.filter
|
||||
def runIf_ = args.runIf
|
||||
def id_ = args.id
|
||||
|
||||
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||
|
||||
workflow runEachWf {
|
||||
take: input_ch
|
||||
main:
|
||||
@@ -783,7 +786,20 @@ def runEach(Map args) {
|
||||
[new_id] + tup.drop(1)
|
||||
}
|
||||
: filter_ch
|
||||
def data_ch = id_ch | map{tup ->
|
||||
def chPassthrough = null
|
||||
def chRun = null
|
||||
if (runIf_) {
|
||||
def idRunIfBranch = id_ch.branch{ tup ->
|
||||
run: runIf_(tup[0], tup[1], comp_)
|
||||
passthrough: true
|
||||
}
|
||||
chPassthrough = idRunIfBranch.passthrough
|
||||
chRun = idRunIfBranch.run
|
||||
} else {
|
||||
chRun = id_ch
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
def data_ch = chRun | map{tup ->
|
||||
def new_data = tup[1]
|
||||
if (fromState_ instanceof Map) {
|
||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||
@@ -821,8 +837,11 @@ def runEach(Map args) {
|
||||
[tup[0], new_state] + tup.drop(3)
|
||||
}
|
||||
: out_ch
|
||||
|
||||
def return_ch = post_ch
|
||||
| concat(chPassthrough)
|
||||
|
||||
post_ch
|
||||
return_ch
|
||||
}
|
||||
|
||||
// mix all results
|
||||
@@ -1598,8 +1617,8 @@ def findStates(Map params, Map config) {
|
||||
// construct renameMap
|
||||
if (args.rename_keys) {
|
||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||
def split = renameString.split(";")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
||||
def split = renameString.split(":")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||
split
|
||||
}
|
||||
|
||||
@@ -1709,7 +1728,9 @@ def publishStates(Map args) {
|
||||
|
||||
def yamlFilename = yamlTemplate_
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
|
||||
// TODO: do the pathnames in state_ match up with the outputFilenames_?
|
||||
|
||||
@@ -1780,7 +1801,9 @@ def publishStatesByConfig(Map args) {
|
||||
def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml'
|
||||
def yamlFilename = yamlTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent()
|
||||
|
||||
// the processed state is a list of [key, value, inputPath, outputFilename] tuples, where
|
||||
@@ -1822,7 +1845,9 @@ def publishStatesByConfig(Map args) {
|
||||
// instantiate the template
|
||||
def filename = filenameTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
if (par.multiple) {
|
||||
// if the parameter is multiple: true, the filename
|
||||
// should contain a wildcard '*' that is replaced with
|
||||
@@ -2626,30 +2651,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
tuple
|
||||
}
|
||||
|
||||
def chModifiedFiltered = workflowArgs.filter ?
|
||||
chModified | filter{workflowArgs.filter(it)} :
|
||||
chModified
|
||||
|
||||
def chRun = null
|
||||
def chPassthrough = null
|
||||
if (workflowArgs.runIf) {
|
||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
||||
def runIfBranch = chModified.branch{ tup ->
|
||||
run: workflowArgs.runIf(tup[0], tup[1])
|
||||
passthrough: true
|
||||
}
|
||||
chRun = runIfBranch.run
|
||||
chPassthrough = runIfBranch.passthrough
|
||||
} else {
|
||||
chRun = chModifiedFiltered
|
||||
chRun = chModified
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
|
||||
def chRunFiltered = workflowArgs.filter ?
|
||||
chRun | filter{workflowArgs.filter(it)} :
|
||||
chRun
|
||||
|
||||
def chArgs = workflowArgs.fromState ?
|
||||
chRun | map{
|
||||
chRunFiltered | map{
|
||||
def new_data = workflowArgs.fromState(it.take(2))
|
||||
[it[0], new_data]
|
||||
} :
|
||||
chRun | map {tup -> tup.take(2)}
|
||||
chRunFiltered | map {tup -> tup.take(2)}
|
||||
|
||||
// fill in defaults
|
||||
def chArgsWithDefaults = chArgs
|
||||
@@ -2720,7 +2746,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||
|
||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
||||
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||
// output tuple format: [join_id, id, new_state, ...]
|
||||
| map{ tup ->
|
||||
@@ -2780,7 +2806,7 @@ meta = [
|
||||
"config": processConfig(readJsonBlob('''{
|
||||
"name" : "gather_fastqs_and_validate",
|
||||
"namespace" : "dataflow",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "v0.1.1",
|
||||
"argument_groups" : [
|
||||
{
|
||||
"name" : "Input arguments",
|
||||
@@ -2938,13 +2964,13 @@ meta = [
|
||||
"runner" : "nextflow",
|
||||
"engine" : "native|native",
|
||||
"output" : "target/nextflow/dataflow/gather_fastqs_and_validate",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"git_commit" : "3d229bef584233f228330ff881dad685b92bf1e1",
|
||||
"viash_version" : "0.9.0",
|
||||
"git_commit" : "5ad947dd1e6d6783ac7905d665036733a420731f",
|
||||
"git_remote" : "https://github.com/viash-hub/demultiplex"
|
||||
},
|
||||
"package_config" : {
|
||||
"name" : "demultiplex",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "v0.1.1",
|
||||
"description" : "Demultiplexing pipeline\n",
|
||||
"info" : {
|
||||
"test_resources" : [
|
||||
@@ -2954,14 +2980,14 @@ meta = [
|
||||
}
|
||||
]
|
||||
},
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"viash_version" : "0.9.0",
|
||||
"source" : "src",
|
||||
"target" : "target",
|
||||
"config_mods" : [
|
||||
".requirements.commands := ['ps']\n",
|
||||
".engines += { type: \\"native\\" }",
|
||||
".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'",
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
],
|
||||
"keywords" : [
|
||||
"bioinformatics",
|
||||
|
||||
@@ -2,7 +2,7 @@ manifest {
|
||||
name = 'dataflow/gather_fastqs_and_validate'
|
||||
mainScript = 'main.nf'
|
||||
nextflowVersion = '!>=20.12.1-edge'
|
||||
version = 'v0.1.0'
|
||||
version = 'v0.1.1'
|
||||
description = 'From a directory containing fastq files, gather the files per sample \nand validate according to the contents of the sample sheet.\n'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: "demultiplex"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
argument_groups:
|
||||
- name: "Input arguments"
|
||||
arguments:
|
||||
@@ -93,22 +93,22 @@ dependencies:
|
||||
repository:
|
||||
type: "vsh"
|
||||
repo: "biobox"
|
||||
tag: "v0.1.0"
|
||||
tag: "v0.2.0"
|
||||
- name: "falco"
|
||||
repository:
|
||||
type: "vsh"
|
||||
repo: "biobox"
|
||||
tag: "v0.1.0"
|
||||
tag: "v0.2.0"
|
||||
- name: "multiqc"
|
||||
repository:
|
||||
type: "vsh"
|
||||
repo: "biobox"
|
||||
tag: "v0.1.0"
|
||||
tag: "v0.2.0"
|
||||
repositories:
|
||||
- type: "vsh"
|
||||
name: "bb"
|
||||
repo: "biobox"
|
||||
tag: "v0.1.0"
|
||||
tag: "v0.2.0"
|
||||
license: "MIT"
|
||||
links:
|
||||
repository: "https://github.com/viash-hub/demultiplex"
|
||||
@@ -185,33 +185,33 @@ build_info:
|
||||
engine: "native|native"
|
||||
output: "target/nextflow/demultiplex"
|
||||
executable: "target/nextflow/demultiplex/main.nf"
|
||||
viash_version: "0.9.0-RC6"
|
||||
git_commit: "3d229bef584233f228330ff881dad685b92bf1e1"
|
||||
viash_version: "0.9.0"
|
||||
git_commit: "5ad947dd1e6d6783ac7905d665036733a420731f"
|
||||
git_remote: "https://github.com/viash-hub/demultiplex"
|
||||
dependencies:
|
||||
- "target/nextflow/io/untar"
|
||||
- "target/nextflow/dataflow/gather_fastqs_and_validate"
|
||||
- "target/nextflow/io/interop_summary_to_csv"
|
||||
- "target/nextflow/dataflow/combine_samples"
|
||||
- "target/dependencies/vsh/vsh/biobox/v0.1.0/nextflow/bcl_convert"
|
||||
- "target/dependencies/vsh/vsh/biobox/v0.1.0/nextflow/falco"
|
||||
- "target/dependencies/vsh/vsh/biobox/v0.1.0/nextflow/multiqc"
|
||||
- "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/bcl_convert"
|
||||
- "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/falco"
|
||||
- "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/multiqc"
|
||||
package_config:
|
||||
name: "demultiplex"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
description: "Demultiplexing pipeline\n"
|
||||
info:
|
||||
test_resources:
|
||||
- path: "https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NovaSeq6000/200624_A00834_0183_BHMTFYDRXX.tar.gz"
|
||||
dest: "test_resources"
|
||||
viash_version: "0.9.0-RC6"
|
||||
viash_version: "0.9.0"
|
||||
source: "src"
|
||||
target: "target"
|
||||
config_mods:
|
||||
- ".requirements.commands := ['ps']\n"
|
||||
- ".engines += { type: \"native\" }"
|
||||
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
keywords:
|
||||
- "bioinformatics"
|
||||
- "sequence"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// demultiplex v0.1.0
|
||||
// demultiplex v0.1.1
|
||||
//
|
||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||
// Data Intuitive.
|
||||
// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative
|
||||
// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data
|
||||
// Intuitive.
|
||||
//
|
||||
// The component may contain files which fall under a different license. The
|
||||
// authors of this component should specify the license in the header of such
|
||||
@@ -760,8 +760,11 @@ def runEach(Map args) {
|
||||
def fromState_ = args.fromState
|
||||
def toState_ = args.toState
|
||||
def filter_ = args.filter
|
||||
def runIf_ = args.runIf
|
||||
def id_ = args.id
|
||||
|
||||
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||
|
||||
workflow runEachWf {
|
||||
take: input_ch
|
||||
main:
|
||||
@@ -783,7 +786,20 @@ def runEach(Map args) {
|
||||
[new_id] + tup.drop(1)
|
||||
}
|
||||
: filter_ch
|
||||
def data_ch = id_ch | map{tup ->
|
||||
def chPassthrough = null
|
||||
def chRun = null
|
||||
if (runIf_) {
|
||||
def idRunIfBranch = id_ch.branch{ tup ->
|
||||
run: runIf_(tup[0], tup[1], comp_)
|
||||
passthrough: true
|
||||
}
|
||||
chPassthrough = idRunIfBranch.passthrough
|
||||
chRun = idRunIfBranch.run
|
||||
} else {
|
||||
chRun = id_ch
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
def data_ch = chRun | map{tup ->
|
||||
def new_data = tup[1]
|
||||
if (fromState_ instanceof Map) {
|
||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||
@@ -821,8 +837,11 @@ def runEach(Map args) {
|
||||
[tup[0], new_state] + tup.drop(3)
|
||||
}
|
||||
: out_ch
|
||||
|
||||
def return_ch = post_ch
|
||||
| concat(chPassthrough)
|
||||
|
||||
post_ch
|
||||
return_ch
|
||||
}
|
||||
|
||||
// mix all results
|
||||
@@ -1598,8 +1617,8 @@ def findStates(Map params, Map config) {
|
||||
// construct renameMap
|
||||
if (args.rename_keys) {
|
||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||
def split = renameString.split(";")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
||||
def split = renameString.split(":")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||
split
|
||||
}
|
||||
|
||||
@@ -1709,7 +1728,9 @@ def publishStates(Map args) {
|
||||
|
||||
def yamlFilename = yamlTemplate_
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
|
||||
// TODO: do the pathnames in state_ match up with the outputFilenames_?
|
||||
|
||||
@@ -1780,7 +1801,9 @@ def publishStatesByConfig(Map args) {
|
||||
def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml'
|
||||
def yamlFilename = yamlTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent()
|
||||
|
||||
// the processed state is a list of [key, value, inputPath, outputFilename] tuples, where
|
||||
@@ -1822,7 +1845,9 @@ def publishStatesByConfig(Map args) {
|
||||
// instantiate the template
|
||||
def filename = filenameTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
if (par.multiple) {
|
||||
// if the parameter is multiple: true, the filename
|
||||
// should contain a wildcard '*' that is replaced with
|
||||
@@ -2626,30 +2651,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
tuple
|
||||
}
|
||||
|
||||
def chModifiedFiltered = workflowArgs.filter ?
|
||||
chModified | filter{workflowArgs.filter(it)} :
|
||||
chModified
|
||||
|
||||
def chRun = null
|
||||
def chPassthrough = null
|
||||
if (workflowArgs.runIf) {
|
||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
||||
def runIfBranch = chModified.branch{ tup ->
|
||||
run: workflowArgs.runIf(tup[0], tup[1])
|
||||
passthrough: true
|
||||
}
|
||||
chRun = runIfBranch.run
|
||||
chPassthrough = runIfBranch.passthrough
|
||||
} else {
|
||||
chRun = chModifiedFiltered
|
||||
chRun = chModified
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
|
||||
def chRunFiltered = workflowArgs.filter ?
|
||||
chRun | filter{workflowArgs.filter(it)} :
|
||||
chRun
|
||||
|
||||
def chArgs = workflowArgs.fromState ?
|
||||
chRun | map{
|
||||
chRunFiltered | map{
|
||||
def new_data = workflowArgs.fromState(it.take(2))
|
||||
[it[0], new_data]
|
||||
} :
|
||||
chRun | map {tup -> tup.take(2)}
|
||||
chRunFiltered | map {tup -> tup.take(2)}
|
||||
|
||||
// fill in defaults
|
||||
def chArgsWithDefaults = chArgs
|
||||
@@ -2720,7 +2746,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||
|
||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
||||
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||
// output tuple format: [join_id, id, new_state, ...]
|
||||
| map{ tup ->
|
||||
@@ -2779,7 +2805,7 @@ meta = [
|
||||
"resources_dir": moduleDir.toRealPath().normalize(),
|
||||
"config": processConfig(readJsonBlob('''{
|
||||
"name" : "demultiplex",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "v0.1.1",
|
||||
"argument_groups" : [
|
||||
{
|
||||
"name" : "Input arguments",
|
||||
@@ -2906,7 +2932,7 @@ meta = [
|
||||
"repository" : {
|
||||
"type" : "vsh",
|
||||
"repo" : "biobox",
|
||||
"tag" : "v0.1.0"
|
||||
"tag" : "v0.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -2914,7 +2940,7 @@ meta = [
|
||||
"repository" : {
|
||||
"type" : "vsh",
|
||||
"repo" : "biobox",
|
||||
"tag" : "v0.1.0"
|
||||
"tag" : "v0.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -2922,7 +2948,7 @@ meta = [
|
||||
"repository" : {
|
||||
"type" : "vsh",
|
||||
"repo" : "biobox",
|
||||
"tag" : "v0.1.0"
|
||||
"tag" : "v0.2.0"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -2931,7 +2957,7 @@ meta = [
|
||||
"type" : "vsh",
|
||||
"name" : "bb",
|
||||
"repo" : "biobox",
|
||||
"tag" : "v0.1.0"
|
||||
"tag" : "v0.2.0"
|
||||
}
|
||||
],
|
||||
"license" : "MIT",
|
||||
@@ -3022,13 +3048,13 @@ meta = [
|
||||
"runner" : "nextflow",
|
||||
"engine" : "native|native",
|
||||
"output" : "target/nextflow/demultiplex",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"git_commit" : "3d229bef584233f228330ff881dad685b92bf1e1",
|
||||
"viash_version" : "0.9.0",
|
||||
"git_commit" : "5ad947dd1e6d6783ac7905d665036733a420731f",
|
||||
"git_remote" : "https://github.com/viash-hub/demultiplex"
|
||||
},
|
||||
"package_config" : {
|
||||
"name" : "demultiplex",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "v0.1.1",
|
||||
"description" : "Demultiplexing pipeline\n",
|
||||
"info" : {
|
||||
"test_resources" : [
|
||||
@@ -3038,14 +3064,14 @@ meta = [
|
||||
}
|
||||
]
|
||||
},
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"viash_version" : "0.9.0",
|
||||
"source" : "src",
|
||||
"target" : "target",
|
||||
"config_mods" : [
|
||||
".requirements.commands := ['ps']\n",
|
||||
".engines += { type: \\"native\\" }",
|
||||
".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'",
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
],
|
||||
"keywords" : [
|
||||
"bioinformatics",
|
||||
@@ -3069,9 +3095,9 @@ include { untar } from "${meta.resources_dir}/../../nextflow/io/untar/main.nf"
|
||||
include { gather_fastqs_and_validate } from "${meta.resources_dir}/../../nextflow/dataflow/gather_fastqs_and_validate/main.nf"
|
||||
include { interop_summary_to_csv } from "${meta.resources_dir}/../../nextflow/io/interop_summary_to_csv/main.nf"
|
||||
include { combine_samples } from "${meta.resources_dir}/../../nextflow/dataflow/combine_samples/main.nf"
|
||||
include { bcl_convert } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.1.0/nextflow/bcl_convert/main.nf"
|
||||
include { falco } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.1.0/nextflow/falco/main.nf"
|
||||
include { multiqc } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.1.0/nextflow/multiqc/main.nf"
|
||||
include { bcl_convert } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/bcl_convert/main.nf"
|
||||
include { falco } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/falco/main.nf"
|
||||
include { multiqc } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/multiqc/main.nf"
|
||||
|
||||
// inner workflow
|
||||
// user-provided Nextflow code
|
||||
|
||||
@@ -2,7 +2,7 @@ manifest {
|
||||
name = 'demultiplex'
|
||||
mainScript = 'main.nf'
|
||||
nextflowVersion = '!>=20.12.1-edge'
|
||||
version = 'v0.1.0'
|
||||
version = 'v0.1.1'
|
||||
description = 'Demultiplexing of raw sequencing data'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: "interop_summary_to_csv"
|
||||
namespace: "io"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
argument_groups:
|
||||
- name: "Input arguments"
|
||||
arguments:
|
||||
@@ -116,7 +116,7 @@ engines:
|
||||
id: "docker"
|
||||
image: "debian:stable-slim"
|
||||
target_registry: "images.viash-hub.com"
|
||||
target_tag: "v0.1.0"
|
||||
target_tag: "v0.1.1"
|
||||
namespace_separator: "/"
|
||||
setup:
|
||||
- type: "apt"
|
||||
@@ -140,25 +140,25 @@ build_info:
|
||||
engine: "docker|native"
|
||||
output: "target/nextflow/io/interop_summary_to_csv"
|
||||
executable: "target/nextflow/io/interop_summary_to_csv/main.nf"
|
||||
viash_version: "0.9.0-RC6"
|
||||
git_commit: "3d229bef584233f228330ff881dad685b92bf1e1"
|
||||
viash_version: "0.9.0"
|
||||
git_commit: "5ad947dd1e6d6783ac7905d665036733a420731f"
|
||||
git_remote: "https://github.com/viash-hub/demultiplex"
|
||||
package_config:
|
||||
name: "demultiplex"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
description: "Demultiplexing pipeline\n"
|
||||
info:
|
||||
test_resources:
|
||||
- path: "https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NovaSeq6000/200624_A00834_0183_BHMTFYDRXX.tar.gz"
|
||||
dest: "test_resources"
|
||||
viash_version: "0.9.0-RC6"
|
||||
viash_version: "0.9.0"
|
||||
source: "src"
|
||||
target: "target"
|
||||
config_mods:
|
||||
- ".requirements.commands := ['ps']\n"
|
||||
- ".engines += { type: \"native\" }"
|
||||
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
keywords:
|
||||
- "bioinformatics"
|
||||
- "sequence"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// interop_summary_to_csv v0.1.0
|
||||
// interop_summary_to_csv v0.1.1
|
||||
//
|
||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||
// Data Intuitive.
|
||||
// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative
|
||||
// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data
|
||||
// Intuitive.
|
||||
//
|
||||
// The component may contain files which fall under a different license. The
|
||||
// authors of this component should specify the license in the header of such
|
||||
@@ -760,8 +760,11 @@ def runEach(Map args) {
|
||||
def fromState_ = args.fromState
|
||||
def toState_ = args.toState
|
||||
def filter_ = args.filter
|
||||
def runIf_ = args.runIf
|
||||
def id_ = args.id
|
||||
|
||||
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||
|
||||
workflow runEachWf {
|
||||
take: input_ch
|
||||
main:
|
||||
@@ -783,7 +786,20 @@ def runEach(Map args) {
|
||||
[new_id] + tup.drop(1)
|
||||
}
|
||||
: filter_ch
|
||||
def data_ch = id_ch | map{tup ->
|
||||
def chPassthrough = null
|
||||
def chRun = null
|
||||
if (runIf_) {
|
||||
def idRunIfBranch = id_ch.branch{ tup ->
|
||||
run: runIf_(tup[0], tup[1], comp_)
|
||||
passthrough: true
|
||||
}
|
||||
chPassthrough = idRunIfBranch.passthrough
|
||||
chRun = idRunIfBranch.run
|
||||
} else {
|
||||
chRun = id_ch
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
def data_ch = chRun | map{tup ->
|
||||
def new_data = tup[1]
|
||||
if (fromState_ instanceof Map) {
|
||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||
@@ -821,8 +837,11 @@ def runEach(Map args) {
|
||||
[tup[0], new_state] + tup.drop(3)
|
||||
}
|
||||
: out_ch
|
||||
|
||||
def return_ch = post_ch
|
||||
| concat(chPassthrough)
|
||||
|
||||
post_ch
|
||||
return_ch
|
||||
}
|
||||
|
||||
// mix all results
|
||||
@@ -1598,8 +1617,8 @@ def findStates(Map params, Map config) {
|
||||
// construct renameMap
|
||||
if (args.rename_keys) {
|
||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||
def split = renameString.split(";")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
||||
def split = renameString.split(":")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||
split
|
||||
}
|
||||
|
||||
@@ -1709,7 +1728,9 @@ def publishStates(Map args) {
|
||||
|
||||
def yamlFilename = yamlTemplate_
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
|
||||
// TODO: do the pathnames in state_ match up with the outputFilenames_?
|
||||
|
||||
@@ -1780,7 +1801,9 @@ def publishStatesByConfig(Map args) {
|
||||
def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml'
|
||||
def yamlFilename = yamlTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent()
|
||||
|
||||
// the processed state is a list of [key, value, inputPath, outputFilename] tuples, where
|
||||
@@ -1822,7 +1845,9 @@ def publishStatesByConfig(Map args) {
|
||||
// instantiate the template
|
||||
def filename = filenameTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
if (par.multiple) {
|
||||
// if the parameter is multiple: true, the filename
|
||||
// should contain a wildcard '*' that is replaced with
|
||||
@@ -2626,30 +2651,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
tuple
|
||||
}
|
||||
|
||||
def chModifiedFiltered = workflowArgs.filter ?
|
||||
chModified | filter{workflowArgs.filter(it)} :
|
||||
chModified
|
||||
|
||||
def chRun = null
|
||||
def chPassthrough = null
|
||||
if (workflowArgs.runIf) {
|
||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
||||
def runIfBranch = chModified.branch{ tup ->
|
||||
run: workflowArgs.runIf(tup[0], tup[1])
|
||||
passthrough: true
|
||||
}
|
||||
chRun = runIfBranch.run
|
||||
chPassthrough = runIfBranch.passthrough
|
||||
} else {
|
||||
chRun = chModifiedFiltered
|
||||
chRun = chModified
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
|
||||
def chRunFiltered = workflowArgs.filter ?
|
||||
chRun | filter{workflowArgs.filter(it)} :
|
||||
chRun
|
||||
|
||||
def chArgs = workflowArgs.fromState ?
|
||||
chRun | map{
|
||||
chRunFiltered | map{
|
||||
def new_data = workflowArgs.fromState(it.take(2))
|
||||
[it[0], new_data]
|
||||
} :
|
||||
chRun | map {tup -> tup.take(2)}
|
||||
chRunFiltered | map {tup -> tup.take(2)}
|
||||
|
||||
// fill in defaults
|
||||
def chArgsWithDefaults = chArgs
|
||||
@@ -2720,7 +2746,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||
|
||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
||||
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||
// output tuple format: [join_id, id, new_state, ...]
|
||||
| map{ tup ->
|
||||
@@ -2780,7 +2806,7 @@ meta = [
|
||||
"config": processConfig(readJsonBlob('''{
|
||||
"name" : "interop_summary_to_csv",
|
||||
"namespace" : "io",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "v0.1.1",
|
||||
"argument_groups" : [
|
||||
{
|
||||
"name" : "Input arguments",
|
||||
@@ -2921,7 +2947,7 @@ meta = [
|
||||
"id" : "docker",
|
||||
"image" : "debian:stable-slim",
|
||||
"target_registry" : "images.viash-hub.com",
|
||||
"target_tag" : "v0.1.0",
|
||||
"target_tag" : "v0.1.1",
|
||||
"namespace_separator" : "/",
|
||||
"setup" : [
|
||||
{
|
||||
@@ -2950,13 +2976,13 @@ meta = [
|
||||
"runner" : "nextflow",
|
||||
"engine" : "docker|native",
|
||||
"output" : "target/nextflow/io/interop_summary_to_csv",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"git_commit" : "3d229bef584233f228330ff881dad685b92bf1e1",
|
||||
"viash_version" : "0.9.0",
|
||||
"git_commit" : "5ad947dd1e6d6783ac7905d665036733a420731f",
|
||||
"git_remote" : "https://github.com/viash-hub/demultiplex"
|
||||
},
|
||||
"package_config" : {
|
||||
"name" : "demultiplex",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "v0.1.1",
|
||||
"description" : "Demultiplexing pipeline\n",
|
||||
"info" : {
|
||||
"test_resources" : [
|
||||
@@ -2966,14 +2992,14 @@ meta = [
|
||||
}
|
||||
]
|
||||
},
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"viash_version" : "0.9.0",
|
||||
"source" : "src",
|
||||
"target" : "target",
|
||||
"config_mods" : [
|
||||
".requirements.commands := ['ps']\n",
|
||||
".engines += { type: \\"native\\" }",
|
||||
".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'",
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
],
|
||||
"keywords" : [
|
||||
"bioinformatics",
|
||||
@@ -3115,7 +3141,11 @@ def vdsl3WorkflowFactory(Map args, Map meta, String rawScript) {
|
||||
val = val.join(par.multiple_sep)
|
||||
}
|
||||
if (par.direction == "output" && par.type == "file") {
|
||||
val = val.replaceAll('\\$id', id).replaceAll('\\$key', key)
|
||||
val = val
|
||||
.replaceAll('\\$id', id)
|
||||
.replaceAll('\\$\\{id\\}', id)
|
||||
.replaceAll('\\$key', key)
|
||||
.replaceAll('\\$\\{key\\}', key)
|
||||
}
|
||||
[parName, val]
|
||||
}
|
||||
@@ -3246,7 +3276,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def createParentStr = meta.config.allArguments
|
||||
.findAll { it.type == "file" && it.direction == "output" && it.create_parent }
|
||||
.collect { par ->
|
||||
"\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent \\\"\" + (args[\"${par.plainName}\"] instanceof String ? args[\"${par.plainName}\"] : args[\"${par.plainName}\"].join('\" \"')) + \"\\\"\" : \"\" }"
|
||||
def contents = "args[\"${par.plainName}\"] instanceof List ? args[\"${par.plainName}\"].join('\" \"') : args[\"${par.plainName}\"]"
|
||||
"\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent '\" + escapeText(${contents}) + \"'\" : \"\" }"
|
||||
}
|
||||
.join("\n")
|
||||
|
||||
@@ -3254,8 +3285,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def inputFileExports = meta.config.allArguments
|
||||
.findAll { it.type == "file" && it.direction.toLowerCase() == "input" }
|
||||
.collect { par ->
|
||||
def viash_par_contents = "(viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName})"
|
||||
"\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}=\\\"\" + ${viash_par_contents} + \"\\\"\"}"
|
||||
def contents = "viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName}"
|
||||
"\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}='\" + escapeText(${contents}) + \"'\"}"
|
||||
}
|
||||
|
||||
// NOTE: if using docker, use /tmp instead of tmpDir!
|
||||
@@ -3292,6 +3323,7 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def procStr =
|
||||
"""nextflow.enable.dsl=2
|
||||
|
|
||||
|def escapeText = { s -> s.toString().replaceAll("'", "'\\\"'\\\"'") }
|
||||
|process $procKey {$drctvStrs
|
||||
|input:
|
||||
| tuple val(id)$inputPaths, val(args), path(resourcesDir, stageAs: ".viash_meta_resources")
|
||||
@@ -3303,10 +3335,9 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
|$stub
|
||||
|\"\"\"
|
||||
|script:$assertStr
|
||||
|def escapeText = { s -> s.toString().replaceAll('([`"])', '\\\\\\\\\$1') }
|
||||
|def parInject = args
|
||||
| .findAll{key, value -> value != null}
|
||||
| .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}=\\\"\${escapeText(value)}\\\""}
|
||||
| .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}='\${escapeText(value)}'"}
|
||||
| .join("\\n")
|
||||
|\"\"\"
|
||||
|# meta exports
|
||||
@@ -3391,7 +3422,7 @@ meta["defaults"] = [
|
||||
"container" : {
|
||||
"registry" : "images.viash-hub.com",
|
||||
"image" : "vsh/demultiplex/io/interop_summary_to_csv",
|
||||
"tag" : "v0.1.0"
|
||||
"tag" : "v0.1.1"
|
||||
},
|
||||
"tag" : "$id"
|
||||
}'''),
|
||||
|
||||
@@ -2,7 +2,7 @@ manifest {
|
||||
name = 'io/interop_summary_to_csv'
|
||||
mainScript = 'main.nf'
|
||||
nextflowVersion = '!>=20.12.1-edge'
|
||||
version = 'v0.1.0'
|
||||
version = 'v0.1.1'
|
||||
}
|
||||
|
||||
process.container = 'nextflow/bash:latest'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: "untar"
|
||||
namespace: "io"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
argument_groups:
|
||||
- name: "Input arguments"
|
||||
arguments:
|
||||
@@ -130,7 +130,7 @@ engines:
|
||||
id: "docker"
|
||||
image: "debian:stable-slim"
|
||||
target_registry: "images.viash-hub.com"
|
||||
target_tag: "v0.1.0"
|
||||
target_tag: "v0.1.1"
|
||||
namespace_separator: "/"
|
||||
setup:
|
||||
- type: "apt"
|
||||
@@ -147,25 +147,25 @@ build_info:
|
||||
engine: "docker|native"
|
||||
output: "target/nextflow/io/untar"
|
||||
executable: "target/nextflow/io/untar/main.nf"
|
||||
viash_version: "0.9.0-RC6"
|
||||
git_commit: "3d229bef584233f228330ff881dad685b92bf1e1"
|
||||
viash_version: "0.9.0"
|
||||
git_commit: "5ad947dd1e6d6783ac7905d665036733a420731f"
|
||||
git_remote: "https://github.com/viash-hub/demultiplex"
|
||||
package_config:
|
||||
name: "demultiplex"
|
||||
version: "v0.1.0"
|
||||
version: "v0.1.1"
|
||||
description: "Demultiplexing pipeline\n"
|
||||
info:
|
||||
test_resources:
|
||||
- path: "https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NovaSeq6000/200624_A00834_0183_BHMTFYDRXX.tar.gz"
|
||||
dest: "test_resources"
|
||||
viash_version: "0.9.0-RC6"
|
||||
viash_version: "0.9.0"
|
||||
source: "src"
|
||||
target: "target"
|
||||
config_mods:
|
||||
- ".requirements.commands := ['ps']\n"
|
||||
- ".engines += { type: \"native\" }"
|
||||
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
- ".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
keywords:
|
||||
- "bioinformatics"
|
||||
- "sequence"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// untar v0.1.0
|
||||
// untar v0.1.1
|
||||
//
|
||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||
// Data Intuitive.
|
||||
// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative
|
||||
// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data
|
||||
// Intuitive.
|
||||
//
|
||||
// The component may contain files which fall under a different license. The
|
||||
// authors of this component should specify the license in the header of such
|
||||
@@ -760,8 +760,11 @@ def runEach(Map args) {
|
||||
def fromState_ = args.fromState
|
||||
def toState_ = args.toState
|
||||
def filter_ = args.filter
|
||||
def runIf_ = args.runIf
|
||||
def id_ = args.id
|
||||
|
||||
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||
|
||||
workflow runEachWf {
|
||||
take: input_ch
|
||||
main:
|
||||
@@ -783,7 +786,20 @@ def runEach(Map args) {
|
||||
[new_id] + tup.drop(1)
|
||||
}
|
||||
: filter_ch
|
||||
def data_ch = id_ch | map{tup ->
|
||||
def chPassthrough = null
|
||||
def chRun = null
|
||||
if (runIf_) {
|
||||
def idRunIfBranch = id_ch.branch{ tup ->
|
||||
run: runIf_(tup[0], tup[1], comp_)
|
||||
passthrough: true
|
||||
}
|
||||
chPassthrough = idRunIfBranch.passthrough
|
||||
chRun = idRunIfBranch.run
|
||||
} else {
|
||||
chRun = id_ch
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
def data_ch = chRun | map{tup ->
|
||||
def new_data = tup[1]
|
||||
if (fromState_ instanceof Map) {
|
||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||
@@ -821,8 +837,11 @@ def runEach(Map args) {
|
||||
[tup[0], new_state] + tup.drop(3)
|
||||
}
|
||||
: out_ch
|
||||
|
||||
def return_ch = post_ch
|
||||
| concat(chPassthrough)
|
||||
|
||||
post_ch
|
||||
return_ch
|
||||
}
|
||||
|
||||
// mix all results
|
||||
@@ -1598,8 +1617,8 @@ def findStates(Map params, Map config) {
|
||||
// construct renameMap
|
||||
if (args.rename_keys) {
|
||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||
def split = renameString.split(";")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
||||
def split = renameString.split(":")
|
||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||
split
|
||||
}
|
||||
|
||||
@@ -1709,7 +1728,9 @@ def publishStates(Map args) {
|
||||
|
||||
def yamlFilename = yamlTemplate_
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
|
||||
// TODO: do the pathnames in state_ match up with the outputFilenames_?
|
||||
|
||||
@@ -1780,7 +1801,9 @@ def publishStatesByConfig(Map args) {
|
||||
def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml'
|
||||
def yamlFilename = yamlTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent()
|
||||
|
||||
// the processed state is a list of [key, value, inputPath, outputFilename] tuples, where
|
||||
@@ -1822,7 +1845,9 @@ def publishStatesByConfig(Map args) {
|
||||
// instantiate the template
|
||||
def filename = filenameTemplate
|
||||
.replaceAll('\\$id', id_)
|
||||
.replaceAll('\\$\\{id\\}', id_)
|
||||
.replaceAll('\\$key', key_)
|
||||
.replaceAll('\\$\\{key\\}', key_)
|
||||
if (par.multiple) {
|
||||
// if the parameter is multiple: true, the filename
|
||||
// should contain a wildcard '*' that is replaced with
|
||||
@@ -2626,30 +2651,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
tuple
|
||||
}
|
||||
|
||||
def chModifiedFiltered = workflowArgs.filter ?
|
||||
chModified | filter{workflowArgs.filter(it)} :
|
||||
chModified
|
||||
|
||||
def chRun = null
|
||||
def chPassthrough = null
|
||||
if (workflowArgs.runIf) {
|
||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
||||
def runIfBranch = chModified.branch{ tup ->
|
||||
run: workflowArgs.runIf(tup[0], tup[1])
|
||||
passthrough: true
|
||||
}
|
||||
chRun = runIfBranch.run
|
||||
chPassthrough = runIfBranch.passthrough
|
||||
} else {
|
||||
chRun = chModifiedFiltered
|
||||
chRun = chModified
|
||||
chPassthrough = Channel.empty()
|
||||
}
|
||||
|
||||
def chRunFiltered = workflowArgs.filter ?
|
||||
chRun | filter{workflowArgs.filter(it)} :
|
||||
chRun
|
||||
|
||||
def chArgs = workflowArgs.fromState ?
|
||||
chRun | map{
|
||||
chRunFiltered | map{
|
||||
def new_data = workflowArgs.fromState(it.take(2))
|
||||
[it[0], new_data]
|
||||
} :
|
||||
chRun | map {tup -> tup.take(2)}
|
||||
chRunFiltered | map {tup -> tup.take(2)}
|
||||
|
||||
// fill in defaults
|
||||
def chArgsWithDefaults = chArgs
|
||||
@@ -2720,7 +2746,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||
|
||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
||||
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||
// output tuple format: [join_id, id, new_state, ...]
|
||||
| map{ tup ->
|
||||
@@ -2780,7 +2806,7 @@ meta = [
|
||||
"config": processConfig(readJsonBlob('''{
|
||||
"name" : "untar",
|
||||
"namespace" : "io",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "v0.1.1",
|
||||
"argument_groups" : [
|
||||
{
|
||||
"name" : "Input arguments",
|
||||
@@ -2940,7 +2966,7 @@ meta = [
|
||||
"id" : "docker",
|
||||
"image" : "debian:stable-slim",
|
||||
"target_registry" : "images.viash-hub.com",
|
||||
"target_tag" : "v0.1.0",
|
||||
"target_tag" : "v0.1.1",
|
||||
"namespace_separator" : "/",
|
||||
"setup" : [
|
||||
{
|
||||
@@ -2962,13 +2988,13 @@ meta = [
|
||||
"runner" : "nextflow",
|
||||
"engine" : "docker|native",
|
||||
"output" : "target/nextflow/io/untar",
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"git_commit" : "3d229bef584233f228330ff881dad685b92bf1e1",
|
||||
"viash_version" : "0.9.0",
|
||||
"git_commit" : "5ad947dd1e6d6783ac7905d665036733a420731f",
|
||||
"git_remote" : "https://github.com/viash-hub/demultiplex"
|
||||
},
|
||||
"package_config" : {
|
||||
"name" : "demultiplex",
|
||||
"version" : "v0.1.0",
|
||||
"version" : "v0.1.1",
|
||||
"description" : "Demultiplexing pipeline\n",
|
||||
"info" : {
|
||||
"test_resources" : [
|
||||
@@ -2978,14 +3004,14 @@ meta = [
|
||||
}
|
||||
]
|
||||
},
|
||||
"viash_version" : "0.9.0-RC6",
|
||||
"viash_version" : "0.9.0",
|
||||
"source" : "src",
|
||||
"target" : "target",
|
||||
"config_mods" : [
|
||||
".requirements.commands := ['ps']\n",
|
||||
".engines += { type: \\"native\\" }",
|
||||
".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'",
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.0'"
|
||||
".engines[.type == 'docker'].target_tag := 'v0.1.1'"
|
||||
],
|
||||
"keywords" : [
|
||||
"bioinformatics",
|
||||
@@ -3157,7 +3183,11 @@ def vdsl3WorkflowFactory(Map args, Map meta, String rawScript) {
|
||||
val = val.join(par.multiple_sep)
|
||||
}
|
||||
if (par.direction == "output" && par.type == "file") {
|
||||
val = val.replaceAll('\\$id', id).replaceAll('\\$key', key)
|
||||
val = val
|
||||
.replaceAll('\\$id', id)
|
||||
.replaceAll('\\$\\{id\\}', id)
|
||||
.replaceAll('\\$key', key)
|
||||
.replaceAll('\\$\\{key\\}', key)
|
||||
}
|
||||
[parName, val]
|
||||
}
|
||||
@@ -3288,7 +3318,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def createParentStr = meta.config.allArguments
|
||||
.findAll { it.type == "file" && it.direction == "output" && it.create_parent }
|
||||
.collect { par ->
|
||||
"\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent \\\"\" + (args[\"${par.plainName}\"] instanceof String ? args[\"${par.plainName}\"] : args[\"${par.plainName}\"].join('\" \"')) + \"\\\"\" : \"\" }"
|
||||
def contents = "args[\"${par.plainName}\"] instanceof List ? args[\"${par.plainName}\"].join('\" \"') : args[\"${par.plainName}\"]"
|
||||
"\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent '\" + escapeText(${contents}) + \"'\" : \"\" }"
|
||||
}
|
||||
.join("\n")
|
||||
|
||||
@@ -3296,8 +3327,8 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def inputFileExports = meta.config.allArguments
|
||||
.findAll { it.type == "file" && it.direction.toLowerCase() == "input" }
|
||||
.collect { par ->
|
||||
def viash_par_contents = "(viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName})"
|
||||
"\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}=\\\"\" + ${viash_par_contents} + \"\\\"\"}"
|
||||
def contents = "viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName}"
|
||||
"\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}='\" + escapeText(${contents}) + \"'\"}"
|
||||
}
|
||||
|
||||
// NOTE: if using docker, use /tmp instead of tmpDir!
|
||||
@@ -3334,6 +3365,7 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
def procStr =
|
||||
"""nextflow.enable.dsl=2
|
||||
|
|
||||
|def escapeText = { s -> s.toString().replaceAll("'", "'\\\"'\\\"'") }
|
||||
|process $procKey {$drctvStrs
|
||||
|input:
|
||||
| tuple val(id)$inputPaths, val(args), path(resourcesDir, stageAs: ".viash_meta_resources")
|
||||
@@ -3345,10 +3377,9 @@ def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) {
|
||||
|$stub
|
||||
|\"\"\"
|
||||
|script:$assertStr
|
||||
|def escapeText = { s -> s.toString().replaceAll('([`"])', '\\\\\\\\\$1') }
|
||||
|def parInject = args
|
||||
| .findAll{key, value -> value != null}
|
||||
| .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}=\\\"\${escapeText(value)}\\\""}
|
||||
| .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}='\${escapeText(value)}'"}
|
||||
| .join("\\n")
|
||||
|\"\"\"
|
||||
|# meta exports
|
||||
@@ -3433,7 +3464,7 @@ meta["defaults"] = [
|
||||
"container" : {
|
||||
"registry" : "images.viash-hub.com",
|
||||
"image" : "vsh/demultiplex/io/untar",
|
||||
"tag" : "v0.1.0"
|
||||
"tag" : "v0.1.1"
|
||||
},
|
||||
"tag" : "$id"
|
||||
}'''),
|
||||
|
||||
@@ -2,7 +2,7 @@ manifest {
|
||||
name = 'io/untar'
|
||||
mainScript = 'main.nf'
|
||||
nextflowVersion = '!>=20.12.1-edge'
|
||||
version = 'v0.1.0'
|
||||
version = 'v0.1.1'
|
||||
description = 'Unpack a .tar file. When the contents of the .tar file is just a single directory,\nput the contents of the directory into the output folder instead of that directory.\n'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user