@@ -143,7 +143,7 @@ workflow INPUT_CHECK {
143143 ch_databases. blastx,
144144 ch_databases. blastn,
145145 ch_databases. taxdump,
146- ch_parsed_busco. map { meta , path -> [meta, path] } . groupTuple ()
146+ ch_parsed_busco. toList ()
147147 )
148148 ch_versions = ch_versions. mix(GENERATE_CONFIG . out. versions. first())
149149
@@ -178,6 +178,16 @@ workflow INPUT_CHECK {
178178 ch_parsed_csv. busco_lineage
179179 | collect
180180 | set { ch_busco_lineages }
181+ ch_busco_lineages. view()
182+ ch_parsed_busco. view()
183+
184+ // Remove any invalid lineages from busco_outputs
185+ ch_busco_lineages_list = ch_busco_lineages. flatten()
186+ ch_parsed_busco_filtered = ch_parsed_busco
187+ .filter { meta, path ->
188+ ch_busco_lineages. contains(meta. lineage)
189+ }
190+ ch_parsed_busco_filtered = ch_parsed_busco_filtered. ifEmpty { Channel . empty() }
181191
182192 emit :
183193 reads // channel: [ val(meta), path(datafile) ]
@@ -189,7 +199,7 @@ workflow INPUT_CHECK {
189199 blastn = ch_databases. blastn // channel: [ val(meta), path(blastn_db) ]
190200 blastp = ch_databases. blastp // channel: [ val(meta), path(blastp_db) ]
191201 blastx = ch_databases. blastx // channel: [ val(meta), path(blastx_db) ]
192- busco_output = Channel . empty() // channel: [ val(meta), path(busco_output) ]
202+ busco_output = ch_parsed_busco_filtered // channel: [ val(meta), path(busco_output) ]
193203 busco_db = ch_databases. busco. map { _, db_path -> db_path } // channel: [ path(busco_db) ]
194204 taxdump = ch_databases. taxdump. map { _, db_path -> db_path } // channel: [ path(taxdump) ]
195205 versions = ch_versions // channel: [ versions.yml ]
0 commit comments