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

Search Toolkit Book for CTaxValidationAndCleanup

#include <objtools/validator/tax_validation_and_cleanup.hpp>

+ Collaboration diagram for CTaxValidationAndCleanup:

Public Member Functions

 CTaxValidationAndCleanup ()
 
 CTaxValidationAndCleanup (taxupdate_func_t)
 
 ~CTaxValidationAndCleanup ()
 
void Init (const CSeq_entry &se)
 
vector< CRef< COrg_ref > > GetTaxonomyLookupRequest () const
 
void ListTaxLookupErrors (const CT3Reply &reply, const COrg_ref &org, CBioSource::TGenome genome, bool is_insd_patent, bool is_wp, vector< TTaxError > &errs) const
 
void ReportTaxLookupErrors (const CTaxon3_reply &reply, CValidError_imp &imp, bool is_insd_patent) const
 
void ReportIncrementalTaxLookupErrors (const CTaxon3_reply &reply, CValidError_imp &imp, bool is_insd_patent, size_t offset) const
 
bool AdjustOrgRefsWithTaxLookupReply (const CTaxon3_reply &reply, vector< CRef< COrg_ref > > org_refs, string &error_message, bool use_error_orgrefs=false) const
 
vector< CRef< COrg_ref > > GetSpecificHostLookupRequest (bool for_fix)
 
string IncrementalSpecificHostMapUpdate (const vector< CRef< COrg_ref > > &input, const CTaxon3_reply &reply)
 
bool IsSpecificHostMapUpdateComplete () const
 
void ReportSpecificHostErrors (const CTaxon3_reply &reply, CValidError_imp &imp)
 
void ReportSpecificHostErrors (CValidError_imp &imp)
 
bool AdjustOrgRefsWithSpecificHostReply (vector< CRef< COrg_ref >> requests, const CTaxon3_reply &reply, vector< CRef< COrg_ref >> org_refs)
 
bool AdjustOrgRefsForSpecificHosts (vector< CRef< COrg_ref > > org_refs)
 
vector< CRef< COrg_ref > > GetStrainLookupRequest ()
 
string IncrementalStrainMapUpdate (const vector< CRef< COrg_ref > > &input, const CTaxon3_reply &reply)
 
bool IsStrainMapUpdateComplete () const
 
void ReportStrainErrors (CValidError_imp &imp)
 
CConstRef< CSeq_entryGetTopReportObject () const
 
size_t NumDescs () const
 
size_t NumFeats () const
 
CConstRef< CSeqdescGetDesc (size_t num) const
 
CConstRef< CSeq_featGetFeat (size_t num) const
 
CConstRef< CSeq_entryGetSeqContext (size_t num) const
 
bool DoTaxonomyUpdate (CSeq_entry_Handle seh, bool with_host)
 
void FixOneSpecificHost (string &val)
 
bool IsOneSpecificHostValid (const string &val, string &err_msg)
 
void CheckOneOrg (const COrg_ref &org, CBioSource::TGenome genome, CValidError_imp &imp)
 

Protected Member Functions

void x_InterpretTaxonomyError (const CT3Error &error, const COrg_ref &org, const EErrType type, vector< TTaxError > &errs) const
 
void x_GatherSources (const CSeq_entry &se)
 
void x_CreateSpecificHostMap (bool for_fix)
 
void x_UpdateSpecificHostMapWithReply (const CTaxon3_reply &reply, string &error_message)
 
bool x_ApplySpecificHostMap (COrg_ref &org_ref) const
 
TSpecificHostRequests::iterator x_FindHostFixRequest (const string &val)
 
void x_CreateStrainMap ()
 
void x_CreateQualifierMap (CQualLookupMap &lookup)
 
void x_ClearMaps ()
 

Static Protected Member Functions

static string x_DefaultSpecificHostAdjustments (const string &host_val)
 

Protected Attributes

vector< CConstRef< CSeqdesc > > m_SrcDescs
 
vector< CConstRef< CSeq_entry > > m_DescCtxs
 
vector< CConstRef< CSeq_feat > > m_SrcFeats
 
TSpecificHostRequests m_SpecificHostRequests
 
bool m_SpecificHostRequestsBuilt { false }
 
bool m_SpecificHostRequestsUpdated { false }
 
bool m_StrainRequestsBuilt { false }
 
CSpecificHostMap m_HostMap
 
CSpecificHostMapForFix m_HostMapForFix
 
CStrainMap m_StrainMap
 
unique_ptr< ITaxon3m_taxon3
 
taxupdate_func_t m_tax_func = nullptr
 

Detailed Description

Definition at line 305 of file tax_validation_and_cleanup.hpp.

Constructor & Destructor Documentation

◆ CTaxValidationAndCleanup() [1/2]

CTaxValidationAndCleanup::CTaxValidationAndCleanup ( )

Definition at line 638 of file tax_validation_and_cleanup.cpp.

References m_tax_func, m_taxon3, and CTaxon3::yes.

◆ CTaxValidationAndCleanup() [2/2]

CTaxValidationAndCleanup::CTaxValidationAndCleanup ( taxupdate_func_t  tax_func)

Definition at line 647 of file tax_validation_and_cleanup.cpp.

◆ ~CTaxValidationAndCleanup()

CTaxValidationAndCleanup::~CTaxValidationAndCleanup ( )
inline

Definition at line 310 of file tax_validation_and_cleanup.hpp.

Member Function Documentation

◆ AdjustOrgRefsForSpecificHosts()

bool CTaxValidationAndCleanup::AdjustOrgRefsForSpecificHosts ( vector< CRef< COrg_ref > >  org_refs)

◆ AdjustOrgRefsWithSpecificHostReply()

bool CTaxValidationAndCleanup::AdjustOrgRefsWithSpecificHostReply ( vector< CRef< COrg_ref >>  requests,
const CTaxon3_reply reply,
vector< CRef< COrg_ref >>  org_refs 
)

◆ AdjustOrgRefsWithTaxLookupReply()

bool CTaxValidationAndCleanup::AdjustOrgRefsWithTaxLookupReply ( const CTaxon3_reply reply,
vector< CRef< COrg_ref > >  org_refs,
string error_message,
bool  use_error_orgrefs = false 
) const

◆ CheckOneOrg()

void CTaxValidationAndCleanup::CheckOneOrg ( const COrg_ref org,
CBioSource::TGenome  genome,
CValidError_imp imp 
)

◆ DoTaxonomyUpdate()

bool CTaxValidationAndCleanup::DoTaxonomyUpdate ( CSeq_entry_Handle  seh,
bool  with_host 
)

◆ FixOneSpecificHost()

void CTaxValidationAndCleanup::FixOneSpecificHost ( string val)

◆ GetDesc()

CConstRef<CSeqdesc> CTaxValidationAndCleanup::GetDesc ( size_t  num) const
inline

Definition at line 350 of file tax_validation_and_cleanup.hpp.

References m_SrcDescs.

Referenced by BOOST_AUTO_TEST_CASE(), and DoTaxonomyUpdate().

◆ GetFeat()

CConstRef<CSeq_feat> CTaxValidationAndCleanup::GetFeat ( size_t  num) const
inline

Definition at line 351 of file tax_validation_and_cleanup.hpp.

References m_SrcFeats.

Referenced by BOOST_AUTO_TEST_CASE(), and DoTaxonomyUpdate().

◆ GetSeqContext()

CConstRef< CSeq_entry > CTaxValidationAndCleanup::GetSeqContext ( size_t  num) const

Definition at line 1227 of file tax_validation_and_cleanup.cpp.

References m_DescCtxs.

◆ GetSpecificHostLookupRequest()

vector< CRef< COrg_ref > > CTaxValidationAndCleanup::GetSpecificHostLookupRequest ( bool  for_fix)

◆ GetStrainLookupRequest()

vector< CRef< COrg_ref > > CTaxValidationAndCleanup::GetStrainLookupRequest ( )

◆ GetTaxonomyLookupRequest()

vector< CRef< COrg_ref > > CTaxValidationAndCleanup::GetTaxonomyLookupRequest ( ) const

◆ GetTopReportObject()

CConstRef< CSeq_entry > CTaxValidationAndCleanup::GetTopReportObject ( ) const

◆ IncrementalSpecificHostMapUpdate()

string CTaxValidationAndCleanup::IncrementalSpecificHostMapUpdate ( const vector< CRef< COrg_ref > > &  input,
const CTaxon3_reply reply 
)

◆ IncrementalStrainMapUpdate()

string CTaxValidationAndCleanup::IncrementalStrainMapUpdate ( const vector< CRef< COrg_ref > > &  input,
const CTaxon3_reply reply 
)

◆ Init()

void CTaxValidationAndCleanup::Init ( const CSeq_entry se)

◆ IsOneSpecificHostValid()

bool CTaxValidationAndCleanup::IsOneSpecificHostValid ( const string val,
string err_msg 
)

◆ IsSpecificHostMapUpdateComplete()

bool CTaxValidationAndCleanup::IsSpecificHostMapUpdateComplete ( ) const

◆ IsStrainMapUpdateComplete()

bool CTaxValidationAndCleanup::IsStrainMapUpdateComplete ( ) const

◆ ListTaxLookupErrors()

void CTaxValidationAndCleanup::ListTaxLookupErrors ( const CT3Reply reply,
const COrg_ref org,
CBioSource::TGenome  genome,
bool  is_insd_patent,
bool  is_wp,
vector< TTaxError > &  errs 
) const

◆ NumDescs()

size_t CTaxValidationAndCleanup::NumDescs ( ) const
inline

Definition at line 347 of file tax_validation_and_cleanup.hpp.

References m_SrcDescs.

Referenced by BOOST_AUTO_TEST_CASE(), and DoTaxonomyUpdate().

◆ NumFeats()

size_t CTaxValidationAndCleanup::NumFeats ( ) const
inline

Definition at line 348 of file tax_validation_and_cleanup.hpp.

References m_SrcFeats.

Referenced by BOOST_AUTO_TEST_CASE(), and DoTaxonomyUpdate().

◆ ReportIncrementalTaxLookupErrors()

void CTaxValidationAndCleanup::ReportIncrementalTaxLookupErrors ( const CTaxon3_reply reply,
CValidError_imp imp,
bool  is_insd_patent,
size_t  offset 
) const

◆ ReportSpecificHostErrors() [1/2]

void CTaxValidationAndCleanup::ReportSpecificHostErrors ( const CTaxon3_reply reply,
CValidError_imp imp 
)

◆ ReportSpecificHostErrors() [2/2]

void CTaxValidationAndCleanup::ReportSpecificHostErrors ( CValidError_imp imp)

Definition at line 1053 of file tax_validation_and_cleanup.cpp.

References m_HostMap, and CQualLookupMap::PostErrors().

◆ ReportStrainErrors()

void CTaxValidationAndCleanup::ReportStrainErrors ( CValidError_imp imp)

◆ ReportTaxLookupErrors()

void CTaxValidationAndCleanup::ReportTaxLookupErrors ( const CTaxon3_reply reply,
CValidError_imp imp,
bool  is_insd_patent 
) const

◆ x_ApplySpecificHostMap()

bool CTaxValidationAndCleanup::x_ApplySpecificHostMap ( COrg_ref org_ref) const
protected

◆ x_ClearMaps()

void CTaxValidationAndCleanup::x_ClearMaps ( )
inlineprotected

Definition at line 373 of file tax_validation_and_cleanup.hpp.

References CQualLookupMap::Clear(), m_HostMap, m_HostMapForFix, and m_StrainMap.

Referenced by CheckOneOrg().

◆ x_CreateQualifierMap()

void CTaxValidationAndCleanup::x_CreateQualifierMap ( CQualLookupMap lookup)
protected

◆ x_CreateSpecificHostMap()

void CTaxValidationAndCleanup::x_CreateSpecificHostMap ( bool  for_fix)
protected

◆ x_CreateStrainMap()

void CTaxValidationAndCleanup::x_CreateStrainMap ( )
protected

◆ x_DefaultSpecificHostAdjustments()

string CTaxValidationAndCleanup::x_DefaultSpecificHostAdjustments ( const string host_val)
staticprotected

◆ x_FindHostFixRequest()

TSpecificHostRequests::iterator CTaxValidationAndCleanup::x_FindHostFixRequest ( const string val)
protected

◆ x_GatherSources()

void CTaxValidationAndCleanup::x_GatherSources ( const CSeq_entry se)
protected

◆ x_InterpretTaxonomyError()

void CTaxValidationAndCleanup::x_InterpretTaxonomyError ( const CT3Error error,
const COrg_ref org,
const EErrType  type,
vector< TTaxError > &  errs 
) const
protected

◆ x_UpdateSpecificHostMapWithReply()

void CTaxValidationAndCleanup::x_UpdateSpecificHostMapWithReply ( const CTaxon3_reply reply,
string error_message 
)
protected

Member Data Documentation

◆ m_DescCtxs

vector<CConstRef<CSeq_entry> > CTaxValidationAndCleanup::m_DescCtxs
protected

◆ m_HostMap

CSpecificHostMap CTaxValidationAndCleanup::m_HostMap
protected

◆ m_HostMapForFix

CSpecificHostMapForFix CTaxValidationAndCleanup::m_HostMapForFix
protected

◆ m_SpecificHostRequests

TSpecificHostRequests CTaxValidationAndCleanup::m_SpecificHostRequests
protected

◆ m_SpecificHostRequestsBuilt

bool CTaxValidationAndCleanup::m_SpecificHostRequestsBuilt { false }
protected

Definition at line 380 of file tax_validation_and_cleanup.hpp.

Referenced by Init().

◆ m_SpecificHostRequestsUpdated

bool CTaxValidationAndCleanup::m_SpecificHostRequestsUpdated { false }
protected

Definition at line 381 of file tax_validation_and_cleanup.hpp.

Referenced by Init().

◆ m_SrcDescs

vector<CConstRef<CSeqdesc> > CTaxValidationAndCleanup::m_SrcDescs
protected

◆ m_SrcFeats

vector<CConstRef<CSeq_feat> > CTaxValidationAndCleanup::m_SrcFeats
protected

◆ m_StrainMap

CStrainMap CTaxValidationAndCleanup::m_StrainMap
protected

◆ m_StrainRequestsBuilt

bool CTaxValidationAndCleanup::m_StrainRequestsBuilt { false }
protected

Definition at line 383 of file tax_validation_and_cleanup.hpp.

Referenced by GetStrainLookupRequest(), Init(), and x_CreateStrainMap().

◆ m_tax_func

taxupdate_func_t CTaxValidationAndCleanup::m_tax_func = nullptr
protected

◆ m_taxon3

unique_ptr<ITaxon3> CTaxValidationAndCleanup::m_taxon3
protected

Definition at line 389 of file tax_validation_and_cleanup.hpp.

Referenced by CTaxValidationAndCleanup().


The documentation for this class was generated from the following files:
Modified on Mon Feb 26 04:03:56 2024 by modify_doxy.py rev. 669887