Skip to content

Commit 254ad04

Browse files
committed
Fix prepare_genome subworkflow for sortmerna
1 parent 1e383e2 commit 254ad04

File tree

1 file changed

+5
-3
lines changed
  • subworkflows/local/prepare_genome

1 file changed

+5
-3
lines changed

subworkflows/local/prepare_genome/main.nf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,18 @@ workflow PREPARE_GENOME {
233233
if ('sortmerna' in prepare_tool_indices) {
234234
ribo_db = file(sortmerna_fasta_list)
235235

236+
// SortMeRNA needs the rRNAs even if we're providing the index
237+
ch_rrna_fastas = Channel.from(ribo_db.readLines())
238+
.map { row -> file(row, checkIfExists: true) }
239+
236240
if (sortmerna_index) {
237241
if (sortmerna_index.endsWith('.tar.gz')) {
238242
ch_sortmerna_index = UNTAR_SORTMERNA_INDEX ( [ [:], sortmerna_index ] ).untar.map { it[1] }
239243
ch_versions = ch_versions.mix(UNTAR_SORTMERNA_INDEX.out.versions)
240244
} else {
241-
ch_sortmerna_index = Channel.value(file(sortmerna_index))
245+
ch_sortmerna_index = Channel.value([[:], file(sortmerna_index)])
242246
}
243247
} else {
244-
ch_rrna_fastas = Channel.from(ribo_db.readLines())
245-
.map { row -> file(row, checkIfExists: true) }
246248

247249
SORTMERNA_INDEX (
248250
Channel.of([ [],[] ]),

0 commit comments

Comments
 (0)