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:
@@ -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_*/
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user