ecofilter.c 394 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include "ecoPCR.h"

int eco_is_taxid_included(	ecotaxonomy_t *taxonomy, 
							int32_t *restricted_taxid, 
							int32_t tab_len, 
							int32_t taxid)
{
	int i;
	ecotx_t *taxon;
	
	taxon = eco_findtaxonbytaxid(taxonomy, taxid);
	
	for (i=0; i < tab_len; i++)
		if ( (taxon->taxid == restricted_taxid[i]) ||
			 (eco_isundertaxon(taxon, restricted_taxid[i])) )
			return 1;
	
	return 0;
19 20
}