NCBI C++ ToolKit
Typedefs | Functions | Variables
suspect_product_names.cpp File Reference
#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"
+ Include dependency graph for suspect_product_names.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Typedefs

typedef std::function< CRef< CSeq_feat >) > GetFeatureFunc
 

Functions

 USING_SCOPE (objects)
 
string GetTwoFieldSubfield (const string &str, unsigned subfield)
 
static string GetFirstGBQualMatch (const vector< CRef< CGb_qual > > &quals, const string &qual_name, unsigned subfield=0, const CString_constraint *str_cons=nullptr)
 
static string GetRNAProductString (const CSeq_feat &seq_feat)
 
static string GetRuleText (const CSuspect_rule &rule)
 
static string GetRuleMatch (const CSuspect_rule &rule)
 
static bool ContainsLetters (const string &prod_name)
 
static string ReplaceNoCase (const string &input, const string &search, const string &replace)
 
static void GetProtAndRnaForCDS (const CSeq_feat &cds, CScope &scope, CSeq_feat *&prot, CSeq_feat *&mrna)
 
string FixProductName (const CSuspect_rule *rule, CScope &, string &prot_name, GetFeatureFunc get_mrna, GetFeatureFunc get_cds)
 
static CConstRef< CSuspect_rule_sets_GetrRNAProductsSuspectRuleSet ()
 
static void s_SummarizeStringConstraint (ostream &out_strm, const CString_constraint &string_constraint)
 
static void s_SummarizeSearchFunc (ostream &out_strm, const CSearch_func &search_func)
 
static void s_SummarizeSuspectRule (ostream &out_strm, const CSuspect_rule &rule)
 

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 Documentation

◆ GetFeatureFunc

typedef std::function< CRef<CSeq_feat>) > GetFeatureFunc

Definition at line 300 of file suspect_product_names.cpp.

Function Documentation

◆ ContainsLetters()

static bool ContainsLetters ( const string prod_name)
static

Definition at line 210 of file suspect_product_names.cpp.

References isalpha().

◆ FixProductName()

string FixProductName ( const CSuspect_rule rule,
CScope ,
string prot_name,
GetFeatureFunc  get_mrna,
GetFeatureFunc  get_cds 
)

◆ GetFirstGBQualMatch()

static string GetFirstGBQualMatch ( const vector< CRef< CGb_qual > > &  quals,
const string qual_name,
unsigned  subfield = 0,
const CString_constraint str_cons = nullptr 
)
static

Definition at line 78 of file suspect_product_names.cpp.

References NStr::EqualNocase(), GetTwoFieldSubfield(), and str().

Referenced by GetRNAProductString().

◆ GetProtAndRnaForCDS()

static void GetProtAndRnaForCDS ( const CSeq_feat cds,
CScope scope,
CSeq_feat *&  prot,
CSeq_feat *&  mrna 
)
static

◆ GetRNAProductString()

static string GetRNAProductString ( const CSeq_feat seq_feat)
static

◆ GetRuleMatch()

static string GetRuleMatch ( const CSuspect_rule rule)
static

◆ GetRuleText()

static string GetRuleText ( const CSuspect_rule rule)
static

Definition at line 126 of file suspect_product_names.cpp.

References CSuspect_rule_Base::GetRule_type().

◆ GetTwoFieldSubfield()

string GetTwoFieldSubfield ( const string str,
unsigned  subfield 
)

◆ ReplaceNoCase()

static string ReplaceNoCase ( const string input,
const string search,
const string replace 
)
static

Definition at line 264 of file suspect_product_names.cpp.

References NStr::FindNoCase(), input(), NPOS, and NStr::TruncateSpacesInPlace().

Referenced by FixProductName().

◆ s_GetrRNAProductsSuspectRuleSet()

static CConstRef<CSuspect_rule_set> s_GetrRNAProductsSuspectRuleSet ( )
static

◆ s_SummarizeSearchFunc()

static void s_SummarizeSearchFunc ( ostream &  out_strm,
const CSearch_func search_func 
)
static

◆ s_SummarizeStringConstraint()

static void s_SummarizeStringConstraint ( ostream &  out_strm,
const CString_constraint string_constraint 
)
static

◆ s_SummarizeSuspectRule()

static void s_SummarizeSuspectRule ( ostream &  out_strm,
const CSuspect_rule rule 
)
static

◆ USING_SCOPE()

USING_SCOPE ( objects  )

Variable Documentation

◆ kSuspectProductNames

const string kSuspectProductNames = "[n] product_name[s] contain[S] suspect phrase[s] or character[s]"
static

Definition at line 208 of file suspect_product_names.cpp.

◆ s_testcase_props__SUSPECT_PRODUCT_NAMES

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 }
staticconstexpr

Definition at line 578 of file suspect_product_names.cpp.

◆ s_testcase_props_ORGANELLE_PRODUCTS

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 }
staticconstexpr

Definition at line 372 of file suspect_product_names.cpp.

◆ s_testcase_props_SUSPECT_PRODUCT_NAMES

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 }
staticconstexpr

Definition at line 221 of file suspect_product_names.cpp.

◆ s_testcase_props_SUSPECT_RRNA_PRODUCTS

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 }
staticconstexpr

Definition at line 551 of file suspect_product_names.cpp.

Modified on Fri Sep 20 14:57:38 2024 by modify_doxy.py rev. 669887