Build branch main with version main (6e6be28)

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

Source commit: 6e6be28b85

Source message: Prepare CHANGELOG for release 0.2.0
This commit is contained in:
CI
2024-12-05 10:37:33 +00:00
parent 304b1d24b3
commit fcc3a4d62e
44 changed files with 5504 additions and 256 deletions

View File

@@ -19,7 +19,7 @@ argument_groups:
create_parent: true
required: true
direction: "input"
multiple: false
multiple: true
multiple_sep: ";"
- type: "file"
name: "--reverse_input"
@@ -28,7 +28,7 @@ argument_groups:
create_parent: true
required: false
direction: "input"
multiple: false
multiple: true
multiple_sep: ";"
- name: "Output arguments"
arguments:
@@ -139,9 +139,9 @@ build_info:
output: "target/nextflow/dataflow/combine_samples"
executable: "target/nextflow/dataflow/combine_samples/main.nf"
viash_version: "0.9.0"
git_commit: "5cb13230bf682321226addce896a3015e8864913"
git_remote: "https://x-access-token:ghs_x4A4kChpmjRCoWA3E68PwNsGJxIsF40DBeTf@github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-3-g5cb1323"
git_commit: "6e6be28b85ab619214ae05a017a33498c0dc8890"
git_remote: "https://x-access-token:ghs_iopCikoFK5KlWGbHHLIwAf82AMtbiI0fzew1@github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-5-g6e6be28"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -2827,7 +2827,7 @@ meta = [
"create_parent" : true,
"required" : true,
"direction" : "input",
"multiple" : false,
"multiple" : true,
"multiple_sep" : ";"
},
{
@@ -2837,7 +2837,7 @@ meta = [
"create_parent" : true,
"required" : false,
"direction" : "input",
"multiple" : false,
"multiple" : true,
"multiple_sep" : ";"
}
]
@@ -2972,9 +2972,9 @@ meta = [
"engine" : "native|native",
"output" : "target/nextflow/dataflow/combine_samples",
"viash_version" : "0.9.0",
"git_commit" : "5cb13230bf682321226addce896a3015e8864913",
"git_remote" : "https://x-access-token:ghs_x4A4kChpmjRCoWA3E68PwNsGJxIsF40DBeTf@github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-3-g5cb1323"
"git_commit" : "6e6be28b85ab619214ae05a017a33498c0dc8890",
"git_remote" : "https://x-access-token:ghs_iopCikoFK5KlWGbHHLIwAf82AMtbiI0fzew1@github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-5-g6e6be28"
},
"package_config" : {
"name" : "demultiplex",
@@ -3031,8 +3031,8 @@ workflow run_wf {
| groupTuple(by: 0, sort: "hash")
| map {run_id, states ->
// Gather the following state for all samples
def forward_fastqs = states.collect{it.forward_input}
def reverse_fastqs = states.collect{it.reverse_input}.findAll{it != null}
def forward_fastqs = states.collect{it.forward_input}.flatten()
def reverse_fastqs = states.collect{it.reverse_input}.findAll{it != null}.flatten()
def resultState = [
"output_forward": forward_fastqs,

View File

@@ -27,8 +27,8 @@
"forward_input": {
"type":
"string",
"description": "Type: `file`, required. ",
"help_text": "Type: `file`, required. "
"description": "Type: List of `file`, required, multiple_sep: `\";\"`. ",
"help_text": "Type: List of `file`, required, multiple_sep: `\";\"`. "
}
@@ -37,8 +37,8 @@
"reverse_input": {
"type":
"string",
"description": "Type: `file`. ",
"help_text": "Type: `file`. "
"description": "Type: List of `file`, multiple_sep: `\";\"`. ",
"help_text": "Type: List of `file`, multiple_sep: `\";\"`. "
}
@@ -60,7 +60,7 @@
"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_*"
"default":"$id.$key.output_forward_*.output_forward_*"
}
@@ -71,7 +71,7 @@
"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_*"
"default":"$id.$key.output_reverse_*.output_reverse_*"
}

View File

@@ -33,7 +33,7 @@ argument_groups:
create_parent: true
required: true
direction: "output"
multiple: false
multiple: true
multiple_sep: ";"
- type: "file"
name: "--fastq_reverse"
@@ -42,7 +42,7 @@ argument_groups:
create_parent: true
required: false
direction: "output"
multiple: false
multiple: true
multiple_sep: ";"
resources:
- type: "nextflow_script"
@@ -133,9 +133,9 @@ build_info:
output: "target/nextflow/dataflow/gather_fastqs_and_validate"
executable: "target/nextflow/dataflow/gather_fastqs_and_validate/main.nf"
viash_version: "0.9.0"
git_commit: "5cb13230bf682321226addce896a3015e8864913"
git_remote: "https://x-access-token:ghs_x4A4kChpmjRCoWA3E68PwNsGJxIsF40DBeTf@github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-3-g5cb1323"
git_commit: "6e6be28b85ab619214ae05a017a33498c0dc8890"
git_remote: "https://x-access-token:ghs_iopCikoFK5KlWGbHHLIwAf82AMtbiI0fzew1@github.com/viash-hub/demultiplex"
git_tag: "v0.1.1-5-g6e6be28"
package_config:
name: "demultiplex"
version: "main"

View File

@@ -2845,7 +2845,7 @@ meta = [
"create_parent" : true,
"required" : true,
"direction" : "output",
"multiple" : false,
"multiple" : true,
"multiple_sep" : ";"
},
{
@@ -2855,7 +2855,7 @@ meta = [
"create_parent" : true,
"required" : false,
"direction" : "output",
"multiple" : false,
"multiple" : true,
"multiple_sep" : ";"
}
]
@@ -2965,9 +2965,9 @@ meta = [
"engine" : "native|native",
"output" : "target/nextflow/dataflow/gather_fastqs_and_validate",
"viash_version" : "0.9.0",
"git_commit" : "5cb13230bf682321226addce896a3015e8864913",
"git_remote" : "https://x-access-token:ghs_x4A4kChpmjRCoWA3E68PwNsGJxIsF40DBeTf@github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-3-g5cb1323"
"git_commit" : "6e6be28b85ab619214ae05a017a33498c0dc8890",
"git_remote" : "https://x-access-token:ghs_iopCikoFK5KlWGbHHLIwAf82AMtbiI0fzew1@github.com/viash-hub/demultiplex",
"git_tag" : "v0.1.1-5-g6e6be28"
},
"package_config" : {
"name" : "demultiplex",
@@ -3027,9 +3027,11 @@ workflow run_wf {
def original_id = id
// Parse sample sheet for sample IDs
println "Processing run information file ${sample_sheet}"
csv_lines = sample_sheet.splitCsv(header: false, sep: ',')
csv_lines.any { csv_items ->
if (csv_items.isEmpty()) {
// skip empty line
return
}
def possible_header = csv_items[0]
@@ -3037,22 +3039,40 @@ workflow run_wf {
if (header) {
if (start_parsing) {
// Stop parsing when encountering the next header
println "Encountered next header '[${start_parsing}]', stopping parsing."
return true
}
if (header == "Data") {
// [Data] for illumina
// [Samples] for Element Biosciences
if (header in ["Data", "Samples"]) {
println "Found header [${header}], start parsing."
start_parsing = true
return
}
}
if (start_parsing) {
if ( !sample_id_column_index ) {
sample_id_column_index = csv_items.findIndexValues{it == "Sample_ID"}
assert sample_id_column_index != -1:
"Could not find column 'Sample_ID' in sample sheet!"
if ( sample_id_column_index == null) {
println "Looking for sample name column."
sample_id_column_index = csv_items.findIndexValues{it == "Sample_ID" || it == "SampleName"}
assert (!sample_id_column_index.isEmpty()):
"Could not find column 'Sample_ID' (Illumina) or 'SampleName' " +
"(Element Biosciences) in run information! Found: ${sample_id_column_index}"
assert sample_id_column_index.size() == 1, "Expected run information file to contain " +
"a column 'Sample_ID' or 'SampleName', not both. Found: ${sample_id_column_index}"
sample_id_column_index = sample_id_column_index[0]
println "Found sample names column '${csv_items[sample_id_column_index]}'."
return
}
samples += csv_items[sample_id_column_index]
}
// This return is important! (If 'true' is returned, the parsing stops.)
return
}
assert start_parsing:
"Sample information file does not contain [Data] or [Samples] header!"
assert samples.size() > 1:
"Sample information file does not seem to contain any information about the samples!"
println "Finished processing run information file, found samples: ${samples}."
println "Looking for fastq files in ${state.input}."
def allfastqs = state.input.listFiles().findAll{it.isFile() && it.name ==~ /^.+\.fastq.gz$/}
println "Found ${allfastqs.size()} fastq files, matching them to the following samples: ${samples}."
@@ -3061,17 +3081,15 @@ workflow run_wf {
def reverse_regex = ~/^${sample_id}_S(\d+)_(L(\d+)_)?R2_(\d+)\.fastq\.gz$/
def forward_fastq = state.input.listFiles().findAll{it.isFile() && it.name ==~ forward_regex}
def reverse_fastq = state.input.listFiles().findAll{it.isFile() && it.name ==~ reverse_regex}
assert forward_fastq : "No forward fastq files were found for sample ${sample_id}"
assert forward_fastq.size() < 2:
"Found multiple forward fastq files corresponding to sample ${sample_id}: ${forward_fastq}"
assert reverse_fastq.size() < 2:
"Found multiple reverse fastq files corresponding to sample ${sample_id}: ${reverse_fastq}."
assert !forward_fastq.isEmpty():
"Expected a forward fastq file to have been created correspondig to sample ${sample_id}."
// TODO: if one sample had reverse reads, the others must as well.
reverse_fastq = !reverse_fastq.isEmpty() ? reverse_fastq[0] : null
assert forward_fastq && !forward_fastq.isEmpty(): "No forward fastq files were found for sample ${sample_id}. " +
"All fastq files in directory: ${allfastqs.collect{it.name}}"
assert (reverse_fastq.isEmpty() || (forward_fastq.size() == reverse_fastq.size())):
"Expected equal number of forward and reverse fastq files for sample ${sample_id}. " +
"Found forward: ${forward_fastq} and reverse: ${reverse_fastq}."
println "Found ${forward_fastq.size()} forward and ${reverse_fastq.size()} reverse " +
"fastq files for sample ${sample_id}"
def fastqs_state = [
"fastq_forward": forward_fastq[0],
"fastq_forward": forward_fastq,
"fastq_reverse": reverse_fastq,
"_meta": [ "join_id": original_id ],
]

View File

@@ -47,10 +47,10 @@
"fastq_forward": {
"type":
"string",
"description": "Type: `file`, required, default: `$id.$key.fastq_forward.fastq_forward`. ",
"help_text": "Type: `file`, required, default: `$id.$key.fastq_forward.fastq_forward`. "
"description": "Type: List of `file`, required, default: `$id.$key.fastq_forward_*.fastq_forward_*`, multiple_sep: `\";\"`. ",
"help_text": "Type: List of `file`, required, default: `$id.$key.fastq_forward_*.fastq_forward_*`, multiple_sep: `\";\"`. "
,
"default": "$id.$key.fastq_forward.fastq_forward"
"default":"$id.$key.fastq_forward_*.fastq_forward_*"
}
@@ -58,10 +58,10 @@
"fastq_reverse": {
"type":
"string",
"description": "Type: `file`, default: `$id.$key.fastq_reverse.fastq_reverse`. ",
"help_text": "Type: `file`, default: `$id.$key.fastq_reverse.fastq_reverse`. "
"description": "Type: List of `file`, default: `$id.$key.fastq_reverse_*.fastq_reverse_*`, multiple_sep: `\";\"`. ",
"help_text": "Type: List of `file`, default: `$id.$key.fastq_reverse_*.fastq_reverse_*`, multiple_sep: `\";\"`. "
,
"default": "$id.$key.fastq_reverse.fastq_reverse"
"default":"$id.$key.fastq_reverse_*.fastq_reverse_*"
}