NCBI C++ ToolKit
|
Search Toolkit Book for CUCSCRegionReader
#include <objtools/readers/ucscregion_reader.hpp>
Public Member Functions | |
CUCSCRegionReader (unsigned int=fNormal) | |
virtual | ~CUCSCRegionReader () |
CRef< CSeq_annot > | ReadSeqAnnot (ILineReader &lr, ILineErrorListener *pEC) override |
Read an object from a given line reader, render it as a single Seq-annot, if possible. More... | |
CRef< CSerialObject > | ReadObject (ILineReader &lr, ILineErrorListener *pErrors=nullptr) override |
Read an object from a given line reader, render it as the most appropriate Genbank object. More... | |
Public Member Functions inherited from CReaderBase | |
virtual | ~CReaderBase () |
virtual CRef< CSerialObject > | ReadObject (CNcbiIstream &istr, ILineErrorListener *pErrors=nullptr) |
Read an object from a given input stream, render it as the most appropriate Genbank object. More... | |
virtual CRef< CSeq_annot > | ReadSeqAnnot (CNcbiIstream &istr, ILineErrorListener *pErrors=nullptr) |
Read an object from a given input stream, render it as a single Seq-annot. More... | |
virtual void | ReadSeqAnnots (TAnnots &annots, CNcbiIstream &istr, ILineErrorListener *pErrors=nullptr) |
Read all objects from given insput stream, returning them as a vector of Seq-annots. More... | |
virtual void | ReadSeqAnnots (TAnnots &annots, ILineReader &lr, ILineErrorListener *pErrors=nullptr) |
Read all objects from given insput stream, returning them as a vector of Seq-annots. More... | |
virtual CRef< CSeq_entry > | ReadSeqEntry (CNcbiIstream &istr, ILineErrorListener *pErrors=nullptr) |
Read an object from a given input stream, render it as a single Seq-entry, if possible. More... | |
virtual CRef< CSeq_entry > | ReadSeqEntry (ILineReader &lr, ILineErrorListener *pErrors=nullptr) |
Read an object from a given line reader, render it as a single Seq-entry, if possible. More... | |
void | SetProgressReportInterval (unsigned int intv) |
void | SetCanceler (ICanceled *=nullptr) |
bool | IsCanceled () const |
Additional Inherited Members | |
Public Types inherited from CReaderBase | |
enum | EFlags { fNormal = 0 , fNumericIdsAsLocal = 1<<0 , fAllIdsAsLocal = 1<<1 , fNextInLine = 1<<2 , fAsRaw = 1<<3 } |
Customization flags that are relevant to all CReaderBase derived readers. More... | |
enum | ObjectType { OT_UNKNOWN , OT_SEQANNOT , OT_SEQENTRY } |
using | TReaderLine = struct SReaderLine { SReaderLine(unsigned int line, string data):mLine(line), mData(data) {} |
using | TReaderData = vector< TReaderLine > |
using | TReaderFlags = long |
typedef list< CRef< CSeq_annot > > | TAnnotList |
typedef TAnnotList | TAnnots |
typedef TAnnots::iterator | TAnnotIt |
typedef TAnnots::const_iterator | TAnnotCit |
using | SeqIdResolver = CRef< CSeq_id >(*)(const string &, long, bool) |
Static Public Member Functions inherited from CReaderBase | |
static CReaderBase * | GetReader (CFormatGuess::EFormat format, TReaderFlags flags=0, CReaderListener *=nullptr) |
Allocate a CReaderBase derived reader object based on the given file format. More... | |
Public Attributes inherited from CReaderBase | |
unsigned int | mLine |
string | mData |
Static Protected Member Functions inherited from CReaderBase | |
static void | xAddStringFlagsWithMap (const list< string > &stringFlags, const map< string, TReaderFlags > flagMap, TReaderFlags &baseFlags) |
Protected Attributes inherited from CReaderBase | |
unsigned int | m_uLineNumber |
unsigned int | m_uDataCount = 0 |
unsigned int | m_uProgressReportInterval |
unsigned int | m_uNextProgressReport |
TReaderFlags | m_iFlags |
string | m_AnnotName |
string | m_AnnotTitle |
string | m_PendingLine |
unique_ptr< CTrackData > | m_pTrackDefaults |
ILineReader * | m_pReader |
ICanceled * | m_pCanceler |
SeqIdResolver | mSeqIdResolve |
unique_ptr< CReaderMessageHandler > | m_pMessageHandler |
Definition at line 50 of file ucscregion_reader.hpp.
Definition at line 99 of file ucscregion_reader.cpp.
|
virtual |
Definition at line 104 of file ucscregion_reader.cpp.
|
overridevirtual |
Read an object from a given line reader, render it as the most appropriate Genbank object.
This will be Seq-annot by default but may be something else (Bioseq, Seq-entry, ...) in derived classes. This is the only function that does not come with a default implementation. That is, an implementation must be provided in the derived class.
lr | line reader to read from. |
pErrors | pointer to optional error container object. |
Reimplemented from CReaderBase.
Definition at line 320 of file ucscregion_reader.cpp.
References lr(), and ReadSeqAnnot().
Referenced by sRunTest(), sUpdateCase(), and CMultiReaderApp::xProcessUCSCRegion().
|
overridevirtual |
Read an object from a given line reader, render it as a single Seq-annot, if possible.
Return empty Seq-annot otherwise.
lr | line reader to read from. |
pErrors | pointer to optional error container object. |
Reimplemented from CReaderBase.
Definition at line 328 of file ucscregion_reader.cpp.
References ctll::empty(), lr(), CReaderBase::m_uLineNumber, CRef< C, Locker >::Reset(), CSeq_annot_Base::SetData(), CSeq_annot_Base::SetDesc(), NStr::TruncateSpaces_Unsafe(), CReaderBase::xParseComment(), xParseFeature(), and xSmartFieldSplit().
Referenced by ReadObject().
|
protected |
Definition at line 226 of file ucscregion_reader.cpp.
References CReadUtil::AsSeqId(), CObjReaderLineException::Create(), eDiag_Error, eNa_strand_minus, eNa_strand_plus, NStr::fAllowCommas, location, CReaderBase::m_iFlags, CReaderBase::m_uLineNumber, CSeq_feat_Base::SetLocation(), and NStr::StringToInt().
Referenced by xParseFeature().
|
protected |
Definition at line 202 of file ucscregion_reader.cpp.
References CSeq_feat_Base::CanGetTitle(), ftable, NStr::IntToString(), CReaderBase::m_uLineNumber, CReaderBase::ProcessError(), CRef< C, Locker >::Reset(), CSeq_annot_Base::SetData(), CSeq_feat_Base::SetData(), CSeq_feat_Base::SetTitle(), and x_SetFeatureLocation().
Referenced by ReadSeqAnnot().
|
protected |
Definition at line 108 of file ucscregion_reader.cpp.
References CSeq_feat_Base::CanGetTitle(), eNa_strand_minus, eNa_strand_plus, NStr::fSplit_Tokenize, CSeq_interval_Base::GetFrom(), CSeq_loc_Base::GetInt(), CSeq_id::IdentifyAccession(), Info(), NStr::IntToString(), K_ID, NStr::ReplaceInPlace(), CSeq_feat_Base::SetData(), CSeq_loc::SetInt(), CSeq_feat_Base::SetLocation(), CSeq_feat_Base::SetTitle(), NStr::Split(), NStr::StringToUInt8(), and NStr::TruncateSpaces().
|
protected |
Definition at line 180 of file ucscregion_reader.cpp.
References CTempString::erase(), NStr::fSplit_Tokenize, len, CTempString::length(), and NStr::Split().
Referenced by ReadSeqAnnot().