From 433a19fd87f42230ce84fee22f8816dc27cdcb80 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Wed, 20 Jun 2007 07:38:54 +0000 Subject: [PATCH] git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPCR/branches/refactoring@73 60f365c0-8329-0410-b2a4-ec073aeeaa1d --- src/libecoPCR/ecoPCR.h | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) 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);