Skip to content

Commit

Permalink
fix: Allow no RGI in annotation tools (#194)
Browse files Browse the repository at this point in the history
Sets output to a variable which is empty at the start so a user can
still run the annotation workflow and choose to not run RGI.
  • Loading branch information
jvfe authored May 20, 2024
1 parent faf67de commit 8b23ba7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions subworkflows/local/annotation.nf
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,17 @@ workflow ANNOTATE_ASSEMBLIES {
/*
* Run RGI
*/
rgi_out = Channel.empty()
if (tools_to_run.contains('rgi')) {
RGI(ch_ffn_files, ch_card_json)

RGI.out.tsv
.set{ rgi_out }

ch_software_versions = ch_software_versions.mix(RGI.out.version.first().ifEmpty(null))

FILTER_RGI(
RGI.out.tsv.collect{ id, paths -> paths },
rgi_out.collect{ id, paths -> paths },
"RGI",
"no_header",
min_pident,
Expand Down Expand Up @@ -359,6 +364,6 @@ workflow ANNOTATE_ASSEMBLIES {
gff = ch_gff_files
feature_profile = profile
gbk = ch_gbk_files
rgi = RGI.out.tsv
rgi = rgi_out

}

0 comments on commit 8b23ba7

Please sign in to comment.