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

Search Toolkit Book for CMicroArrayReader

#include <objtools/readers/microarray_reader.hpp>

+ Inheritance diagram for CMicroArrayReader:
+ Collaboration diagram for CMicroArrayReader:

Public Types

enum  { fDefaults = 0 , fReadAsBed = (1 << 0) }
 
- 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)
 

Public Member Functions

 CMicroArrayReader (int=fDefaults, CReaderListener *=nullptr)
 
virtual ~CMicroArrayReader ()
 
CRef< CSeq_annotReadSeqAnnot (ILineReader &, ILineErrorListener *=nullptr) override
 Read an object from a given line reader, render it as a single Seq-annot, if possible. 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< CSerialObjectReadObject (ILineReader &lr, ILineErrorListener *pErrors=nullptr)
 Read an object from a given line reader, 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_annotxCreateSeqAnnot () override
 
void xGetData (ILineReader &, TReaderData &) override
 
void xProcessData (const TReaderData &, CSeq_annot &) override
 
virtual bool xProcessTrackLine (const string &)
 
bool xProcessFeature (const string &, CSeq_annot &)
 
void xSetFeatureLocation (CRef< CSeq_feat > &, const vector< string > &)
 
void xSetFeatureDisplayData (CRef< CSeq_feat > &, const vector< string > &)
 
- 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 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 &)
 

Static Protected Member Functions

static void xCleanColumnValues (vector< string > &)
 
- Static Protected Member Functions inherited from CReaderBase
static void xAddStringFlagsWithMap (const list< string > &stringFlags, const map< string, TReaderFlags > flagMap, TReaderFlags &baseFlags)
 

Protected Attributes

string m_currentId
 
vector< string >::size_type m_columncount
 
bool m_usescore
 
string m_strExpNames
 
int m_iExpScale
 
int m_iExpStep
 
- 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
 

Additional Inherited Members

- 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
 

Detailed Description

Definition at line 46 of file microarray_reader.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
fDefaults 
fReadAsBed 

Definition at line 51 of file microarray_reader.hpp.

Constructor & Destructor Documentation

◆ CMicroArrayReader()

CMicroArrayReader::CMicroArrayReader ( int  flags = fDefaults,
CReaderListener pRL = nullptr 
)

Definition at line 54 of file microarray_reader.cpp.

References fReadAsBed, and CReaderBase::m_iFlags.

◆ ~CMicroArrayReader()

CMicroArrayReader::~CMicroArrayReader ( )
virtual

Definition at line 67 of file microarray_reader.cpp.

Member Function Documentation

◆ ReadSeqAnnot()

CRef< CSeq_annot > CMicroArrayReader::ReadSeqAnnot ( ILineReader lr,
ILineErrorListener pErrors = nullptr 
)
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 74 of file microarray_reader.cpp.

References CUser_object::AddField(), CSerialObject::Assign(), m_columncount, CReaderBase::ReadSeqAnnot(), CSeq_annot_Base::SetDesc(), CUser_object_Base::SetType(), CAnnotdesc_Base::SetUser(), and CReaderBase::xAssignTrackData().

◆ xCleanColumnValues()

void CMicroArrayReader::xCleanColumnValues ( vector< string > &  columns)
staticprotected

Definition at line 306 of file microarray_reader.cpp.

References eDiag_Error, NStr::EqualNocase(), and NStr::Replace().

Referenced by xProcessFeature().

◆ xCreateSeqAnnot()

CRef< CSeq_annot > CMicroArrayReader::xCreateSeqAnnot ( )
overrideprotectedvirtual

◆ xGetData()

void CMicroArrayReader::xGetData ( ILineReader lr,
TReaderData readerData 
)
overrideprotectedvirtual

◆ xProcessData()

void CMicroArrayReader::xProcessData ( const TReaderData readerData,
CSeq_annot annot 
)
overrideprotectedvirtual

Reimplemented from CReaderBase.

Definition at line 111 of file microarray_reader.cpp.

References CReaderBase::xParseBrowserLine(), xProcessFeature(), and xProcessTrackLine().

◆ xProcessFeature()

bool CMicroArrayReader::xProcessFeature ( const string line,
CSeq_annot annot 
)
protected

◆ xProcessTrackLine()

bool CMicroArrayReader::xProcessTrackLine ( const string strLine)
protectedvirtual

◆ xSetFeatureDisplayData()

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

◆ xSetFeatureLocation()

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

Member Data Documentation

◆ m_columncount

vector<string>::size_type CMicroArrayReader::m_columncount
protected

Definition at line 100 of file microarray_reader.hpp.

Referenced by ReadSeqAnnot().

◆ m_currentId

string CMicroArrayReader::m_currentId
protected

Definition at line 99 of file microarray_reader.hpp.

Referenced by xGetData().

◆ m_iExpScale

int CMicroArrayReader::m_iExpScale
protected

Definition at line 103 of file microarray_reader.hpp.

Referenced by xProcessTrackLine().

◆ m_iExpStep

int CMicroArrayReader::m_iExpStep
protected

Definition at line 104 of file microarray_reader.hpp.

Referenced by xProcessTrackLine().

◆ m_strExpNames

string CMicroArrayReader::m_strExpNames
protected

Definition at line 102 of file microarray_reader.hpp.

Referenced by xProcessTrackLine().

◆ m_usescore

bool CMicroArrayReader::m_usescore
protected

Definition at line 101 of file microarray_reader.hpp.

Referenced by xSetFeatureDisplayData().


The documentation for this class was generated from the following files:
Modified on Wed Feb 21 09:54:12 2024 by modify_doxy.py rev. 669887