Taxonomy: adding, writing and reading preferred names, changed some
function names, and fixed a bug with taxa indices not being properly initialized
This commit is contained in:
@ -36,7 +36,8 @@ typedef struct ecotxnode {
|
||||
int32_t farest;
|
||||
int32_t idx;
|
||||
struct ecotxnode* parent;
|
||||
char* name;
|
||||
char* name; // scientific name
|
||||
char* preferred_name; // preferred name
|
||||
bool local;
|
||||
} ecotx_t;
|
||||
|
||||
@ -98,6 +99,7 @@ typedef struct OBIDMS_taxonomy_t {
|
||||
ecomergedidx_t* merged_idx;
|
||||
ecorankidx_t* ranks;
|
||||
econameidx_t* names;
|
||||
econameidx_t* preferred_names;
|
||||
ecotxidx_t* taxa;
|
||||
} OBIDMS_taxonomy_t, *OBIDMS_taxonomy_p;
|
||||
|
||||
@ -127,4 +129,11 @@ int obi_write_taxonomy(OBIDMS_p dms, OBIDMS_taxonomy_p tax, const char* tax_name
|
||||
|
||||
OBIDMS_taxonomy_p obi_read_taxdump(const char* taxdump);
|
||||
|
||||
int obi_taxonomy_add_local_taxon(OBIDMS_taxonomy_p tax, const char* name, const char* rank_name, int32_t parent_taxid, int32_t min_taxid);
|
||||
int obi_taxo_add_local_taxon(OBIDMS_taxonomy_p tax, const char* name, const char* rank_name, int32_t parent_taxid, int32_t min_taxid);
|
||||
|
||||
int obi_taxo_add_preferred_name_with_taxid(OBIDMS_taxonomy_p tax, int32_t taxid, const char* preferred_name);
|
||||
|
||||
int obi_taxo_add_preferred_name_with_taxon(OBIDMS_taxonomy_p tax, ecotx_t* taxon, const char* preferred_name);
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user