From db2202c8b4e8412d83f5a354f6cec663ba2c4d59 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Thu, 30 Jul 2020 16:14:37 +0200 Subject: [PATCH] uniq: added a check to make sure that there is more than one element for one tag when merging its information --- python/obitools3/commands/uniq.pyx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/obitools3/commands/uniq.pyx b/python/obitools3/commands/uniq.pyx index 15ff5d3..b733450 100644 --- a/python/obitools3/commands/uniq.pyx +++ b/python/obitools3/commands/uniq.pyx @@ -354,6 +354,9 @@ cdef uniq_sequences(View_NUC_SEQS view, View_NUC_SEQS o_view, ProgressBar pb, di key = mergedKeys[k] merged_col_name = mergedKeys_m[k] + if merged_infos[merged_col_name]['nb_elts'] == 1: + raise Exception("Can't merge information from a tag with only one element (e.g. one sample ; don't use -m option)") + if merged_col_name in view: i_col = view[merged_col_name] else: