From a166a169cf9ec37fdd0ec3096c0d628bfab642e8 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Thu, 17 May 2018 14:53:53 +0200 Subject: [PATCH] obi ngsfilter: fixed a bug with -u option --- python/obitools3/commands/ngsfilter.pyx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/obitools3/commands/ngsfilter.pyx b/python/obitools3/commands/ngsfilter.pyx index 3d5521d..6fc320c 100644 --- a/python/obitools3/commands/ngsfilter.pyx +++ b/python/obitools3/commands/ngsfilter.pyx @@ -353,20 +353,22 @@ def run(config): info_view = info_input[1] # Open the unidentified view - if config['ngsfilter']['unidentified'] is not None: + if 'unidentified' in config['ngsfilter'] and config['ngsfilter']['unidentified'] is not None: # TODO keyError if undefined problem unidentified_input = open_uri(config['ngsfilter']['unidentified'], input=False, newviewtype=View_NUC_SEQS) if unidentified_input is None: raise Exception("Could not open the view containing the unidentified reads") unidentified = unidentified_input[1] + else: + unidentified = None # Initialize the progress bar pb = ProgressBar(len(entries), config, seconde=5) # Check and store primers and tags infos = read_info_view(info_view, error=config['ngsfilter']['error']) - + g = 0 u = 0 i = 0