NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <corelib/ncbi_autoinit.hpp>
#include <objects/macro/Suspect_rule_set.hpp>
#include <objects/macro/Suspect_rule.hpp>
#include <objects/seqfeat/RNA_gen.hpp>
#include <objects/macro/Search_func.hpp>
#include <objects/macro/Replace_func.hpp>
#include <objects/macro/Simple_replace.hpp>
#include <objects/seqfeat/Org_ref.hpp>
#include <objects/misc/sequence_util_macros.hpp>
#include <serial/objistrasn.hpp>
#include "discrepancy_core.hpp"
#include "utils.hpp"
Go to the source code of this file.
Go to the SVN repository for this file.
Typedefs | |
typedef std::function< CRef< CSeq_feat >) > | GetFeatureFunc |
Variables | |
static const string | kSuspectProductNames = "[n] product_name[s] contain[S] suspect phrase[s] or character[s]" |
static constexpr CDiscrepancyCaseProps | s_testcase_props_SUSPECT_PRODUCT_NAMES = { CDiscrepancyVisitorImpl<eTestNames:: SUSPECT_PRODUCT_NAMES >::Create, eTestTypes:: FEAT , eTestNames:: SUSPECT_PRODUCT_NAMES , "SUSPECT_PRODUCT_NAMES" , "Suspect Product Name" , eDisc | eOncaller | eSubmitter | eSmart | eTSA | eFatal , nullptr } |
static constexpr CDiscrepancyCaseProps | s_testcase_props_ORGANELLE_PRODUCTS = { CDiscrepancyVisitorImpl<eTestNames:: ORGANELLE_PRODUCTS >::Create, eTestTypes:: FEAT , eTestNames:: ORGANELLE_PRODUCTS , "ORGANELLE_PRODUCTS" , "Organelle products on non-organelle sequence: on when neither bacteria nor virus" , eOncaller , nullptr } |
static constexpr CDiscrepancyCaseProps | s_testcase_props_SUSPECT_RRNA_PRODUCTS = { CDiscrepancyVisitorImpl<eTestNames:: SUSPECT_RRNA_PRODUCTS >::Create, eTestTypes:: FEAT , eTestNames:: SUSPECT_RRNA_PRODUCTS , "SUSPECT_RRNA_PRODUCTS" , "rRNA product names should not contain 'partial' or 'domain'" , eDisc | eSubmitter | eSmart , nullptr } |
static constexpr CDiscrepancyCaseProps | s_testcase_props__SUSPECT_PRODUCT_NAMES = { CDiscrepancyVisitorImpl<eTestNames:: _SUSPECT_PRODUCT_NAMES >::Create, eTestTypes:: STRING , eTestNames:: _SUSPECT_PRODUCT_NAMES , "_SUSPECT_PRODUCT_NAMES" , "Suspect Product Names for asndisc -N option" , 0 , nullptr } |
typedef std::function< CRef<CSeq_feat>) > GetFeatureFunc |
Definition at line 300 of file suspect_product_names.cpp.
Definition at line 210 of file suspect_product_names.cpp.
References isalpha().
string FixProductName | ( | const CSuspect_rule * | rule, |
CScope & | , | ||
string & | prot_name, | ||
GetFeatureFunc | get_mrna, | ||
GetFeatureFunc | get_cds | ||
) |
Definition at line 301 of file suspect_product_names.cpp.
References AddComment(), CSuspect_rule_Base::GetFind(), CString_constraint_Base::GetMatch_text(), CReplace_rule_Base::GetMove_to_note(), CSimple_replace_Base::GetReplace(), CSuspect_rule_Base::GetReplace(), CReplace_rule_Base::GetReplace_func(), CReplace_func_Base::GetSimple_replace(), CSearch_func_Base::GetString_constraint(), CSimple_replace_Base::GetWhole_string(), CReplace_func_Base::IsHaem_replace(), CReplace_func_Base::IsSimple_replace(), and ReplaceNoCase().
Referenced by CDiscrepancyVisitorImpl< _Name >::Autofix().
|
static |
Definition at line 78 of file suspect_product_names.cpp.
References NStr::EqualNocase(), GetTwoFieldSubfield(), and str().
Referenced by GetRNAProductString().
|
static |
Definition at line 280 of file suspect_product_names.cpp.
References CSeqFeatData::eSubtype_prot, GetBestMrnaForCds(), CScope::GetBioseqHandle(), CMappedFeat::GetMappedFeature(), CSeq_feat_Base::GetProduct(), prot, and rna.
Referenced by CDiscrepancyVisitorImpl< _Name >::Autofix().
Definition at line 95 of file suspect_product_names.cpp.
References CRNA_gen_Base::CanGetProduct(), CSeq_feat_Base::CanGetQual(), CRNA_ref_Base::C_Ext::e_Gen, CRNA_ref_Base::C_Ext::e_Name, CRNA_ref_Base::C_Ext::e_TRNA, fFGL_Content, CSeq_feat_Base::GetData(), GetFirstGBQualMatch(), CRNA_ref_Base::C_Ext::GetGen(), GetLabel(), CRNA_ref_Base::C_Ext::GetName(), CSeq_feat::GetNamedQual(), CRNA_gen_Base::GetProduct(), CSeq_feat_Base::GetQual(), CSeqFeatData_Base::GetRna(), rna, and CRNA_ref_Base::C_Ext::Which().
|
static |
Definition at line 149 of file suspect_product_names.cpp.
References CSuspect_rule_Base::CanGetFind(), CSimple_replace_Base::CanGetReplace(), CSuspect_rule_Base::CanGetReplace(), CSuspect_rule_Base::CanGetRule_type(), CSearch_func_Base::e_All_caps, CSearch_func_Base::e_Contains_plural, CSearch_func_Base::e_Has_term, CSearch_func_Base::e_N_or_more_brackets_or_parentheses, CSearch_func_Base::e_Prefix_and_numbers, CSearch_func_Base::e_String_constraint, CSearch_func_Base::e_Three_numbers, CSearch_func_Base::e_Too_long, CSearch_func_Base::e_Unbalanced_paren, CSearch_func_Base::e_Underscore, eFix_type_quickfix, eFix_type_typo, eString_location_ends, eString_location_equals, eString_location_starts, CSuspect_rule_Base::GetDescription(), CSuspect_rule_Base::GetFind(), CString_constraint_Base::GetMatch_location(), CString_constraint_Base::GetMatch_text(), CSimple_replace_Base::GetReplace(), CSuspect_rule_Base::GetReplace(), CReplace_rule_Base::GetReplace_func(), CSuspect_rule_Base::GetRule_type(), CReplace_func_Base::GetSimple_replace(), CSearch_func_Base::GetString_constraint(), CSuspect_rule_Base::IsSetDescription(), CReplace_func_Base::IsSimple_replace(), NStr::ReplaceInPlace(), and CSearch_func_Base::Which().
|
static |
Definition at line 126 of file suspect_product_names.cpp.
References CSuspect_rule_Base::GetRule_type().
Definition at line 55 of file suspect_product_names.cpp.
References CTempString::empty(), kEmptyStr, str(), strtmp, and CTempString::substr().
Referenced by GetFirstGBQualMatch().
|
static |
Definition at line 264 of file suspect_product_names.cpp.
References NStr::FindNoCase(), input(), NPOS, and NStr::TruncateSpacesInPlace().
Referenced by FixProductName().
|
static |
Definition at line 440 of file suspect_product_names.cpp.
References ConstRef(), CTempString::data(), DEFINE_STATIC_FAST_MUTEX, CAutoInitPtr_Base::IsInitialized(), CTempString::length(), and CObjectIStream::Read().
|
static |
Definition at line 504 of file suspect_product_names.cpp.
References CSearch_func_Base::GetString_constraint(), CSearch_func_Base::IsString_constraint(), NCBI_USER_THROW, and s_SummarizeStringConstraint().
Referenced by s_SummarizeSuspectRule().
|
static |
Definition at line 473 of file suspect_product_names.cpp.
References GET_FIELD_OR_DEFAULT, CString_constraint_Base::GetMatch_text(), CString_constraint_Base::IsSetCase_sensitive(), CString_constraint_Base::IsSetIgnore_punct(), CString_constraint_Base::IsSetIgnore_space(), CString_constraint_Base::IsSetIgnore_weasel(), CString_constraint_Base::IsSetIgnore_words(), CString_constraint_Base::IsSetIs_all_caps(), CString_constraint_Base::IsSetIs_all_lower(), CString_constraint_Base::IsSetIs_all_punct(), CString_constraint_Base::IsSetIs_first_cap(), CString_constraint_Base::IsSetIs_first_each_cap(), CString_constraint_Base::IsSetMatch_location(), CString_constraint_Base::IsSetNot_present(), and NCBI_USER_THROW.
Referenced by s_SummarizeSearchFunc().
|
static |
Definition at line 528 of file suspect_product_names.cpp.
References _ASSERT, CSuspect_rule_Base::GetExcept(), CSuspect_rule_Base::GetFind(), CSuspect_rule_Base::IsSetDescription(), CSuspect_rule_Base::IsSetExcept(), CSuspect_rule_Base::IsSetFatal(), CSuspect_rule_Base::IsSetFeat_constraint(), CSuspect_rule_Base::IsSetFind(), CSuspect_rule_Base::IsSetReplace(), CSuspect_rule_Base::IsSetRule_type(), NCBI_USER_THROW, and s_SummarizeSearchFunc().
USING_SCOPE | ( | objects | ) |
|
static |
Definition at line 208 of file suspect_product_names.cpp.
|
staticconstexpr |
Definition at line 578 of file suspect_product_names.cpp.
|
staticconstexpr |
Definition at line 372 of file suspect_product_names.cpp.
|
staticconstexpr |
Definition at line 221 of file suspect_product_names.cpp.
|
staticconstexpr |
Definition at line 551 of file suspect_product_names.cpp.