NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <corelib/ncbistr.hpp>
#include <objects/general/User_object.hpp>
#include <objects/general/User_field.hpp>
#include <objects/general/Object_id.hpp>
#include <objtools/validator/go_term_validation_and_cleanup.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
class | CGoTermSortStruct |
Variables | |
static const string | kGoTermText = "text string" |
static const string | kGoTermID = "go id" |
static const string | kGoTermPubMedID = "pubmed id" |
static const string | kGoTermRef = "go ref" |
static const string | kGoTermEvidence = "evidence" |
static const string | kGoTermProcess = "Process" |
static const string | kGoTermComponent = "Component" |
static const string | kGoTermFunction = "Function" |
static const string | kGeneOntology = "GeneOntology" |
void AddComponentGoTerm | ( | CSeq_feat & | feat, |
CRef< CUser_field > | field | ||
) |
Definition at line 491 of file go_term_validation_and_cleanup.cpp.
References AddGoTermToList(), and kGoTermComponent.
void AddFunctionGoTerm | ( | CSeq_feat & | feat, |
CRef< CUser_field > | field | ||
) |
Definition at line 497 of file go_term_validation_and_cleanup.cpp.
References AddGoTermToList(), and kGoTermFunction.
void AddGoTermEvidence | ( | CUser_field & | field, |
const string & | val | ||
) |
Definition at line 435 of file go_term_validation_and_cleanup.cpp.
References kGoTermEvidence, CUser_field_Base::SetData(), CUser_field_Base::SetLabel(), and val.
Referenced by BOOST_AUTO_TEST_CASE(), and MakeGoTerm().
void AddGoTermToList | ( | CSeq_feat & | feat, |
CRef< CUser_field > | field, | ||
const string & | val_name | ||
) |
Definition at line 456 of file go_term_validation_and_cleanup.cpp.
References NStr::Equal(), CSeq_feat_Base::GetExt(), IsGeneOntology(), CUser_object_Base::IsSetData(), CSeq_feat_Base::IsSetExt(), kGeneOntology, CUser_field_Base::SetData(), CSeq_feat_Base::SetExt(), and CUser_field_Base::SetLabel().
Referenced by AddComponentGoTerm(), AddFunctionGoTerm(), and AddProcessGoTerm().
void AddProcessGoTerm | ( | CSeq_feat & | feat, |
CRef< CUser_field > | field | ||
) |
Definition at line 485 of file go_term_validation_and_cleanup.cpp.
References AddGoTermToList(), and kGoTermProcess.
Referenced by BOOST_AUTO_TEST_CASE(), and MakeGeneOntologyFeat().
void ClearGoTermEvidence | ( | CUser_field & | field | ) |
Definition at line 444 of file go_term_validation_and_cleanup.cpp.
References ClearGoTermValue(), and kGoTermEvidence.
Referenced by BOOST_AUTO_TEST_CASE().
void ClearGoTermPMID | ( | CUser_field & | field | ) |
Definition at line 450 of file go_term_validation_and_cleanup.cpp.
References ClearGoTermValue(), and kGoTermPubMedID.
Referenced by BOOST_AUTO_TEST_CASE().
void ClearGoTermValue | ( | CUser_field & | field, |
const string & | val_name | ||
) |
Definition at line 401 of file go_term_validation_and_cleanup.cpp.
References NStr::Equal(), CUser_field_Base::GetData(), CUser_field_Base::C_Data::IsFields(), CUser_field_Base::IsSetData(), and CUser_field_Base::SetData().
Referenced by ClearGoTermEvidence(), and ClearGoTermPMID().
Definition at line 527 of file go_term_validation_and_cleanup.cpp.
References CountGoTerms(), and kGoTermComponent.
Definition at line 533 of file go_term_validation_and_cleanup.cpp.
References CountGoTerms(), and kGoTermFunction.
Definition at line 503 of file go_term_validation_and_cleanup.cpp.
References NStr::Equal(), CUser_object_Base::GetData(), CSeq_feat_Base::GetExt(), IsGeneOntology(), CUser_object_Base::IsSetData(), and CSeq_feat_Base::IsSetExt().
Referenced by CountComponentGoTerms(), CountFunctionGoTerms(), and CountProcessGoTerms().
Definition at line 521 of file go_term_validation_and_cleanup.cpp.
References CountGoTerms(), and kGoTermProcess.
Referenced by CheckGeneOntologyTermDuplicate(), and CheckGeneOntologyTermNotDuplicate().
vector<TGoTermError> GetGoTermErrors | ( | const CSeq_feat & | feat | ) |
Definition at line 237 of file go_term_validation_and_cleanup.cpp.
References eErr_SEQ_FEAT_BadGeneOntologyFormat, CUser_object_Base::GetData(), CSeq_feat_Base::GetExt(), GetGoTermErrors(), IsGeneOntology(), CGoTermSortStruct::IsLegalGoTermType(), CUser_object_Base::IsSetData(), and CSeq_feat_Base::IsSetExt().
Referenced by CSingleFeatValidator::x_ValidateExtUserObject().
void GetGoTermErrors | ( | CUser_object::TData | field_list, |
map< string, string > & | id_terms, | ||
vector< TGoTermError > & | errors | ||
) |
Definition at line 196 of file go_term_validation_and_cleanup.cpp.
References a, eErr_SEQ_FEAT_BadGeneOntologyFormat, eErr_SEQ_FEAT_DuplicateGeneOntologyTerm, eErr_SEQ_FEAT_GeneOntologyTermMissingGOID, eErr_SEQ_FEAT_InconsistentGeneOntologyTermAndId, map_checker< Container >::end(), NStr::Equal(), map_checker< Container >::find(), set< Key, Compare >::insert(), NStr::IsBlank(), msg(), and set< Key, Compare >::size().
Referenced by GetGoTermErrors().
bool IsGeneOntology | ( | const CUser_object & | user_object | ) |
Definition at line 185 of file go_term_validation_and_cleanup.cpp.
References NStr::EqualCase(), CObject_id_Base::GetStr(), CUser_object_Base::GetType(), CUser_object_Base::IsSetType(), CObject_id_Base::IsStr(), and kGeneOntology.
Referenced by AddGoTermToList(), CountGoTerms(), GetGoTermErrors(), and RemoveDuplicateGoTerms().
bool operator< | ( | const CGoTermSortStruct & | l, |
const CGoTermSortStruct & | r | ||
) |
Definition at line 138 of file go_term_validation_and_cleanup.cpp.
References NStr::Compare(), l(), and r().
Definition at line 304 of file go_term_validation_and_cleanup.cpp.
References IsGeneOntology(), CGoTermSortStruct::IsLegalGoTermType(), CUser_object_Base::IsSetData(), CSeq_feat_Base::IsSetExt(), RemoveDuplicateGoTerms(), CUser_object_Base::SetData(), and CSeq_feat_Base::SetExt().
Referenced by CheckGeneOntologyTermDuplicate(), CheckGeneOntologyTermNotDuplicate(), and GetRemoveDuplicateGOTermsCommand().
bool RemoveDuplicateGoTerms | ( | CUser_object::TData & | field_list | ) |
Definition at line 276 of file go_term_validation_and_cleanup.cpp.
References a, set< Key, Compare >::begin(), set< Key, Compare >::end(), set< Key, Compare >::find(), and set< Key, Compare >::insert().
Referenced by RemoveDuplicateGoTerms().
void SetGoTermId | ( | CUser_field & | field, |
const string & | val | ||
) |
Definition at line 417 of file go_term_validation_and_cleanup.cpp.
References kGoTermID, SetGoTermValue(), and val.
Referenced by BOOST_AUTO_TEST_CASE(), and MakeGoTerm().
void SetGoTermPMID | ( | CUser_field & | field, |
int | pmid | ||
) |
Definition at line 429 of file go_term_validation_and_cleanup.cpp.
References kGoTermPubMedID, and SetGoTermValue().
Referenced by MakeGoTerm().
void SetGoTermText | ( | CUser_field & | field, |
const string & | val | ||
) |
Definition at line 423 of file go_term_validation_and_cleanup.cpp.
References kGoTermText, SetGoTermValue(), and val.
Referenced by MakeGoTerm().
void SetGoTermValue | ( | CUser_field & | field, |
const string & | val, | ||
const string & | val_name | ||
) |
Definition at line 337 of file go_term_validation_and_cleanup.cpp.
References NStr::Equal(), CUser_field_Base::GetData(), CUser_field_Base::C_Data::IsFields(), CUser_field_Base::IsSetData(), CUser_field_Base::SetData(), CUser_field_Base::SetLabel(), and val.
Referenced by SetGoTermId(), SetGoTermPMID(), and SetGoTermText().
void SetGoTermValue | ( | CUser_field & | field, |
int | val, | ||
const string & | val_name | ||
) |
Definition at line 369 of file go_term_validation_and_cleanup.cpp.
References NStr::Equal(), CUser_field_Base::GetData(), CUser_field_Base::C_Data::IsFields(), CUser_field_Base::IsSetData(), CUser_field_Base::SetData(), CUser_field_Base::SetLabel(), and val.
Definition at line 58 of file go_term_validation_and_cleanup.cpp.
Referenced by AddGoTermToList(), and IsGeneOntology().
Definition at line 55 of file go_term_validation_and_cleanup.cpp.
Referenced by AddComponentGoTerm(), CountComponentGoTerms(), and CGoTermSortStruct::IsLegalGoTermType().
Definition at line 52 of file go_term_validation_and_cleanup.cpp.
Referenced by AddGoTermEvidence(), CGoTermSortStruct::CGoTermSortStruct(), and ClearGoTermEvidence().
Definition at line 56 of file go_term_validation_and_cleanup.cpp.
Referenced by AddFunctionGoTerm(), CountFunctionGoTerms(), and CGoTermSortStruct::IsLegalGoTermType().
Definition at line 49 of file go_term_validation_and_cleanup.cpp.
Referenced by CGoTermSortStruct::CGoTermSortStruct(), and SetGoTermId().
Definition at line 54 of file go_term_validation_and_cleanup.cpp.
Referenced by AddProcessGoTerm(), CountProcessGoTerms(), and CGoTermSortStruct::IsLegalGoTermType().
Definition at line 50 of file go_term_validation_and_cleanup.cpp.
Referenced by CGoTermSortStruct::CGoTermSortStruct(), ClearGoTermPMID(), and SetGoTermPMID().
Definition at line 51 of file go_term_validation_and_cleanup.cpp.
Referenced by CGoTermSortStruct::CGoTermSortStruct().
Definition at line 48 of file go_term_validation_and_cleanup.cpp.
Referenced by CGoTermSortStruct::CGoTermSortStruct(), and SetGoTermText().