From 98cfb70d7331571fb89a0b74ed0623f549ff01fc Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Thu, 9 Apr 2020 09:15:28 +0200 Subject: [PATCH] ecopcr: made some errors more informative --- python/obitools3/version.py | 2 +- src/obi_ecopcr.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/python/obitools3/version.py b/python/obitools3/version.py index 3c0fbba..6c7706d 100755 --- a/python/obitools3/version.py +++ b/python/obitools3/version.py @@ -1,5 +1,5 @@ major = 3 minor = 0 -serial= '0-beta12a' +serial= '0-beta12b' version ="%d.%02d.%s" % (major,minor,serial) diff --git a/src/obi_ecopcr.c b/src/obi_ecopcr.c index 1ab7876..dbfa6cb 100755 --- a/src/obi_ecopcr.c +++ b/src/obi_ecopcr.c @@ -431,19 +431,19 @@ static int print_seq(Obiview_p i_view, Obiview_p o_view, if (isnan(tm2)) tm2 = OBIFloat_NA; - // Get the taxon structure - main_taxon = obi_taxo_get_taxon_with_taxid(taxonomy, taxid); - if (main_taxon == NULL) - { - obidebug(1, "\nError reading the taxonomic information of a sequence"); - return -1; - } - // Write sequence id seq_id = obi_get_str_with_elt_idx_and_col_p_in_view(i_view, i_id_column, i_idx, 0); if (obi_set_str_with_elt_idx_and_col_p_in_view(o_view, o_id_column, o_idx, 0, seq_id) < 0) { - obidebug(1, "\nError writing the sequence id"); + obidebug(1, "\nError writing the sequence id (%s)", seq_id); + return -1; + } + + // Get the taxon structure + main_taxon = obi_taxo_get_taxon_with_taxid(taxonomy, taxid); + if (main_taxon == NULL) + { + obidebug(1, "\nError reading the taxonomic information of a sequence, sequence id: %s, taxid: %d", seq_id, taxid); return -1; }