85 columnCountUser->
SetType().SetStr(
"NCBI_BED_COLUMN_COUNT" );
90 pAnnot->
SetDesc().Set().push_back( userDesc );
116 for (
const auto& lineInfo: readerData) {
117 const auto& line = lineInfo.mData;
135 const int MAX_RECORDS = 100000;
144 string line,
head, tail;
182 const size_t COLUMNCOUNT = 15;
184 vector<string> fields;
187 if (fields.size() != COLUMNCOUNT) {
191 "Feature Processing: Bad column count. Should be 15." );
199 annot.
SetData().SetFtable().push_back(feature);
206 const vector<string>& fields )
212 id->SetLocal().SetStr( fields[0] );
228 const vector<string>& fields )
232 display_data->
SetType().SetStr(
"Display Data" );
234 display_data->
AddField(
"name", fields[3] );
245 display_data->
AddField(
"blockSizes", fields[10] );
246 display_data->
AddField(
"blockStarts", fields[11] );
249 if ( fields.size() >= 13 ) {
252 if ( fields.size() >= 14 ) {
253 display_data->
AddField(
"expIds", fields[13] );
255 if ( fields.size() >= 15 ) {
260 feature->
SetData().SetUser( *display_data );
265 const string& strLine)
283 "Track Line Processing: Missing \"expName\" parameter.");
290 "Track Line Processing: Missing \"expScale\" parameter." );
297 "Track Line Processing: Missing \"expStep\" parameter." );
311 auto columnCount =
columns.size();
313 if (columnCount <= 1) {
321 if (columnCount <= 2) {
332 "Bad data line: Invalid \"SeqStart\" (column 2) value." );
336 if (columnCount <= 3) {
347 "Bad data line: Invalid \"SeqStop\" (column 3) value." );
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CRef< CSeq_annot > ReadSeqAnnot(ILineReader &, ILineErrorListener *=nullptr) override
Read an object from a given line reader, render it as a single Seq-annot, if possible.
CRef< CSeq_annot > xCreateSeqAnnot() override
bool xProcessFeature(const string &, CSeq_annot &)
CMicroArrayReader(int=fDefaults, CReaderListener *=nullptr)
virtual ~CMicroArrayReader()
void xSetFeatureLocation(CRef< CSeq_feat > &, const vector< string > &)
static void xCleanColumnValues(vector< string > &)
void xSetFeatureDisplayData(CRef< CSeq_feat > &, const vector< string > &)
vector< string >::size_type m_columncount
virtual bool xProcessTrackLine(const string &)
void xProcessData(const TReaderData &, CSeq_annot &) override
void xGetData(ILineReader &, TReaderData &) override
Common file reader utility functions.
Defines and provides stubs for a general interface to a variety of file readers.
unique_ptr< CReaderMessageHandler > m_pMessageHandler
virtual bool xUngetLine(ILineReader &)
virtual CRef< CSeq_annot > xCreateSeqAnnot()
unsigned int m_uDataCount
unsigned int m_uLineNumber
virtual bool xParseBrowserLine(const string &, CSeq_annot &)
vector< TReaderLine > TReaderData
virtual bool xGetLine(ILineReader &, string &)
virtual bool xParseTrackLine(const string &)
virtual void xAssignTrackData(CSeq_annot &)
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.
struct SReaderLine { SReaderLine(unsigned int line, string data):mLine(line), mData(data) {} TReaderLine
virtual bool xIsTrackLine(const CTempString &)
namespace ncbi::objects::
CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)
add a data field to the user object that holds a given value
Abstract base class for lightweight line-by-line reading.
static const char location[]
static const column_t columns[]
@ eDiag_Error
Error message.
@ eDiag_Warning
Warning message.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
@ fSplit_MergeDelimiters
Merge adjacent delimiters.
void SetType(TType &value)
Assign a value to Type data member.
void SetLocation(TLocation &value)
Assign a value to Location data member.
void SetData(TData &value)
Assign a value to Data data member.
void ResetLocation(void)
Reset Location data member.
void SetTo(TTo value)
Assign a value to To data member.
void SetFrom(TFrom value)
Assign a value to From data member.
void SetStrand(TStrand value)
Assign a value to Strand data member.
void SetData(TData &value)
Assign a value to Data data member.
void SetDesc(TDesc &value)
Assign a value to Desc data member.
TUser & SetUser(void)
Select the variant.
Lightweight interface for getting lines of data with minimal memory copying.
static SLJIT_INLINE sljit_ins lr(sljit_gpr dst, sljit_gpr src)