NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
CFastaIdValidate Class Reference

Search Toolkit Book for CFastaIdValidate

#include <objtools/readers/seqid_validate.hpp>

+ Collaboration diagram for CFastaIdValidate:

Public Types

enum  EErrCode {
  eUnexpectedNucResidues , eUnexpectedAminoAcids , eIDTooLong , eBadLocalID ,
  eOther
}
 
using TFastaFlags = long
 
using FReportError = function< void(EDiagSev severity, int lineNum, const string &idString, EErrCode errCode, const string &msg)>
 
using TIds = list< CRef< CSeq_id > >
 

Public Member Functions

 CFastaIdValidate (TFastaFlags flags)
 
virtual ~CFastaIdValidate ()=default
 
virtual void operator() (const TIds &ids, int lineNum, FReportError fReportError)
 
void SetMaxLocalIDLength (size_t length)
 
void SetMaxGeneralTagLength (size_t length)
 
void SetMaxAccessionLength (size_t length)
 

Protected Member Functions

void CheckIDLength (const CSeq_id &id, int lineNum, FReportError fReportError) const
 
bool IsValidLocalID (const CSeq_id &id) const
 
virtual bool IsValidLocalString (const CTempString &idString) const
 
void CheckForExcessiveNucData (const CSeq_id &id, int lineNum, FReportError fReportError) const
 
void CheckForExcessiveProtData (const CSeq_id &id, int lineNum, FReportError fReportError) const
 

Static Protected Member Functions

static size_t CountPossibleNucResidues (const string &idString)
 
static size_t CountPossibleAminoAcids (const string &idString)
 

Protected Attributes

size_t kWarnNumNucCharsAtEnd = 20
 
size_t kErrNumNucCharsAtEnd = 25
 
size_t kWarnNumAminoAcidCharsAtEnd = 50
 
size_t kMaxLocalIDLength = CSeq_id::kMaxLocalIDLength
 
size_t kMaxGeneralTagLength = CSeq_id::kMaxGeneralTagLength
 
size_t kMaxAccessionLength = CSeq_id::kMaxAccessionLength
 
TFastaFlags m_Flags
 

Detailed Description

Definition at line 61 of file seqid_validate.hpp.

Member Typedef Documentation

◆ FReportError

using CFastaIdValidate::FReportError = function<void(EDiagSev severity, int lineNum, const string& idString, EErrCode errCode, const string& msg)>

Definition at line 79 of file seqid_validate.hpp.

◆ TFastaFlags

Definition at line 65 of file seqid_validate.hpp.

◆ TIds

Definition at line 86 of file seqid_validate.hpp.

Member Enumeration Documentation

◆ EErrCode

Enumerator
eUnexpectedNucResidues 
eUnexpectedAminoAcids 
eIDTooLong 
eBadLocalID 
eOther 

Definition at line 71 of file seqid_validate.hpp.

Constructor & Destructor Documentation

◆ CFastaIdValidate()

CFastaIdValidate::CFastaIdValidate ( TFastaFlags  flags)

Definition at line 103 of file seqid_validate.cpp.

◆ ~CFastaIdValidate()

virtual CFastaIdValidate::~CFastaIdValidate ( )
virtualdefault

Member Function Documentation

◆ CheckForExcessiveNucData()

void CFastaIdValidate::CheckForExcessiveNucData ( const CSeq_id id,
int  lineNum,
FReportError  fReportError 
) const
protected

◆ CheckForExcessiveProtData()

void CFastaIdValidate::CheckForExcessiveProtData ( const CSeq_id id,
int  lineNum,
FReportError  fReportError 
) const
protected

◆ CheckIDLength()

void CFastaIdValidate::CheckIDLength ( const CSeq_id id,
int  lineNum,
FReportError  fReportError 
) const
protected

◆ CountPossibleAminoAcids()

size_t CFastaIdValidate::CountPossibleAminoAcids ( const string idString)
staticprotected

Definition at line 318 of file seqid_validate.cpp.

Referenced by CheckForExcessiveProtData().

◆ CountPossibleNucResidues()

size_t CFastaIdValidate::CountPossibleNucResidues ( const string idString)
staticprotected

Definition at line 286 of file seqid_validate.cpp.

References s_IsPossibleNuc().

Referenced by CheckForExcessiveNucData().

◆ IsValidLocalID()

bool CFastaIdValidate::IsValidLocalID ( const CSeq_id id) const
protected

Definition at line 215 of file seqid_validate.cpp.

References IsValidLocalString().

Referenced by operator()().

◆ IsValidLocalString()

bool CFastaIdValidate::IsValidLocalString ( const CTempString idString) const
protectedvirtual

◆ operator()()

void CFastaIdValidate::operator() ( const TIds ids,
int  lineNum,
FReportError  fReportError 
)
virtual

◆ SetMaxAccessionLength()

void CFastaIdValidate::SetMaxAccessionLength ( size_t  length)

Definition at line 148 of file seqid_validate.cpp.

References kMaxAccessionLength.

Referenced by CSeqIdCheck::operator()().

◆ SetMaxGeneralTagLength()

void CFastaIdValidate::SetMaxGeneralTagLength ( size_t  length)

Definition at line 142 of file seqid_validate.cpp.

References kMaxGeneralTagLength.

Referenced by CSeqIdCheck::operator()().

◆ SetMaxLocalIDLength()

void CFastaIdValidate::SetMaxLocalIDLength ( size_t  length)

Definition at line 136 of file seqid_validate.cpp.

References kMaxLocalIDLength.

Referenced by CSeqIdCheck::operator()().

Member Data Documentation

◆ kErrNumNucCharsAtEnd

size_t CFastaIdValidate::kErrNumNucCharsAtEnd = 25
protected

Definition at line 123 of file seqid_validate.hpp.

Referenced by CheckForExcessiveNucData().

◆ kMaxAccessionLength

size_t CFastaIdValidate::kMaxAccessionLength = CSeq_id::kMaxAccessionLength
protected

Definition at line 127 of file seqid_validate.hpp.

Referenced by CheckIDLength(), and SetMaxAccessionLength().

◆ kMaxGeneralTagLength

size_t CFastaIdValidate::kMaxGeneralTagLength = CSeq_id::kMaxGeneralTagLength
protected

Definition at line 126 of file seqid_validate.hpp.

Referenced by CheckIDLength(), and SetMaxGeneralTagLength().

◆ kMaxLocalIDLength

size_t CFastaIdValidate::kMaxLocalIDLength = CSeq_id::kMaxLocalIDLength
protected

Definition at line 125 of file seqid_validate.hpp.

Referenced by CheckIDLength(), and SetMaxLocalIDLength().

◆ kWarnNumAminoAcidCharsAtEnd

size_t CFastaIdValidate::kWarnNumAminoAcidCharsAtEnd = 50
protected

Definition at line 124 of file seqid_validate.hpp.

Referenced by CheckForExcessiveProtData().

◆ kWarnNumNucCharsAtEnd

size_t CFastaIdValidate::kWarnNumNucCharsAtEnd = 20
protected

Definition at line 122 of file seqid_validate.hpp.

Referenced by CheckForExcessiveNucData().

◆ m_Flags

TFastaFlags CFastaIdValidate::m_Flags
protected

Definition at line 129 of file seqid_validate.hpp.

Referenced by IsValidLocalString(), and operator()().


The documentation for this class was generated from the following files:
Modified on Sat May 25 14:17:10 2024 by modify_doxy.py rev. 669887