diff --git a/CholerAegon.nf b/CholerAegon.nf index 29fa359..f2a585e 100644 --- a/CholerAegon.nf +++ b/CholerAegon.nf @@ -96,13 +96,15 @@ process prepare_fasta { input: tuple val(name), path(fasta) output: - tuple val(name), path("fixed_names/${name}.fasta") + tuple val(name), val("pre-assembled"), path("fixed_names/${name}.fasta") shell: ''' - mkdir fixed_name + mkdir fixed_names for F in *.fa *.fasta *.fna; do if [ -e "$F" ]; then - ln -s $F fixed_names/!{name}.fasta + ln -s ../$F fixed_names/!{name}.fasta + fi + done ''' } @@ -444,13 +446,20 @@ process summary_report { input: path(amr_results) - path(fastani_results) + file(fastani_results) output: path("CholerAegon_summary_report_*.html") script: - """ - summary_report.py --amr_results ${amr_results} --fastani_results ${fastani_results} - """ + if (params.genome_reference) { + """ + summary_report.py --amr_results ${amr_results} --fastani_results ${fastani_results} + """ + } + else { + """ + summary_report.py --amr_results ${amr_results} + """ + } } diff --git a/bin/summary_report.py b/bin/summary_report.py index ce50638..df09da8 100755 --- a/bin/summary_report.py +++ b/bin/summary_report.py @@ -358,6 +358,8 @@ def stringify(strlst): self.predictiondataraw['Drug class resistances'] = data['DRUG_CLASS_RESISTANCES'] def drugs_markup(str): + if str == '.': + return str drugs = str.split(';') drugs_f = [] for d in drugs: