From d4e4deb0c1d1d4e0dab22e4f4a19fa7e7c680013 Mon Sep 17 00:00:00 2001 From: Lauren Coombe Date: Tue, 12 Sep 2023 12:57:17 -0700 Subject: [PATCH] Bugfix for cases where there are no output paths, and overlap=True (#100) --- bin/ntjoin_assemble.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/ntjoin_assemble.py b/bin/ntjoin_assemble.py index 922e91d..c5144ef 100755 --- a/bin/ntjoin_assemble.py +++ b/bin/ntjoin_assemble.py @@ -722,6 +722,8 @@ def adjust_for_trimming(self, fasta_filename, paths): mx_info = defaultdict(dict) # path_index -> mx -> pos mxs = {} # path_index -> [mx] cur_path_index = 0 + if not paths: + return # If list of paths is empty cur_valid_segments = {f"{node.contig}_{node.start}_{node.end}" for node in paths[cur_path_index]} with btllib.Indexlr(fasta_filename, self.args.overlap_k, self.args.overlap_w,