add a -k option to the ecoPCR binary to substitute superkingdom column by a kingdom column

git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPCR/trunk@11 60f365c0-8329-0410-b2a4-ec073aeeaa1d
This commit is contained in:
2007-03-27 16:29:20 +00:00
parent b2c307e611
commit 8c91d3d8f3
3 changed files with 34 additions and 4 deletions
+1
View File
@@ -224,6 +224,7 @@ char *getSubSequence(char* nucAcSeq,int32_t begin,int32_t end);
ecotx_t *eco_getspecies(ecotx_t *taxon,ecotaxonomy_t *taxonomy);
ecotx_t *eco_getgenus(ecotx_t *taxon,ecotaxonomy_t *taxonomy);
ecotx_t *eco_getfamily(ecotx_t *taxon,ecotaxonomy_t *taxonomy);
ecotx_t *eco_getkingdom(ecotx_t *taxon,ecotaxonomy_t *taxonomy);
ecotx_t *eco_getsuperkingdom(ecotx_t *taxon,ecotaxonomy_t *taxonomy);
#endif /*ECOPCR_H_*/
+18
View File
@@ -215,6 +215,24 @@ ecotx_t *eco_getfamily(ecotx_t *taxon,
return eco_findtaxonatrank(taxon,rankindex,tax);
}
ecotx_t *eco_getkingdom(ecotx_t *taxon,
ecotaxonomy_t *taxonomy)
{
static ecotaxonomy_t *tax=NULL;
static int32_t rankindex=-1;
if (taxonomy && tax!=taxonomy)
{
rankindex = rank_index("kingdom",taxonomy->ranks);
tax=taxonomy;
}
if (!tax || rankindex < 0)
ECOERROR(ECO_ASSERT_ERROR,"No taxonomy defined");
return eco_findtaxonatrank(taxon,rankindex,tax);
}
ecotx_t *eco_getsuperkingdom(ecotx_t *taxon,
ecotaxonomy_t *taxonomy)
{