Skip to content

Commit 2d8b238

Browse files
committed
Make it so deepBGC actually produces otutput, and START send only long fastas taxonom results to BGC
1 parent 8f1c7ba commit 2d8b238

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

conf/test_bgc.config

+4
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,8 @@ params {
2828
run_arg_screening = false
2929
run_amp_screening = false
3030
run_bgc_screening = true
31+
32+
// Set scores so deepBGC can actually find a hit so comBGC is actually executed
33+
bgc_deepbgc_score = 0.1
34+
3135
}

workflows/funcscan.nf

+9-5
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ workflow FUNCSCAN {
120120
.map{ meta, file -> [ meta + [id: meta.id + '_long', length: "long" ], file ] }
121121
.filter{
122122
meta, fasta ->
123+
if ( fasta.isEmpty() ) { log.warn("[nf-core/funcscan] The following sample did not contain contigs longer than ${params.contig_qc_lengththreshold} BGC screening will not be executed: ${meta.id}") }
123124
!fasta.isEmpty()
124125
}
125126

@@ -178,7 +179,7 @@ workflow FUNCSCAN {
178179
.mix(ch_intermediate_input.preannotated)
179180
.map {
180181
meta, fasta, faa, gbk ->
181-
if ( params.run_bgc_screening && meta.length == null ) { log.warn("[nf-core/funcscan] Pre-annotated input will not be filtered to long contigs for BGC screening! Expect long-run times and/or possible crashes if includes very short contigs") }
182+
if ( params.run_bgc_screening && meta.length == null ) { log.warn("[nf-core/funcscan] Pre-annotated input will not be filtered to long contigs for BGC screening! Expect long-run times and/or possible crashes if includes very short contigs. Sample: ${meta.id}") }
182183
[meta, fasta, faa, gbk]
183184
}
184185
.multiMap {
@@ -313,6 +314,9 @@ workflow FUNCSCAN {
313314
BGCs
314315
*/
315316
if ( params.run_bgc_screening && !params.run_taxa_classification ) {
317+
318+
ch_filtered_taxonomytsv_for_bgc = ch_taxonomy_tsv.dump(tag: 'ch_taxonomy_tsv_for_bgc.tsv')
319+
316320
BGC (
317321
ch_prepped_input_long.fastas,
318322
ch_prepped_input_long.faas
@@ -327,19 +331,19 @@ workflow FUNCSCAN {
327331
if ( file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced produced an empty GBK file. BGC screening tools requiring this file will not be executed: ${meta.id}")
328332
!file.isEmpty()
329333
},
330-
ch_taxonomy_tsv
334+
ch_filtered_taxonomytsv_for_bgc
331335
)
332336
ch_versions = ch_versions.mix( BGC.out.versions )
333337
} else if ( params.run_bgc_screening && params.run_taxa_classification ) {
334338
BGC (
335-
ch_prepped_input.fastas,
336-
ch_prepped_input.faas
339+
ch_prepped_input_long.fastas,
340+
ch_prepped_input_long.faas
337341
.filter {
338342
meta, file ->
339343
if ( file != [] && file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced produced an empty FAA file. BGC screening tools requiring this file will not be executed: ${meta.id}")
340344
!file.isEmpty()
341345
},
342-
ch_prepped_input.gbks
346+
ch_prepped_input_long.gbks
343347
.filter {
344348
meta, file ->
345349
if ( file != [] && file.isEmpty() ) log.warn("[nf-core/funcscan] Annotation of following sample produced an empty GBK file. BGC screening tools requiring this file will not be executed: ${meta.id}")

0 commit comments

Comments
 (0)