MediatorLocalTaxonomyMixin¶
- class MediatorLocalTaxonomyMixin(database, tax_rank_tolerance=None, tax_corr_method='lineage', tax_fuzzy_cutoff=95, tax_fuzzy_mode=False, tax_format=None, tax_refrep='tid', **kwargs)[source]¶
Mixin class for local mediator that handle taxonomy data.
Mixin class constructor for
MediatorLocalTaxonomyMixin- Parameters
database (pmaf.database._metakit.DatabaseTaxonomyMetabase) – Instance of
DatabaseBaseandDatabaseTaxonomyMixintax_rank_tolerance (Optional[str]) – Rank tolerance level when match is not found
tax_corr_method (str) – Taxonomy correlation method. Can one of
CORRELATION_METHODS- The “lineage” refer to lineage based correlation approach - The “complement” is used when missing taxonomy (from Family to Domain) must be complemented - The “taxon” refer to individual and cumulative taxon matching approachtax_fuzzy_cutoff (int) – Cutoff value when fuzzy matching is enabled
tax_fuzzy_mode (bool) – If True enable fuzzy matching
tax_format (Optional[str]) – If not None then taxonomy formatting is enabled. # TODO: Elaborate on this
tax_refrep (Optional[str]) – Taxonomy lookup level. Can be either “tid” for tids or “rid” for rids
kwargs (Any) – Compatibility
Attributes
CORRELATION_METHODSAvailable methods for taxonomy correlations
clientCurrent active client that mediator mediates.
configsAll current configs.
stateState of the mediator(client)
Methods
get_identifier_by_taxonomy(docker, factor, …)Get local database identifiers that match target taxonomy in docker within local database client.
get_taxonomy_by_identifier(docker, factor, …)Get taxonomy data that matches identifiers in docker within local database client.
reconfig(name, value)Set config name to value
verify_factor(factor)Verify/validate compatibility of the current mediator and factor