NCBI C++ ToolKit
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
TaxClient Class Reference

Search Toolkit Book for TaxClient

#include <algo/structure/cd_utils/cuTaxClient.hpp>

+ Collaboration diagram for TaxClient:

Public Member Functions

 TaxClient (bool refresh=REFRESH_DEFAULT)
virtual ~TaxClient ()
virtual bool init ()
virtual bool IsAlive ()
virtual TTaxId GetTaxIDForSeqId (CConstRef< CSeq_id > sid)
virtual TTaxId GetTaxIDForGI (TGi gi)
virtual bool GetOrgRef (TTaxId taxId, COrg_ref &orgRef)
virtual bool GetOrgRef (TTaxId taxId, CRef< COrg_ref > &orgRef)
virtual bool SetSynonyms (bool on_off)
virtual short GetRankID (TTaxId taxId, string &rankName)
virtual TTaxId GetTaxIDFromBioseq (const CBioseq &bioseq, bool lookInBioseq)
virtual string GetTaxNameForTaxID (TTaxId taxid)
virtual string GetSuperKingdom (TTaxId taxid)
virtual bool GetDisplayCommonName (TTaxId taxid, string &displayCommonName)
virtual TTaxId GetParentTaxID (TTaxId taxid)
virtual bool IsTaxDescendant (TTaxId tax1, TTaxId tax2)
virtual bool GetFullLineage (TTaxId taxid, vector< TTaxId > &lineageFromRoot)
virtual bool GetFullLineage (TTaxId taxid, vector< pair< TTaxId, string > > &lineageFromRoot, bool useCommonName=false)
virtual bool ConnectToTaxServer ()
CConstRef< COrg_refGetOrgRef (TTaxId tax_id, bool &is_species, bool &is_uncultured, string &blast_name)
TTaxId Join (TTaxId taxid1, TTaxId taxid2)

Private Attributes


Static Private Attributes

static const bool REFRESH_DEFAULT = false

Detailed Description

Definition at line 50 of file cuTaxClient.hpp.

Constructor & Destructor Documentation

◆ TaxClient()

TaxClient::TaxClient ( bool  refresh = REFRESH_DEFAULT)

Definition at line 62 of file cuTaxClient.cpp.

◆ ~TaxClient()

TaxClient::~TaxClient ( )

Definition at line 67 of file cuTaxClient.cpp.

References CTaxon1::Fini(), m_scope, and m_taxonomyClient.

Member Function Documentation

◆ ConnectToTaxServer()

bool TaxClient::ConnectToTaxServer ( )

Definition at line 82 of file cuTaxClient.cpp.

References CTaxon1::Init(), CTaxon1::IsAlive(), and m_taxonomyClient.

Referenced by CTaxNRCriteria::ConnectToServer(), and init().

◆ GetDisplayCommonName()

bool TaxClient::GetDisplayCommonName ( TTaxId  taxid,
string displayCommonName 

Definition at line 276 of file cuTaxClient.cpp.

References CTaxon1::GetDisplayCommonName(), IsAlive(), and m_taxonomyClient.

Referenced by GetFullLineage().

◆ GetFullLineage() [1/2]

bool TaxClient::GetFullLineage ( TTaxId  taxid,
vector< pair< TTaxId, string > > &  lineageFromRoot,
bool  useCommonName = false 

◆ GetFullLineage() [2/2]

bool TaxClient::GetFullLineage ( TTaxId  taxid,
vector< TTaxId > &  lineageFromRoot 

Definition at line 314 of file cuTaxClient.cpp.

References CTaxon1::GetPopsetJoin(), IsAlive(), m_taxonomyClient, and TAX_ID_CONST.

Referenced by GetFullLineage().

◆ GetOrgRef() [1/3]

CConstRef< COrg_ref > TaxClient::GetOrgRef ( TTaxId  tax_id,
bool is_species,
bool is_uncultured,
string blast_name 

Definition at line 295 of file cuTaxClient.cpp.

References CTaxon1::GetOrgRef(), IsAlive(), m_taxonomyClient, and null.

◆ GetOrgRef() [2/3]

bool TaxClient::GetOrgRef ( TTaxId  taxId,
COrg_ref orgRef 

◆ GetOrgRef() [3/3]

bool TaxClient::GetOrgRef ( TTaxId  taxId,
CRef< COrg_ref > &  orgRef 

Definition at line 162 of file cuTaxClient.cpp.

References GetOrgRef(), and CRef< C, Locker >::NotEmpty().

◆ GetParentTaxID()

TTaxId TaxClient::GetParentTaxID ( TTaxId  taxid)

◆ GetRankID()

short TaxClient::GetRankID ( TTaxId  taxId,
string rankName 

◆ GetSuperKingdom()

string TaxClient::GetSuperKingdom ( TTaxId  taxid)

◆ GetTaxIDForGI()

TTaxId TaxClient::GetTaxIDForGI ( TGi  gi)

◆ GetTaxIDForSeqId()

TTaxId TaxClient::GetTaxIDForSeqId ( CConstRef< CSeq_id sid)

◆ GetTaxIDFromBioseq()

TTaxId TaxClient::GetTaxIDFromBioseq ( const CBioseq bioseq,
bool  lookInBioseq 

◆ GetTaxNameForTaxID()

std::string TaxClient::GetTaxNameForTaxID ( TTaxId  taxid)

◆ init()

bool TaxClient::init ( )

Definition at line 77 of file cuTaxClient.cpp.

References ConnectToTaxServer().

Referenced by SeqTreeAPI::annotateLeafNode(), and TaxTreeData::TaxTreeData().

◆ IsAlive()

bool TaxClient::IsAlive ( )

◆ IsTaxDescendant()

bool TaxClient::IsTaxDescendant ( TTaxId  tax1,
TTaxId  tax2 

Definition at line 286 of file cuTaxClient.cpp.

References IsAlive(), CTaxon1::Join(), and m_taxonomyClient.

Referenced by CPriorityTaxNodes::findAncestor().

◆ Join()

TTaxId TaxClient::Join ( TTaxId  taxid1,
TTaxId  taxid2 

Definition at line 305 of file cuTaxClient.cpp.

References IsAlive(), CTaxon1::Join(), m_taxonomyClient, and ZERO_TAX_ID.

◆ SetSynonyms()

bool TaxClient::SetSynonyms ( bool  on_off)

Definition at line 171 of file cuTaxClient.cpp.

References m_taxonomyClient, and CTaxon1::SetSynonyms().

Member Data Documentation

◆ m_scope

CScope* TaxClient::m_scope

Definition at line 114 of file cuTaxClient.hpp.

Referenced by GetTaxIDForSeqId(), and ~TaxClient().

◆ m_taxonomyClient

CTaxon1* TaxClient::m_taxonomyClient


const bool TaxClient::REFRESH_DEFAULT = false

Definition at line 53 of file cuTaxClient.hpp.

The documentation for this class was generated from the following files:
Modified on Mon Feb 26 04:01:34 2024 by rev. 669887