NCBI C++ ToolKit
Typedefs | Functions | Variables
utilities.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <corelib/ncbistr.hpp>
#include <serial/enumvalues.hpp>
#include <serial/serialimpl.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/seqfeat/SeqFeatData.hpp>
#include <objects/seqfeat/Gb_qual.hpp>
#include <objects/seqset/Seq_entry.hpp>
#include <objects/seqset/Bioseq_set.hpp>
#include <objects/seq/Bioseq.hpp>
#include <objects/misc/sequence_macros.hpp>
#include <objects/taxon3/T3Data.hpp>
#include <objects/taxon3/Taxon3_reply.hpp>
#include <objmgr/bioseq_handle.hpp>
#include <objmgr/scope.hpp>
#include <objmgr/seq_vector.hpp>
#include <objmgr/util/sequence.hpp>
#include <objmgr/util/seq_loc_util.hpp>
#include <objmgr/bioseq_ci.hpp>
#include <objmgr/seqdesc_ci.hpp>
#include <objmgr/align_ci.hpp>
#include <objmgr/object_manager.hpp>
#include <objects/taxon3/taxon3.hpp>
#include <objects/taxon1/taxon1.hpp>
#include <objtools/validator/utilities.hpp>
#include <objtools/validator/splice_problems.hpp>
#include <objtools/validator/translation_problems.hpp>
#include <objtools/validator/tax_validation_and_cleanup.hpp>
#include <vector>
#include <algorithm>
#include <list>
+ Include dependency graph for utilities.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Typedefs

typedef vector< CConstRef< CObject_id > > TFeatIdVec
 
typedef CStaticArraySet< const char *, PCase_CStrTBypassCdsTransCheckSet
 
typedef CStaticArraySet< const char *, PCase_CStrTForceCdsTransCheckSet
 

Functions

bool IsClassInEntry (const CSeq_entry &se, CBioseq_set::EClass clss)
 
bool IsDeltaOrFarSeg (const CSeq_loc &loc, CScope *scope)
 
bool IsBlankStringList (const list< string > &str_list)
 
TGi GetGIForSeqId (const CSeq_id &id)
 
CScope::TIds GetSeqIdsForGI (TGi gi)
 
bool IsFarLocation (const CSeq_loc &loc, const CSeq_entry_Handle &seh)
 
string GetSequenceStringFromLoc (const CSeq_loc &loc, CScope &scope)
 
CSeqVector GetSequenceFromLoc (const CSeq_loc &loc, CScope &scope, CBioseq_Handle::EVectorCoding coding)
 
CSeqVector GetSequenceFromFeature (const CSeq_feat &feat, CScope &scope, CBioseq_Handle::EVectorCoding coding, bool product)
 
static string s_GetBioseqAcc (const CSeq_id &id, int *version)
 
static string s_GetBioseqAcc (const CBioseq_Handle &handle, int *version)
 
static string s_GetSeq_featAcc (const CSeq_feat &feat, CScope &scope, int *version)
 
static string s_GetBioseqAcc (const CBioseq &seq, int *version)
 
static const CBioseqs_GetSeqFromSet (const CBioseq_set &bsst)
 
static bool s_IsDescOnSeqEntry (const CSeq_entry &entry, const CSeqdesc &desc)
 
static string s_GetAccessionForSeqdesc (const CSeq_entry_Handle &seh, const CSeqdesc &desc, int *version)
 
static bool IsBioseqInSameSeqEntryAsAlign (const CBioseq_Handle &bsh, const CSeq_align &align, CScope &scope)
 
CConstRef< CSeq_idGetReportableSeqIdForAlignment (const CSeq_align &align, CScope &scope)
 
string GetAccessionFromBioseq (const CBioseq &bioseq, int *version)
 
string GetAccessionFromBioseqSet (const CBioseq_set &bsst, int *version)
 
string GetAccessionFromObjects (const CSerialObject *obj, const CSeq_entry *ctx, CScope &scope, int *version)
 
CBioseq_set_Handle GetSetParent (const CBioseq_set_Handle &set, CBioseq_set::TClass set_class)
 
CBioseq_set_Handle GetSetParent (const CBioseq_Handle &bioseq, CBioseq_set::TClass set_class)
 
CBioseq_set_Handle GetGenProdSetParent (const CBioseq_set_Handle &set)
 
CBioseq_set_Handle GetGenProdSetParent (const CBioseq_Handle &bioseq)
 
CBioseq_set_Handle GetNucProtSetParent (const CBioseq_Handle &bioseq)
 
CBioseq_Handle GetNucBioseq (const CBioseq_set_Handle &bioseq_set)
 
CBioseq_Handle GetNucBioseq (const CBioseq_Handle &bioseq)
 
EAccessionFormatError ValidateAccessionString (const string &accession, bool require_version)
 
bool s_FeatureIdsMatch (const CFeat_id &f1, const CFeat_id &f2)
 
bool s_StringHasPMID (const string &str)
 
bool HasBadCharacter (const string &str)
 
bool EndsWithBadCharacter (const string &str)
 
int CheckDate (const CDate &date, bool require_full_date)
 
bool IsDateInPast (const CDate &date)
 
string GetDateErrorDescription (int flags)
 
bool IsBioseqTSA (const CBioseq &seq, CScope *scope)
 
bool IsAccession (const CSeq_id &id)
 
static void UpdateToBestId (CSeq_loc &loc, CScope &scope)
 
string GetValidatorLocationLabel (const CSeq_loc &loc, CScope &scope)
 
string GetBioseqIdLabel (const CBioseq &sq)
 
void AppendBioseqLabel (string &str, const CBioseq &sq, bool supress_context)
 
bool HasECnumberPattern (const string &str)
 
bool SeqIsPatent (const CBioseq &seq)
 
bool SeqIsPatent (const CBioseq_Handle &seq)
 
bool s_PartialAtGapOrNs (CScope *scope, const CSeq_loc &loc, unsigned int tag, bool only_gap)
 
CBioseq_Handle BioseqHandleFromLocation (CScope *m_Scope, const CSeq_loc &loc)
 
static bool s_PosIsNNotGap (const CSeqVector &vec, unsigned int pos)
 
bool ShouldCheckForNsAndGap (const CBioseq_Handle &bsh)
 
void CheckBioseqEndsForNAndGap (const CSeqVector &vec, EBioseqEndIsType &begin_n, EBioseqEndIsType &begin_gap, EBioseqEndIsType &end_n, EBioseqEndIsType &end_gap, bool &begin_ambig, bool &end_ambig)
 
void CheckBioseqEndsForNAndGap (const CBioseq_Handle &bsh, EBioseqEndIsType &begin_n, EBioseqEndIsType &begin_gap, EBioseqEndIsType &end_n, EBioseqEndIsType &end_gap, bool &begin_ambig, bool &end_ambig)
 
bool IsLocFullLength (const CSeq_loc &loc, const CBioseq_Handle &bsh)
 
bool PartialsSame (const CSeq_loc &loc1, const CSeq_loc &loc2)
 
bool s_IsSameStrand (const CSeq_loc &l1, const CSeq_loc &l2, CScope &scope)
 
bool s_IsSameSeqAnnot (const CSeq_feat_Handle &f1, const CSeq_feat_Handle &f2, bool &diff_descriptions)
 
bool s_AreGBQualsIdentical (const CSeq_feat_Handle &feat1, const CSeq_feat_Handle &feat2, bool case_sensitive)
 
bool s_AreFeatureLabelsSame (const CSeq_feat_Handle &feat, const CSeq_feat_Handle &prev, bool case_sensitive)
 
bool s_IsDifferentDbxrefs (const TDbtags &list1, const TDbtags &list2)
 
bool s_AreFullLengthCodingRegionsWithDifferentFrames (const CSeq_feat_Handle &f1, const CSeq_feat_Handle &f2)
 
string s_ReplaceListFromQuals (const CSeq_feat::TQual &quals)
 
bool s_AreDifferentVariations (const CSeq_feat_Handle &f1, const CSeq_feat_Handle &f2)
 
static bool s_AreLinkedToDifferentFeats (const CSeq_feat_Handle &f1, const CSeq_feat_Handle &f2, CSeqFeatData::ESubtype s1, CSeqFeatData::ESubtype s2)
 
static bool s_AreCodingRegionsLinkedToDifferentmRNAs (const CSeq_feat_Handle &f1, const CSeq_feat_Handle &f2)
 
static bool s_AremRNAsLinkedToDifferentCodingRegions (const CSeq_feat_Handle &f1, const CSeq_feat_Handle &f2)
 
bool IsDicistronicGene (const CSeq_feat_Handle &f)
 Indicates whether feature is a dicistronic gene. More...
 
bool IsDicistronic (const CSeq_feat_Handle &f)
 
EDuplicateFeatureType IsDuplicate (const CSeq_feat_Handle &f1, const CSeq_feat_Handle &f2, bool check_partials, bool case_sensitive)
 Reports how two features duplicate each other. More...
 
bool IsCommonName (const CT3Data &data)
 
bool HasMisSpellFlag (const CT3Data &data)
 
bool FindMatchInOrgRef (const string &str, const COrg_ref &org)
 
void AdjustSpecificHostForTaxServer (string &spec_host)
 
string SpecificHostValueToCheck (const string &val)
 
string InterpretSpecificHostResult (const string &host, const CT3Reply &reply, const string &orig_host)
 
bool IsCommon (const COrg_ref &org, const string &val)
 
bool IsLikelyTaxname (const string &val)
 
bool IsSpecificHostValid (const string &val, string &error_msg)
 returns true and error_msg will be empty, if specific host is valid returns true and error_msg will be "Host is empty", if specific host is empty returns false if specific host is invalid More...
 
string FixSpecificHost (const string &val)
 returns the corrected specific host, if the specific host is invalid and can be corrected returns an empty string, if the specific host is invalid and cannot be corrected returns the original value except the preceding/trailing spaces, if the specific host is valid More...
 
static char s_ConvertChar (char ch)
 
void ConvertToEntrezTerm (string &title)
 
void FixGeneticCode (CCdregion &cdr)
 
string TranslateCodingRegionForValidation (const CSeq_feat &feat, CScope &scope, bool &alt_start)
 
bool HasBadStartCodon (const CSeq_loc &loc, const string &transl_prot)
 
 DEFINE_STATIC_ARRAY_MAP (TBypassCdsTransCheckSet, sc_BypassCdsTransCheck, sc_BypassCdsTransCheckText)
 
 DEFINE_STATIC_ARRAY_MAP (TForceCdsTransCheckSet, sc_ForceCdsTransCheck, sc_ForceCdsTransCheckText)
 
bool ReportTranslationErrors (const string &except_text)
 
bool HasBadStartCodon (const CSeq_feat &feat, CScope &scope, bool ignore_exceptions)
 
size_t CountInternalStopCodons (const string &transl_prot)
 
bool HasInternalStop (const CSeq_feat &feat, CScope &scope, bool ignore_exceptions)
 
CRef< CSeqVectorMakeSeqVectorForResidueCounting (const CBioseq_Handle &bsh)
 
bool HasBadProteinStart (const CSeqVector &sv)
 
bool HasBadProteinStart (const CSeq_feat &feat, CScope &scope)
 
size_t CountProteinStops (const CSeqVector &sv)
 
bool HasStopInProtein (const CSeq_feat &feat, CScope &scope)
 
void FeatureHasEnds (const CSeq_feat &feat, CScope *scope, bool &no_beg, bool &no_end)
 
CBioseq_Handle GetCDSProductSequence (const CSeq_feat &feat, CScope *scope, const CTSE_Handle &tse, bool far_fetch, bool &is_far)
 
void CalculateEffectiveTranslationLengths (const string &transl_prot, const CSeqVector &prot_vec, size_t &len, size_t &prot_len)
 
vector< TSeqPosGetMismatches (const CSeq_feat &feat, const CSeqVector &prot_vec, const string &transl_prot)
 
vector< TSeqPosGetMismatches (const CSeq_feat &feat, const CBioseq_Handle &prot_handle, const string &transl_prot)
 
bool HasNoStop (const CSeq_feat &feat, CScope *scope)
 
bool IsSequenceFetchable (const CSeq_id &id, CScope *scope)
 
bool IsSequenceFetchable (const string &seq_id, CScope *scope)
 
bool IsNTNCNWACAccession (const string &acc)
 
bool IsNTNCNWACAccession (const CSeq_id &id)
 
bool IsNTNCNWACAccession (const CBioseq &seq)
 
bool IsNG (const CSeq_id &id)
 
bool IsNG (const CBioseq &seq)
 
bool IsTemporary (const CSeq_id &id)
 
bool IsOrganelle (int genome)
 
bool IsOrganelle (const CBioseq_Handle &seq)
 
bool ConsistentWithA (Char ch)
 
bool ConsistentWithC (Char ch)
 
bool ConsistentWithG (Char ch)
 
bool ConsistentWithT (Char ch)
 
bool DoesCodingRegionHaveUnnecessaryException (const CSeq_feat &feat, const CBioseq_Handle &loc_handle, CScope &scope)
 
bool DoesmRNAHaveUnnecessaryException (const CSeq_feat &feat, const CBioseq_Handle &nuc, CScope &scope)
 
bool DoesFeatureHaveUnnecessaryException (const CSeq_feat &feat, CScope &scope)
 
static bool s_IsGenbankMasterAccession (const string &acc)
 
bool g_IsMasterAccession (const CSeq_id &id)
 
bool IsInOrganelleSmallGenomeSet (const CSeq_id &id, CScope &scope)
 
bool BadMultipleSequenceLocation (const CSeq_loc &loc, CScope &scope)
 
bool IsBadSubmissionFirstName (const string &first)
 
bool IsBadSubmissionLastName (const string &last)
 

Variables

static const string sIgnoreHostWordList []
 
static const char * kUnclassifiedTranslationDiscrepancy = "unclassified translation discrepancy"
 
static const char *const sc_BypassCdsTransCheckText []
 
static const char *const sc_ForceCdsTransCheckText []
 

Typedef Documentation

◆ TBypassCdsTransCheckSet

Definition at line 2331 of file utilities.cpp.

◆ TFeatIdVec

typedef vector<CConstRef<CObject_id> > TFeatIdVec

Definition at line 1724 of file utilities.cpp.

◆ TForceCdsTransCheckSet

Definition at line 2338 of file utilities.cpp.

Function Documentation

◆ AdjustSpecificHostForTaxServer()

void AdjustSpecificHostForTaxServer ( string spec_host)

◆ AppendBioseqLabel()

void AppendBioseqLabel ( string str,
const CBioseq sq,
bool  supress_context 
)

◆ BadMultipleSequenceLocation()

bool BadMultipleSequenceLocation ( const CSeq_loc loc,
CScope scope 
)

◆ BioseqHandleFromLocation()

CBioseq_Handle BioseqHandleFromLocation ( CScope m_Scope,
const CSeq_loc loc 
)

◆ CalculateEffectiveTranslationLengths()

void CalculateEffectiveTranslationLengths ( const string transl_prot,
const CSeqVector prot_vec,
size_t &  len,
size_t &  prot_len 
)

◆ CheckBioseqEndsForNAndGap() [1/2]

void CheckBioseqEndsForNAndGap ( const CBioseq_Handle bsh,
EBioseqEndIsType begin_n,
EBioseqEndIsType begin_gap,
EBioseqEndIsType end_n,
EBioseqEndIsType end_gap,
bool begin_ambig,
bool end_ambig 
)

◆ CheckBioseqEndsForNAndGap() [2/2]

void CheckBioseqEndsForNAndGap ( const CSeqVector vec,
EBioseqEndIsType begin_n,
EBioseqEndIsType begin_gap,
EBioseqEndIsType end_n,
EBioseqEndIsType end_gap,
bool begin_ambig,
bool end_ambig 
)

◆ CheckDate()

int CheckDate ( const CDate date,
bool  require_full_date 
)

◆ ConsistentWithA()

bool ConsistentWithA ( Char  ch)

◆ ConsistentWithC()

bool ConsistentWithC ( Char  ch)

◆ ConsistentWithG()

bool ConsistentWithG ( Char  ch)

◆ ConsistentWithT()

bool ConsistentWithT ( Char  ch)

◆ ConvertToEntrezTerm()

void ConvertToEntrezTerm ( string title)

◆ CountInternalStopCodons()

size_t CountInternalStopCodons ( const string transl_prot)

◆ CountProteinStops()

size_t CountProteinStops ( const CSeqVector sv)

Definition at line 2504 of file utilities.cpp.

Referenced by HasStopInProtein(), and CValidError_bioseq::ValidateRawConst().

◆ DEFINE_STATIC_ARRAY_MAP() [1/2]

DEFINE_STATIC_ARRAY_MAP ( TBypassCdsTransCheckSet  ,
sc_BypassCdsTransCheck  ,
sc_BypassCdsTransCheckText   
)

◆ DEFINE_STATIC_ARRAY_MAP() [2/2]

DEFINE_STATIC_ARRAY_MAP ( TForceCdsTransCheckSet  ,
sc_ForceCdsTransCheck  ,
sc_ForceCdsTransCheckText   
)

◆ DoesCodingRegionHaveUnnecessaryException()

bool DoesCodingRegionHaveUnnecessaryException ( const CSeq_feat feat,
const CBioseq_Handle loc_handle,
CScope scope 
)

◆ DoesFeatureHaveUnnecessaryException()

bool DoesFeatureHaveUnnecessaryException ( const CSeq_feat feat,
CScope scope 
)

◆ DoesmRNAHaveUnnecessaryException()

bool DoesmRNAHaveUnnecessaryException ( const CSeq_feat feat,
const CBioseq_Handle nuc,
CScope scope 
)

◆ EndsWithBadCharacter()

bool EndsWithBadCharacter ( const string str)

Definition at line 768 of file utilities.cpp.

References NStr::EndsWith(), and str().

Referenced by CSingleFeatValidator::ValidateCharactersInField().

◆ FeatureHasEnds()

void FeatureHasEnds ( const CSeq_feat feat,
CScope scope,
bool no_beg,
bool no_end 
)

◆ FindMatchInOrgRef()

bool FindMatchInOrgRef ( const string str,
const COrg_ref org 
)

◆ FixGeneticCode()

void FixGeneticCode ( CCdregion cdr)

◆ FixSpecificHost()

string FixSpecificHost ( const string val)

returns the corrected specific host, if the specific host is invalid and can be corrected returns an empty string, if the specific host is invalid and cannot be corrected returns the original value except the preceding/trailing spaces, if the specific host is valid

Definition at line 2189 of file utilities.cpp.

References val.

Referenced by BOOST_AUTO_TEST_CASE().

◆ g_IsMasterAccession()

bool g_IsMasterAccession ( const CSeq_id id)

◆ GetAccessionFromBioseq()

string GetAccessionFromBioseq ( const CBioseq bioseq,
int version 
)

Definition at line 427 of file utilities.cpp.

References s_GetBioseqAcc(), and version.

Referenced by CValidError_imp::PostErr().

◆ GetAccessionFromBioseqSet()

string GetAccessionFromBioseqSet ( const CBioseq_set bsst,
int version 
)

◆ GetAccessionFromObjects()

string GetAccessionFromObjects ( const CSerialObject obj,
const CSeq_entry ctx,
CScope scope,
int version 
)

◆ GetBioseqIdLabel()

string GetBioseqIdLabel ( const CBioseq sq)

◆ GetCDSProductSequence()

CBioseq_Handle GetCDSProductSequence ( const CSeq_feat feat,
CScope scope,
const CTSE_Handle tse,
bool  far_fetch,
bool is_far 
)

◆ GetDateErrorDescription()

string GetDateErrorDescription ( int  flags)

◆ GetGenProdSetParent() [1/2]

CBioseq_set_Handle GetGenProdSetParent ( const CBioseq_Handle bioseq)

Definition at line 575 of file utilities.cpp.

References CBioseq_set_Base::eClass_gen_prod_set, and GetSetParent().

◆ GetGenProdSetParent() [2/2]

CBioseq_set_Handle GetGenProdSetParent ( const CBioseq_set_Handle set)

◆ GetGIForSeqId()

TGi GetGIForSeqId ( const CSeq_id id)

◆ GetMismatches() [1/2]

vector<TSeqPos> GetMismatches ( const CSeq_feat feat,
const CBioseq_Handle prot_handle,
const string transl_prot 
)

◆ GetMismatches() [2/2]

vector<TSeqPos> GetMismatches ( const CSeq_feat feat,
const CSeqVector prot_vec,
const string transl_prot 
)

◆ GetNucBioseq() [1/2]

CBioseq_Handle GetNucBioseq ( const CBioseq_Handle bioseq)

◆ GetNucBioseq() [2/2]

CBioseq_Handle GetNucBioseq ( const CBioseq_set_Handle bioseq_set)

◆ GetNucProtSetParent()

CBioseq_set_Handle GetNucProtSetParent ( const CBioseq_Handle bioseq)

◆ GetReportableSeqIdForAlignment()

CConstRef<CSeq_id> GetReportableSeqIdForAlignment ( const CSeq_align align,
CScope scope 
)

◆ GetSeqIdsForGI()

CScope::TIds GetSeqIdsForGI ( TGi  gi)

◆ GetSequenceFromFeature()

CSeqVector GetSequenceFromFeature ( const CSeq_feat feat,
CScope scope,
CBioseq_Handle::EVectorCoding  coding,
bool  product 
)

◆ GetSequenceFromLoc()

CSeqVector GetSequenceFromLoc ( const CSeq_loc loc,
CScope scope,
CBioseq_Handle::EVectorCoding  coding 
)

◆ GetSequenceStringFromLoc()

string GetSequenceStringFromLoc ( const CSeq_loc loc,
CScope scope 
)

◆ GetSetParent() [1/2]

CBioseq_set_Handle GetSetParent ( const CBioseq_Handle bioseq,
CBioseq_set::TClass  set_class 
)

◆ GetSetParent() [2/2]

CBioseq_set_Handle GetSetParent ( const CBioseq_set_Handle set,
CBioseq_set::TClass  set_class 
)

◆ GetValidatorLocationLabel()

string GetValidatorLocationLabel ( const CSeq_loc loc,
CScope scope 
)

◆ HasBadCharacter()

bool HasBadCharacter ( const string str)

Definition at line 755 of file utilities.cpp.

References NStr::Find(), and str().

Referenced by CSingleFeatValidator::ValidateCharactersInField().

◆ HasBadProteinStart() [1/2]

bool HasBadProteinStart ( const CSeq_feat feat,
CScope scope 
)

◆ HasBadProteinStart() [2/2]

bool HasBadProteinStart ( const CSeqVector sv)

◆ HasBadStartCodon() [1/2]

bool HasBadStartCodon ( const CSeq_feat feat,
CScope scope,
bool  ignore_exceptions 
)

◆ HasBadStartCodon() [2/2]

bool HasBadStartCodon ( const CSeq_loc loc,
const string transl_prot 
)

Definition at line 2307 of file utilities.cpp.

References eExtreme_Biological, and CSeq_loc::IsPartialStart().

Referenced by HasBadStartCodon().

◆ HasECnumberPattern()

bool HasECnumberPattern ( const string str)

◆ HasInternalStop()

bool HasInternalStop ( const CSeq_feat feat,
CScope scope,
bool  ignore_exceptions 
)

◆ HasMisSpellFlag()

bool HasMisSpellFlag ( const CT3Data data)

◆ HasNoStop()

bool HasNoStop ( const CSeq_feat feat,
CScope scope 
)

◆ HasStopInProtein()

bool HasStopInProtein ( const CSeq_feat feat,
CScope scope 
)

◆ InterpretSpecificHostResult()

string InterpretSpecificHostResult ( const string host,
const CT3Reply reply,
const string orig_host 
)

◆ IsAccession()

bool IsAccession ( const CSeq_id id)

Definition at line 918 of file utilities.cpp.

Referenced by UpdateToBestId().

◆ IsBadSubmissionFirstName()

bool IsBadSubmissionFirstName ( const string first)

◆ IsBadSubmissionLastName()

bool IsBadSubmissionLastName ( const string last)

◆ IsBioseqInSameSeqEntryAsAlign()

static bool IsBioseqInSameSeqEntryAsAlign ( const CBioseq_Handle bsh,
const CSeq_align align,
CScope scope 
)
static

Definition at line 387 of file utilities.cpp.

References CBioseq_Handle::GetTopLevelEntry().

Referenced by GetReportableSeqIdForAlignment().

◆ IsBioseqTSA()

bool IsBioseqTSA ( const CBioseq seq,
CScope scope 
)

◆ IsBlankStringList()

bool IsBlankStringList ( const list< string > &  str_list)

Definition at line 114 of file utilities.cpp.

References NStr::IsBlank(), ITERATE, and str().

Referenced by CValidError_imp::HasName().

◆ IsClassInEntry()

bool IsClassInEntry ( const CSeq_entry se,
CBioseq_set::EClass  clss 
)

Definition at line 79 of file utilities.cpp.

References si.

Referenced by IsDeltaOrFarSeg().

◆ IsCommon()

bool IsCommon ( const COrg_ref org,
const string val 
)

◆ IsCommonName()

bool IsCommonName ( const CT3Data data)

◆ IsDateInPast()

bool IsDateInPast ( const CDate date)

◆ IsDeltaOrFarSeg()

bool IsDeltaOrFarSeg ( const CSeq_loc loc,
CScope scope 
)

◆ IsDicistronic()

bool IsDicistronic ( const CSeq_feat_Handle f)

Definition at line 1825 of file utilities.cpp.

References f(), NStr::FindNoCase(), and NPOS.

Referenced by IsDicistronicGene().

◆ IsDicistronicGene()

bool IsDicistronicGene ( const CSeq_feat_Handle f)

Indicates whether feature is a dicistronic gene.

Parameters
fSeq-feat-Handle [in]
Returns
Boolean

Definition at line 1818 of file utilities.cpp.

References CSeqFeatData::eSubtype_gene, f(), and IsDicistronic().

Referenced by CValidError_bioseq::x_SuppressDicistronic().

◆ IsDuplicate()

EDuplicateFeatureType IsDuplicate ( const CSeq_feat_Handle f1,
const CSeq_feat_Handle f2,
bool  check_partials = false,
bool  case_sensitive = false 
)

◆ IsFarLocation()

bool IsFarLocation ( const CSeq_loc loc,
const CSeq_entry_Handle seh 
)

◆ IsInOrganelleSmallGenomeSet()

bool IsInOrganelleSmallGenomeSet ( const CSeq_id id,
CScope scope 
)

◆ IsLikelyTaxname()

bool IsLikelyTaxname ( const string val)

◆ IsLocFullLength()

bool IsLocFullLength ( const CSeq_loc loc,
const CBioseq_Handle bsh 
)

◆ IsNG() [1/2]

bool IsNG ( const CBioseq seq)

Definition at line 2801 of file utilities.cpp.

References FOR_EACH_SEQID_ON_BIOSEQ, and IsNG().

◆ IsNG() [2/2]

bool IsNG ( const CSeq_id id)

Definition at line 2790 of file utilities.cpp.

References GetAccession(), and NStr::StartsWith().

Referenced by IsNG(), and CValidError_bioseq::ValidateSeqIds().

◆ IsNTNCNWACAccession() [1/3]

bool IsNTNCNWACAccession ( const CBioseq seq)

Definition at line 2777 of file utilities.cpp.

References FOR_EACH_SEQID_ON_BIOSEQ, and IsNTNCNWACAccession().

◆ IsNTNCNWACAccession() [2/3]

bool IsNTNCNWACAccession ( const CSeq_id id)

Definition at line 2766 of file utilities.cpp.

References GetAccession(), and IsNTNCNWACAccession().

◆ IsNTNCNWACAccession() [3/3]

bool IsNTNCNWACAccession ( const string acc)

◆ IsOrganelle() [1/2]

bool IsOrganelle ( const CBioseq_Handle seq)

◆ IsOrganelle() [2/2]

bool IsOrganelle ( int  genome)

◆ IsSequenceFetchable() [1/2]

bool IsSequenceFetchable ( const CSeq_id id,
CScope scope 
)

◆ IsSequenceFetchable() [2/2]

bool IsSequenceFetchable ( const string seq_id,
CScope scope 
)

Definition at line 2740 of file utilities.cpp.

References IsSequenceFetchable().

◆ IsSpecificHostValid()

bool IsSpecificHostValid ( const string val,
string error_msg 
)

returns true and error_msg will be empty, if specific host is valid returns true and error_msg will be "Host is empty", if specific host is empty returns false if specific host is invalid

Definition at line 2182 of file utilities.cpp.

References CTaxValidationAndCleanup::IsOneSpecificHostValid(), and val.

Referenced by BOOST_AUTO_TEST_CASE(), and CMakeBadSpecificHostTable::x_CheckSpecificHosts().

◆ IsTemporary()

bool IsTemporary ( const CSeq_id id)

◆ MakeSeqVectorForResidueCounting()

CRef<CSeqVector> MakeSeqVectorForResidueCounting ( const CBioseq_Handle bsh)

◆ PartialsSame()

bool PartialsSame ( const CSeq_loc loc1,
const CSeq_loc loc2 
)

◆ ReportTranslationErrors()

bool ReportTranslationErrors ( const string except_text)

◆ s_AreCodingRegionsLinkedToDifferentmRNAs()

static bool s_AreCodingRegionsLinkedToDifferentmRNAs ( const CSeq_feat_Handle f1,
const CSeq_feat_Handle f2 
)
static

◆ s_AreDifferentVariations()

bool s_AreDifferentVariations ( const CSeq_feat_Handle f1,
const CSeq_feat_Handle f2 
)

◆ s_AreFeatureLabelsSame()

bool s_AreFeatureLabelsSame ( const CSeq_feat_Handle feat,
const CSeq_feat_Handle prev,
bool  case_sensitive 
)

◆ s_AreFullLengthCodingRegionsWithDifferentFrames()

bool s_AreFullLengthCodingRegionsWithDifferentFrames ( const CSeq_feat_Handle f1,
const CSeq_feat_Handle f2 
)

◆ s_AreGBQualsIdentical()

bool s_AreGBQualsIdentical ( const CSeq_feat_Handle feat1,
const CSeq_feat_Handle feat2,
bool  case_sensitive 
)

◆ s_AreLinkedToDifferentFeats()

static bool s_AreLinkedToDifferentFeats ( const CSeq_feat_Handle f1,
const CSeq_feat_Handle f2,
CSeqFeatData::ESubtype  s1,
CSeqFeatData::ESubtype  s2 
)
static

◆ s_AremRNAsLinkedToDifferentCodingRegions()

static bool s_AremRNAsLinkedToDifferentCodingRegions ( const CSeq_feat_Handle f1,
const CSeq_feat_Handle f2 
)
static

◆ s_ConvertChar()

static char s_ConvertChar ( char  ch)
static

Definition at line 2199 of file utilities.cpp.

References isalpha(), isdigit(), and tolower().

Referenced by ConvertToEntrezTerm().

◆ s_FeatureIdsMatch()

bool s_FeatureIdsMatch ( const CFeat_id f1,
const CFeat_id f2 
)

◆ s_GetAccessionForSeqdesc()

static string s_GetAccessionForSeqdesc ( const CSeq_entry_Handle seh,
const CSeqdesc desc,
int version 
)
static

◆ s_GetBioseqAcc() [1/3]

static string s_GetBioseqAcc ( const CBioseq seq,
int version 
)
static

Definition at line 285 of file utilities.cpp.

References eGetId_Best, GetId(), kEmptyStr, s_GetBioseqAcc(), and version.

◆ s_GetBioseqAcc() [2/3]

static string s_GetBioseqAcc ( const CBioseq_Handle handle,
int version 
)
static

Definition at line 246 of file utilities.cpp.

References eGetId_Best, GetId(), kEmptyStr, s_GetBioseqAcc(), and version.

◆ s_GetBioseqAcc() [3/3]

static string s_GetBioseqAcc ( const CSeq_id id,
int version 
)
static

◆ s_GetSeq_featAcc()

static string s_GetSeq_featAcc ( const CSeq_feat feat,
CScope scope,
int version 
)
static

◆ s_GetSeqFromSet()

static const CBioseq* s_GetSeqFromSet ( const CBioseq_set bsst)
static

◆ s_IsDescOnSeqEntry()

static bool s_IsDescOnSeqEntry ( const CSeq_entry entry,
const CSeqdesc desc 
)
static

Definition at line 352 of file utilities.cpp.

References CSeq_entry::GetDescr(), and CSeq_entry::IsSetDescr().

Referenced by s_GetAccessionForSeqdesc().

◆ s_IsDifferentDbxrefs()

bool s_IsDifferentDbxrefs ( const TDbtags list1,
const TDbtags list2 
)

Definition at line 1608 of file utilities.cpp.

References NStr::EqualNocase().

Referenced by IsDuplicate().

◆ s_IsGenbankMasterAccession()

static bool s_IsGenbankMasterAccession ( const string acc)
static

Definition at line 2973 of file utilities.cpp.

References NStr::EndsWith().

Referenced by g_IsMasterAccession().

◆ s_IsSameSeqAnnot()

bool s_IsSameSeqAnnot ( const CSeq_feat_Handle f1,
const CSeq_feat_Handle f2,
bool diff_descriptions 
)
inline

◆ s_IsSameStrand()

bool s_IsSameStrand ( const CSeq_loc l1,
const CSeq_loc l2,
CScope scope 
)

Definition at line 1485 of file utilities.cpp.

References eNa_strand_minus, and GetStrand().

Referenced by IsDuplicate(), and s_AreLinkedToDifferentFeats().

◆ s_PartialAtGapOrNs()

bool s_PartialAtGapOrNs ( CScope scope,
const CSeq_loc loc,
unsigned int  tag,
bool  only_gap 
)

◆ s_PosIsNNotGap()

static bool s_PosIsNNotGap ( const CSeqVector vec,
unsigned int  pos 
)
static

Definition at line 1293 of file utilities.cpp.

References CSeqVector::IsInGap(), and CSeqVector::size().

Referenced by CheckBioseqEndsForNAndGap().

◆ s_ReplaceListFromQuals()

string s_ReplaceListFromQuals ( const CSeq_feat::TQual quals)

Definition at line 1686 of file utilities.cpp.

References NStr::Equal(), NStr::IsBlank(), and ITERATE.

Referenced by s_AreDifferentVariations().

◆ s_StringHasPMID()

bool s_StringHasPMID ( const string str)

◆ SeqIsPatent() [1/2]

bool SeqIsPatent ( const CBioseq seq)

◆ SeqIsPatent() [2/2]

bool SeqIsPatent ( const CBioseq_Handle seq)

Definition at line 1170 of file utilities.cpp.

References CBioseq_Handle::GetCompleteBioseq(), and SeqIsPatent().

◆ ShouldCheckForNsAndGap()

bool ShouldCheckForNsAndGap ( const CBioseq_Handle bsh)

◆ SpecificHostValueToCheck()

string SpecificHostValueToCheck ( const string val)

◆ TranslateCodingRegionForValidation()

string TranslateCodingRegionForValidation ( const CSeq_feat feat,
CScope scope,
bool alt_start 
)

◆ UpdateToBestId()

static void UpdateToBestId ( CSeq_loc loc,
CScope scope 
)
static

◆ ValidateAccessionString()

EAccessionFormatError ValidateAccessionString ( const string accession,
bool  require_version 
)

Variable Documentation

◆ kUnclassifiedTranslationDiscrepancy

const char* kUnclassifiedTranslationDiscrepancy = "unclassified translation discrepancy"
static

Definition at line 2320 of file utilities.cpp.

Referenced by HasInternalStop().

◆ sc_BypassCdsTransCheckText

const char* const sc_BypassCdsTransCheckText[]
static
Initial value:
= {
"RNA editing",
"adjusted for low-quality genome",
"annotated by transcript or proteomic data",
"rearrangement required for product",
"reasons given in citation",
"translated product replaced",
}
static const char * kUnclassifiedTranslationDiscrepancy
Definition: utilities.cpp:2320

Definition at line 2322 of file utilities.cpp.

◆ sc_ForceCdsTransCheckText

const char* const sc_ForceCdsTransCheckText[]
static
Initial value:
= {
"artificial frameshift",
"mismatches in translation"
}

Definition at line 2334 of file utilities.cpp.

◆ sIgnoreHostWordList

const string sIgnoreHostWordList[]
static
Initial value:
= {
" cf.",
" cf ",
" aff ",
" aff.",
" near",
" nr.",
" nr ",
}

Definition at line 2022 of file utilities.cpp.

Referenced by AdjustSpecificHostForTaxServer().

Modified on Mon Feb 26 04:04:10 2024 by modify_doxy.py rev. 669887