diff --git a/src/libecoPCR/ecoPCR.h b/src/libecoPCR/ecoPCR.h index 2229151..4c26fc0 100644 --- a/src/libecoPCR/ecoPCR.h +++ b/src/libecoPCR/ecoPCR.h @@ -80,12 +80,42 @@ typedef struct { char* label[1]; } ecorankidx_t; +/* + * + * Taxonomy name types + * + */ + typedef struct { + int32_t is_scientificname; + int32_t namelength; + int32_t classlength; + int32_t taxid; + char names[1]; +} econameformat_t; + + + typedef struct { + char *name; + char *classname; + int32_t is_scientificname; + struct ecotxnode *taxon; +} econame_t; + + +typedef struct { + int32_t count; + econame_t names[1]; +} econameidx_t; + + + typedef struct { ecorankidx_t *ranks; + econameidx_t *names; ecotxidx_t *taxons; } ecotaxonomy_t; - + /***************************************************** * * Function declarations @@ -175,6 +205,9 @@ ecoseq_t *readnext_ecoseq(FILE *); ecorankidx_t *read_rankidx(const char *filename); +econameidx_t *read_nameidx(const char *filename,ecotaxonomy_t *taxonomy); + + /** * Read taxonomy data as formated by the ecoPCRFormat.py script. @@ -189,7 +222,7 @@ ecorankidx_t *read_rankidx(const char *filename); ecotxidx_t *read_taxonomyidx(const char *filename); -ecotaxonomy_t *read_taxonomy(const char *prefix); +ecotaxonomy_t *read_taxonomy(const char *prefix,int32_t readAlternativeName); ecotx_t *eco_findtaxonbytaxid(ecotaxonomy_t *taxonomy, int32_t taxid);