NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | List of all members
CUCSCRegionReader Class Reference

Search Toolkit Book for CUCSCRegionReader

#include <objtools/readers/ucscregion_reader.hpp>

+ Inheritance diagram for CUCSCRegionReader:
+ Collaboration diagram for CUCSCRegionReader:

Public Member Functions

 CUCSCRegionReader (unsigned int=fNormal)
 
virtual ~CUCSCRegionReader ()
 
CRef< CSeq_annotReadSeqAnnot (ILineReader &lr, ILineErrorListener *pEC) override
 Read an object from a given line reader, render it as a single Seq-annot, if possible. More...
 
CRef< CSerialObjectReadObject (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< CSerialObjectReadObject (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_annotReadSeqAnnot (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_entryReadSeqEntry (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_entryReadSeqEntry (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
 

Protected Member Functions

CRef< CSeq_featxParseFeatureUCSCFormat (const string &Line, int Number)
 
void x_SetFeatureLocation (CRef< CSeq_feat > &feature, const vector< string > &fields)
 
void xSmartFieldSplit (vector< string > &fields, CTempString line)
 
bool xParseFeature (const vector< string > &, CSeq_annot &, ILineErrorListener *)
 
- Protected Member Functions inherited from CReaderBase
 CReaderBase (TReaderFlags flags=0, const string &name="", const string &title="", SeqIdResolver seqresolver=CReadUtil::AsSeqId, CReaderListener *pListener=nullptr)
 Protected constructor. Use GetReader() to get an actual reader object. More...
 
 CReaderBase (const CReaderBase &)=delete
 
 CReaderBase (CReaderBase &&)=delete
 
void xGuardedGetData (ILineReader &, TReaderData &, ILineErrorListener *)
 
virtual void xGuardedProcessData (const TReaderData &, CSeq_annot &, ILineErrorListener *)
 
virtual CRef< CSeq_annotxCreateSeqAnnot ()
 
virtual void xGetData (ILineReader &, TReaderData &)
 
virtual void xProcessData (const TReaderData &, CSeq_annot &)
 
virtual void xValidateAnnot (const CSeq_annot &)
 
virtual bool xGetLine (ILineReader &, string &)
 
virtual bool xUngetLine (ILineReader &)
 
virtual bool xIsCommentLine (const CTempString &)
 
virtual bool xIsTrackLine (const CTempString &)
 
virtual bool xIsBrowserLine (const CTempString &)
 
virtual bool xIsTrackTerminator (const CTempString &)
 
virtual void xAssignTrackData (CSeq_annot &)
 
virtual bool xParseBrowserLine (const string &, CSeq_annot &)
 
virtual bool xParseTrackLine (const string &)
 
virtual void xSetBrowserRegion (const string &, CAnnot_descr &)
 
virtual void xPostProcessAnnot (CSeq_annot &)
 
virtual void xAddConversionInfo (CSeq_annot &, ILineErrorListener *)
 
bool xParseComment (const CTempString &, CRef< CSeq_annot > &)
 
virtual bool xReadInit ()
 
virtual bool xProgressInit (ILineReader &istr)
 
bool xIsReportingProgress () const
 
bool xIsOperationCanceled () const
 
void xReportProgress (ILineErrorListener *=nullptr)
 
void ProcessError (CObjReaderLineException &, ILineErrorListener *)
 
void ProcessError (CLineError &, ILineErrorListener *)
 
void ProcessWarning (CObjReaderLineException &, ILineErrorListener *)
 
void ProcessWarning (CLineError &, ILineErrorListener *)
 
void xProcessReaderMessage (CReaderMessage &, ILineErrorListener *)
 
void xProcessLineError (const ILineError &, ILineErrorListener *)
 
void xProcessUnknownException (const CException &)
 

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 CReaderBaseGetReader (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< CTrackDatam_pTrackDefaults
 
ILineReaderm_pReader
 
ICanceledm_pCanceler
 
SeqIdResolver mSeqIdResolve
 
unique_ptr< CReaderMessageHandlerm_pMessageHandler
 

Detailed Description

Definition at line 50 of file ucscregion_reader.hpp.

Constructor & Destructor Documentation

◆ CUCSCRegionReader()

CUCSCRegionReader::CUCSCRegionReader ( unsigned int  iflags = fNormal)

Definition at line 99 of file ucscregion_reader.cpp.

◆ ~CUCSCRegionReader()

CUCSCRegionReader::~CUCSCRegionReader ( )
virtual

Definition at line 104 of file ucscregion_reader.cpp.

Member Function Documentation

◆ ReadObject()

CRef< CSerialObject > CUCSCRegionReader::ReadObject ( ILineReader lr,
ILineErrorListener pErrors = nullptr 
)
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.

Parameters
lrline reader to read from.
pErrorspointer 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().

◆ ReadSeqAnnot()

CRef< CSeq_annot > CUCSCRegionReader::ReadSeqAnnot ( ILineReader lr,
ILineErrorListener pErrors 
)
overridevirtual

Read an object from a given line reader, render it as a single Seq-annot, if possible.

Return empty Seq-annot otherwise.

Parameters
lrline reader to read from.
pErrorspointer 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().

◆ x_SetFeatureLocation()

void CUCSCRegionReader::x_SetFeatureLocation ( CRef< CSeq_feat > &  feature,
const vector< string > &  fields 
)
protected

◆ xParseFeature()

bool CUCSCRegionReader::xParseFeature ( const vector< string > &  fields,
CSeq_annot annot,
ILineErrorListener pEC 
)
protected

◆ xParseFeatureUCSCFormat()

CRef< objects::CSeq_feat > CUCSCRegionReader::xParseFeatureUCSCFormat ( const string Line,
int  Number 
)
protected

◆ xSmartFieldSplit()

void CUCSCRegionReader::xSmartFieldSplit ( vector< string > &  fields,
CTempString  line 
)
protected

The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:28 2024 by modify_doxy.py rev. 669887