C: build_reference_db: made some errors more explicit

This commit is contained in:
Celine Mercier
2019-03-30 15:11:49 +01:00
parent ee9947217c
commit 9fcebd7643

10
src/build_reference_db.c Executable file → Normal file
View File

@ -226,7 +226,7 @@ int build_reference_db(const char* dms_name,
taxon1 = obi_taxo_get_taxon_with_taxid(tax, taxid1);
if (taxon1 == NULL)
{
obidebug(1, "\nError getting a taxon when building a reference database");
obidebug(1, "\nError getting a taxon with taxid %d when building a reference database", taxid1);
return -1;
}
@ -236,7 +236,7 @@ int build_reference_db(const char* dms_name,
taxon2 = obi_taxo_get_taxon_with_taxid(tax, taxid2);
if (taxon2 == NULL)
{
obidebug(1, "\nError getting a taxon when building a reference database");
obidebug(1, "\nError getting a taxon with taxid %d when building a reference database", taxid2);
return -1;
}
@ -248,6 +248,10 @@ int build_reference_db(const char* dms_name,
return -1;
}
taxid_lca = lca->taxid;
if (taxid_lca == 2558200)
{
fprintf(stderr, "\ntaxid1 %d, taxid2 %d\n", taxid1, taxid2);
}
if (obi_set_int_with_elt_idx_and_col_p_in_view(matrix_with_lca_view, matrix_lca_taxid_column, i, 0, taxid_lca) < 0)
{
obidebug(1, "\nError writing the last common ancestor of two taxa when building a reference database");
@ -346,7 +350,7 @@ int build_reference_db(const char* dms_name,
lca = obi_taxo_get_taxon_with_taxid(tax, taxid_lca);
if (lca == NULL)
{
obidebug(1, "\nError getting a LCA from taxid when building a reference database");
obidebug(1, "\nError getting a LCA from taxid when building a reference database, taxid %d", taxid_lca);
return -1;
}
// Read alignment score