NCBI C++ ToolKit
|
Search Toolkit Book for CFastaIdValidate
#include <objtools/readers/seqid_validate.hpp>
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 |
Definition at line 61 of file seqid_validate.hpp.
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.
using CFastaIdValidate::TFastaFlags = long |
Definition at line 65 of file seqid_validate.hpp.
using CFastaIdValidate::TIds = list<CRef<CSeq_id> > |
Definition at line 86 of file seqid_validate.hpp.
Enumerator | |
---|---|
eUnexpectedNucResidues | |
eUnexpectedAminoAcids | |
eIDTooLong | |
eBadLocalID | |
eOther |
Definition at line 71 of file seqid_validate.hpp.
CFastaIdValidate::CFastaIdValidate | ( | TFastaFlags | flags | ) |
Definition at line 103 of file seqid_validate.cpp.
|
virtualdefault |
|
protected |
Definition at line 240 of file seqid_validate.cpp.
References CountPossibleNucResidues(), eDiag_Error, eDiag_Warning, eUnexpectedNucResidues, kErrNumNucCharsAtEnd, kWarnNumNucCharsAtEnd, and NStr::NumericToString().
Referenced by operator()().
|
protected |
Definition at line 296 of file seqid_validate.cpp.
References CountPossibleAminoAcids(), eDiag_Warning, eUnexpectedAminoAcids, kWarnNumAminoAcidCharsAtEnd, and NStr::NumericToString().
Referenced by operator()().
|
protected |
Definition at line 169 of file seqid_validate.cpp.
References eDiag_Error, eIDTooLong, GetSeqIdString(), kMaxAccessionLength, kMaxGeneralTagLength, kMaxLocalIDLength, msg(), and s_GetIDLengthErrorString().
Referenced by operator()().
Definition at line 318 of file seqid_validate.cpp.
Referenced by CheckForExcessiveProtData().
Definition at line 286 of file seqid_validate.cpp.
References s_IsPossibleNuc().
Referenced by CheckForExcessiveNucData().
Definition at line 215 of file seqid_validate.cpp.
References IsValidLocalString().
Referenced by operator()().
|
protectedvirtual |
Definition at line 229 of file seqid_validate.cpp.
References CSeq_id::CheckLocalID(), CSeq_id::fInvalidChar, CFastaReader::fQuickIDCheck, m_Flags, and CTempString::substr().
Referenced by IsValidLocalID().
|
virtual |
Definition at line 107 of file seqid_validate.cpp.
References CheckForExcessiveNucData(), CheckForExcessiveProtData(), CheckIDLength(), eBadLocalID, eDiag_Error, CFastaReader::fAssumeNuc, CFastaReader::fAssumeProt, IsValidLocalID(), m_Flags, and msg().
void CFastaIdValidate::SetMaxAccessionLength | ( | size_t | length | ) |
Definition at line 148 of file seqid_validate.cpp.
References kMaxAccessionLength.
Referenced by CSeqIdCheck::operator()().
void CFastaIdValidate::SetMaxGeneralTagLength | ( | size_t | length | ) |
Definition at line 142 of file seqid_validate.cpp.
References kMaxGeneralTagLength.
Referenced by CSeqIdCheck::operator()().
void CFastaIdValidate::SetMaxLocalIDLength | ( | size_t | length | ) |
Definition at line 136 of file seqid_validate.cpp.
References kMaxLocalIDLength.
Referenced by CSeqIdCheck::operator()().
|
protected |
Definition at line 123 of file seqid_validate.hpp.
Referenced by CheckForExcessiveNucData().
|
protected |
Definition at line 127 of file seqid_validate.hpp.
Referenced by CheckIDLength(), and SetMaxAccessionLength().
|
protected |
Definition at line 126 of file seqid_validate.hpp.
Referenced by CheckIDLength(), and SetMaxGeneralTagLength().
|
protected |
Definition at line 125 of file seqid_validate.hpp.
Referenced by CheckIDLength(), and SetMaxLocalIDLength().
|
protected |
Definition at line 124 of file seqid_validate.hpp.
Referenced by CheckForExcessiveProtData().
|
protected |
Definition at line 122 of file seqid_validate.hpp.
Referenced by CheckForExcessiveNucData().
|
protected |
Definition at line 129 of file seqid_validate.hpp.
Referenced by IsValidLocalString(), and operator()().