NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
CCDSTranslationProblems Class Reference

Search Toolkit Book for CCDSTranslationProblems

#include <objtools/validator/translation_problems.hpp>

+ Collaboration diagram for CCDSTranslationProblems:

Classes

struct  STranslationMismatch
 
struct  STranslExceptProblem
 

Public Types

enum  ECDSTranslationProblem {
  eCDSTranslationProblem_FrameNotPartial = 1 , eCDSTranslationProblem_FrameNotConsensus = 2 , eCDSTranslationProblem_NoStop = 4 , eCDSTranslationProblem_StopPartial = 8 ,
  eCDSTranslationProblem_PastStop = 16 , eCDSTranslationProblem_ShouldStartPartial = 32 , eCDSTranslationProblem_Mismatches = 64 , eCDSTranslationProblem_BadStart = 128 ,
  eCDSTranslationProblem_TooManyX = 256 , eCDSTranslationProblem_UnableToFetch = 512 , eCDSTranslationProblem_NoProtein = 1024 , eCDSTranslationProblem_ShouldBePartialButIsnt = 2048 ,
  eCDSTranslationProblem_ShouldNotBePartialButIs = 4096 , eCDSTranslationProblem_UnnecessaryException = 8192 , eCDSTranslationProblem_UnqualifiedException = 16384 , eCDSTranslationProblem_ErroneousException = 32768
}
 
enum  ETranslExceptType { eTranslExceptPhase = 0 , eTranslExceptSuspicious , eTranslExceptUnnecessary , eTranslExceptUnexpected }
 
typedef vector< STranslExceptProblemTTranslExceptProblems
 
typedef vector< STranslationMismatchTTranslationMismatches
 

Public Member Functions

 CCDSTranslationProblems ()
 
 ~CCDSTranslationProblems ()
 
void CalculateTranslationProblems (const CSeq_feat &feat, CBioseq_Handle loc_handle, CBioseq_Handle prot_handle, bool ignore_exceptions, bool far_fetch_cds, bool standalone_annot, bool single_seq, bool is_gpipe, bool is_genomic, bool is_refseq, bool is_nt_or_ng_or_nw, bool is_nc, bool has_accession, CScope *scope)
 
size_t GetTranslationProblemFlags () const
 
const TTranslExceptProblemsGetTranslExceptProblems () const
 
const TTranslationMismatchesGetTranslationMismatches () const
 
bool HasException () const
 
bool UnableToTranslate () const
 
bool HasUnparsedTranslExcept () const
 
size_t GetInternalStopCodons () const
 
size_t GetNumNonsenseIntrons () const
 
bool AltStart () const
 
char GetTranslStartCharacter () const
 
int GetRaggedLength () const
 
size_t GetProtLen () const
 
size_t GetTransLen () const
 
size_t GetTranslTerminalX () const
 
size_t GetProdTerminalX () const
 

Static Public Member Functions

static vector< CRef< CSeq_loc > > GetNonsenseIntrons (const CSeq_feat &feat, CScope &scope)
 

Private Member Functions

void x_Reset ()
 
TTranslExceptProblems x_GetTranslExceptProblems (const CSeq_feat &feat, CBioseq_Handle loc_handle, CScope *scope, bool is_refseq)
 
void x_GetCdTransErrors (const CSeq_feat &feat, CBioseq_Handle product, bool show_stop, bool got_stop, CScope *scope)
 
bool x_JustifiesException () const
 

Static Private Member Functions

static size_t x_CountNonsenseIntrons (const CSeq_feat &feat, CScope *scope)
 
static bool x_ProteinHasTooManyXs (const string &transl_prot)
 
static bool x_IsThreeBaseNonsense (const CSeq_feat &feat, const CSeq_id &id, const CCdregion &cdr, TSeqPos start, TSeqPos stop, ENa_strand strand, CScope *scope)
 
static void x_GetExceptionFlags (const string &except_text, bool &unclassified_except, bool &mismatch_except, bool &frameshift_except, bool &rearrange_except, bool &product_replaced, bool &mixed_population, bool &low_quality, bool &rna_editing, bool &transcript_or_proteomic)
 
static size_t x_CheckCDSFrame (const CSeq_feat &feat, CScope *scope)
 
static bool x_Is5AtEndSpliceSiteOrGap (const CSeq_loc &loc, CScope &scope)
 
static size_t x_CountTerminalXs (const string &transl_prot, bool skip_stop)
 
static size_t x_CountTerminalXs (const CSeqVector &prot_vec)
 
static TTranslationMismatches x_GetTranslationMismatches (const CSeq_feat &feat, const CSeqVector &prot_vec, const string &transl_prot, bool has_accession)
 
static bool x_JustifiesException (const TTranslExceptProblems &problems)
 
static int x_CheckForRaggedEnd (const CSeq_feat &feat, CScope *scope)
 
static int x_CheckForRaggedEnd (const CSeq_loc &, const CCdregion &cdr, CScope *scope)
 

Private Attributes

size_t m_ProblemFlags
 
int m_RaggedLength
 
bool m_HasDashXStart
 
size_t m_ProtLen
 
size_t m_TransLen
 
TTranslationMismatches m_Mismatches
 
char m_TranslStart
 
size_t m_InternalStopCodons
 
bool m_UnableToTranslate
 
size_t m_TranslTerminalX
 
size_t m_ProdTerminalX
 
bool m_UnparsedTranslExcept
 
bool m_AltStart
 
size_t m_NumNonsenseIntrons
 
TTranslExceptProblems m_TranslExceptProblems
 
bool m_HasException
 

Detailed Description

Definition at line 56 of file translation_problems.hpp.

Member Typedef Documentation

◆ TTranslationMismatches

Definition at line 122 of file translation_problems.hpp.

◆ TTranslExceptProblems

Definition at line 110 of file translation_problems.hpp.

Member Enumeration Documentation

◆ ECDSTranslationProblem

Enumerator
eCDSTranslationProblem_FrameNotPartial 
eCDSTranslationProblem_FrameNotConsensus 
eCDSTranslationProblem_NoStop 
eCDSTranslationProblem_StopPartial 
eCDSTranslationProblem_PastStop 
eCDSTranslationProblem_ShouldStartPartial 
eCDSTranslationProblem_Mismatches 
eCDSTranslationProblem_BadStart 
eCDSTranslationProblem_TooManyX 
eCDSTranslationProblem_UnableToFetch 
eCDSTranslationProblem_NoProtein 
eCDSTranslationProblem_ShouldBePartialButIsnt 
eCDSTranslationProblem_ShouldNotBePartialButIs 
eCDSTranslationProblem_UnnecessaryException 
eCDSTranslationProblem_UnqualifiedException 
eCDSTranslationProblem_ErroneousException 

Definition at line 77 of file translation_problems.hpp.

◆ ETranslExceptType

Enumerator
eTranslExceptPhase 
eTranslExceptSuspicious 
eTranslExceptUnnecessary 
eTranslExceptUnexpected 

Definition at line 99 of file translation_problems.hpp.

Constructor & Destructor Documentation

◆ CCDSTranslationProblems()

CCDSTranslationProblems::CCDSTranslationProblems ( )

Definition at line 53 of file translation_problems.cpp.

◆ ~CCDSTranslationProblems()

CCDSTranslationProblems::~CCDSTranslationProblems ( )
inline

Definition at line 59 of file translation_problems.hpp.

Member Function Documentation

◆ AltStart()

bool CCDSTranslationProblems::AltStart ( ) const
inline

◆ CalculateTranslationProblems()

void CCDSTranslationProblems::CalculateTranslationProblems ( const CSeq_feat feat,
CBioseq_Handle  loc_handle,
CBioseq_Handle  prot_handle,
bool  ignore_exceptions,
bool  far_fetch_cds,
bool  standalone_annot,
bool  single_seq,
bool  is_gpipe,
bool  is_genomic,
bool  is_refseq,
bool  is_nt_or_ng_or_nw,
bool  is_nc,
bool  has_accession,
CScope scope 
)

◆ GetInternalStopCodons()

size_t CCDSTranslationProblems::GetInternalStopCodons ( ) const
inline

◆ GetNonsenseIntrons()

vector< CRef< CSeq_loc > > CCDSTranslationProblems::GetNonsenseIntrons ( const CSeq_feat feat,
CScope scope 
)
static

◆ GetNumNonsenseIntrons()

size_t CCDSTranslationProblems::GetNumNonsenseIntrons ( ) const
inline

◆ GetProdTerminalX()

size_t CCDSTranslationProblems::GetProdTerminalX ( ) const
inline

◆ GetProtLen()

size_t CCDSTranslationProblems::GetProtLen ( ) const
inline

◆ GetRaggedLength()

int CCDSTranslationProblems::GetRaggedLength ( ) const
inline

◆ GetTranslationMismatches()

const TTranslationMismatches& CCDSTranslationProblems::GetTranslationMismatches ( ) const
inline

◆ GetTranslationProblemFlags()

size_t CCDSTranslationProblems::GetTranslationProblemFlags ( ) const
inline

◆ GetTransLen()

size_t CCDSTranslationProblems::GetTransLen ( ) const
inline

◆ GetTranslExceptProblems()

const TTranslExceptProblems& CCDSTranslationProblems::GetTranslExceptProblems ( ) const
inline

◆ GetTranslStartCharacter()

char CCDSTranslationProblems::GetTranslStartCharacter ( ) const
inline

◆ GetTranslTerminalX()

size_t CCDSTranslationProblems::GetTranslTerminalX ( ) const
inline

◆ HasException()

bool CCDSTranslationProblems::HasException ( ) const
inline

◆ HasUnparsedTranslExcept()

bool CCDSTranslationProblems::HasUnparsedTranslExcept ( ) const
inline

◆ UnableToTranslate()

bool CCDSTranslationProblems::UnableToTranslate ( ) const
inline

◆ x_CheckCDSFrame()

size_t CCDSTranslationProblems::x_CheckCDSFrame ( const CSeq_feat feat,
CScope scope 
)
staticprivate

◆ x_CheckForRaggedEnd() [1/2]

int CCDSTranslationProblems::x_CheckForRaggedEnd ( const CSeq_feat feat,
CScope scope 
)
staticprivate

◆ x_CheckForRaggedEnd() [2/2]

int CCDSTranslationProblems::x_CheckForRaggedEnd ( const CSeq_loc loc,
const CCdregion cdr,
CScope scope 
)
staticprivate

◆ x_CountNonsenseIntrons()

size_t CCDSTranslationProblems::x_CountNonsenseIntrons ( const CSeq_feat feat,
CScope scope 
)
staticprivate

◆ x_CountTerminalXs() [1/2]

size_t CCDSTranslationProblems::x_CountTerminalXs ( const CSeqVector prot_vec)
staticprivate

Definition at line 574 of file translation_problems.cpp.

References CSeqVector::size().

◆ x_CountTerminalXs() [2/2]

size_t CCDSTranslationProblems::x_CountTerminalXs ( const string transl_prot,
bool  skip_stop 
)
staticprivate

Definition at line 552 of file translation_problems.cpp.

References i.

◆ x_GetCdTransErrors()

void CCDSTranslationProblems::x_GetCdTransErrors ( const CSeq_feat feat,
CBioseq_Handle  product,
bool  show_stop,
bool  got_stop,
CScope scope 
)
private

Definition at line 283 of file translation_problems.cpp.

References FeatureHasEnds(), and CBioseq_Handle::GetScope().

◆ x_GetExceptionFlags()

void CCDSTranslationProblems::x_GetExceptionFlags ( const string except_text,
bool unclassified_except,
bool mismatch_except,
bool frameshift_except,
bool rearrange_except,
bool product_replaced,
bool mixed_population,
bool low_quality,
bool rna_editing,
bool transcript_or_proteomic 
)
staticprivate

Definition at line 456 of file translation_problems.cpp.

References NStr::FindNoCase(), and NPOS.

◆ x_GetTranslationMismatches()

CCDSTranslationProblems::TTranslationMismatches CCDSTranslationProblems::x_GetTranslationMismatches ( const CSeq_feat feat,
const CSeqVector prot_vec,
const string transl_prot,
bool  has_accession 
)
staticprivate

◆ x_GetTranslExceptProblems()

CCDSTranslationProblems::TTranslExceptProblems CCDSTranslationProblems::x_GetTranslExceptProblems ( const CSeq_feat feat,
CBioseq_Handle  loc_handle,
CScope scope,
bool  is_refseq 
)
private

◆ x_Is5AtEndSpliceSiteOrGap()

bool CCDSTranslationProblems::x_Is5AtEndSpliceSiteOrGap ( const CSeq_loc loc,
CScope scope 
)
staticprivate

◆ x_IsThreeBaseNonsense()

bool CCDSTranslationProblems::x_IsThreeBaseNonsense ( const CSeq_feat feat,
const CSeq_id id,
const CCdregion cdr,
TSeqPos  start,
TSeqPos  stop,
ENa_strand  strand,
CScope scope 
)
staticprivate

◆ x_JustifiesException() [1/2]

bool CCDSTranslationProblems::x_JustifiesException ( ) const
private

Definition at line 529 of file translation_problems.cpp.

◆ x_JustifiesException() [2/2]

bool CCDSTranslationProblems::x_JustifiesException ( const TTranslExceptProblems problems)
staticprivate

Definition at line 822 of file translation_problems.cpp.

◆ x_ProteinHasTooManyXs()

bool CCDSTranslationProblems::x_ProteinHasTooManyXs ( const string transl_prot)
staticprivate

Definition at line 435 of file translation_problems.cpp.

References ITERATE.

◆ x_Reset()

void CCDSTranslationProblems::x_Reset ( void  )
private

Definition at line 59 of file translation_problems.cpp.

Member Data Documentation

◆ m_AltStart

bool CCDSTranslationProblems::m_AltStart
private

Definition at line 155 of file translation_problems.hpp.

◆ m_HasDashXStart

bool CCDSTranslationProblems::m_HasDashXStart
private

Definition at line 145 of file translation_problems.hpp.

◆ m_HasException

bool CCDSTranslationProblems::m_HasException
private

Definition at line 158 of file translation_problems.hpp.

◆ m_InternalStopCodons

size_t CCDSTranslationProblems::m_InternalStopCodons
private

Definition at line 150 of file translation_problems.hpp.

◆ m_Mismatches

TTranslationMismatches CCDSTranslationProblems::m_Mismatches
private

Definition at line 148 of file translation_problems.hpp.

◆ m_NumNonsenseIntrons

size_t CCDSTranslationProblems::m_NumNonsenseIntrons
private

Definition at line 156 of file translation_problems.hpp.

◆ m_ProblemFlags

size_t CCDSTranslationProblems::m_ProblemFlags
private

Definition at line 143 of file translation_problems.hpp.

◆ m_ProdTerminalX

size_t CCDSTranslationProblems::m_ProdTerminalX
private

Definition at line 153 of file translation_problems.hpp.

◆ m_ProtLen

size_t CCDSTranslationProblems::m_ProtLen
private

Definition at line 146 of file translation_problems.hpp.

◆ m_RaggedLength

int CCDSTranslationProblems::m_RaggedLength
private

Definition at line 144 of file translation_problems.hpp.

◆ m_TransLen

size_t CCDSTranslationProblems::m_TransLen
private

Definition at line 147 of file translation_problems.hpp.

◆ m_TranslExceptProblems

TTranslExceptProblems CCDSTranslationProblems::m_TranslExceptProblems
private

Definition at line 157 of file translation_problems.hpp.

◆ m_TranslStart

char CCDSTranslationProblems::m_TranslStart
private

Definition at line 149 of file translation_problems.hpp.

◆ m_TranslTerminalX

size_t CCDSTranslationProblems::m_TranslTerminalX
private

Definition at line 152 of file translation_problems.hpp.

◆ m_UnableToTranslate

bool CCDSTranslationProblems::m_UnableToTranslate
private

Definition at line 151 of file translation_problems.hpp.

◆ m_UnparsedTranslExcept

bool CCDSTranslationProblems::m_UnparsedTranslExcept
private

Definition at line 154 of file translation_problems.hpp.


The documentation for this class was generated from the following files:
Modified on Thu Feb 29 12:24:16 2024 by modify_doxy.py rev. 669887