mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-25 22:09:55 +00:00
Add nanopore channel
This commit is contained in:
parent
0f0ed6cd46
commit
41b3d8db82
1 changed files with 17 additions and 4 deletions
|
@ -20,10 +20,15 @@ workflow INPUT_CHECK {
|
||||||
}
|
}
|
||||||
|
|
||||||
parsed_samplesheet.fastq
|
parsed_samplesheet.fastq
|
||||||
.map { create_fastq_channels(it) }
|
.map { create_fastq_channel(it) }
|
||||||
.dump(tag: "fastq_channel_init")
|
.dump(tag: "fastq_channel_init")
|
||||||
.set { fastq }
|
.set { fastq }
|
||||||
|
|
||||||
|
parsed_samplesheet.nanopore
|
||||||
|
.map { create_fastq_channel(it) }
|
||||||
|
.dump(tag: "fastq_nanopore_channel_init")
|
||||||
|
.set { nanopore }
|
||||||
|
|
||||||
parsed_samplesheet.fasta
|
parsed_samplesheet.fasta
|
||||||
.map { create_fasta_channels(it) }
|
.map { create_fasta_channels(it) }
|
||||||
.dump(tag: "fasta_channel_init")
|
.dump(tag: "fasta_channel_init")
|
||||||
|
@ -31,6 +36,7 @@ workflow INPUT_CHECK {
|
||||||
|
|
||||||
emit:
|
emit:
|
||||||
fastq // channel: [ val(meta), [ reads ] ]
|
fastq // channel: [ val(meta), [ reads ] ]
|
||||||
|
nanopore // channel: [ val(meta), [ reads ] ]
|
||||||
fasta // channel: [ val(meta), fasta ]
|
fasta // channel: [ val(meta), fasta ]
|
||||||
versions = SAMPLESHEET_CHECK.out.versions // channel: [ versions.yml ]
|
versions = SAMPLESHEET_CHECK.out.versions // channel: [ versions.yml ]
|
||||||
}
|
}
|
||||||
|
@ -51,12 +57,19 @@ def create_fastq_channel(LinkedHashMap row) {
|
||||||
}
|
}
|
||||||
if (meta.single_end) {
|
if (meta.single_end) {
|
||||||
fastq_meta = [ meta, [ file(row.fastq_1) ] ]
|
fastq_meta = [ meta, [ file(row.fastq_1) ] ]
|
||||||
|
} else {
|
||||||
|
if (meta.instrument_platform == 'OXFORD_NANOPORE') {
|
||||||
|
if (row.fastq_2 != '') {
|
||||||
|
exit 1, "ERROR: Please check input samplesheet -> For Oxford Nanopore reads Read 2 FastQ should be empty!\n${row.fastq_2}"
|
||||||
|
}
|
||||||
|
fastq_meta = [ meta, [ file(row.fastq_1) ] ]
|
||||||
} else {
|
} else {
|
||||||
if (!file(row.fastq_2).exists()) {
|
if (!file(row.fastq_2).exists()) {
|
||||||
exit 1, "ERROR: Please check input samplesheet -> Read 2 FastQ file does not exist!\n${row.fastq_2}"
|
exit 1, "ERROR: Please check input samplesheet -> Read 2 FastQ file does not exist!\n${row.fastq_2}"
|
||||||
}
|
}
|
||||||
fastq_meta = [ meta, [ file(row.fastq_1), file(row.fastq_2) ] ]
|
fastq_meta = [ meta, [ file(row.fastq_1), file(row.fastq_2) ] ]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return fastq_meta
|
return fastq_meta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue