mColumnDelimiter(
""),
67 stringnextLine =
"";
68 while(!lineReader.
AtEOF()) {
69nextLine = *(++lineReader);
92 "Invalid score value - assuming \".\"",
97 "Bad phase value - assuming \".\"",
117scoreIsValid =
false;
131scoreIsValid, score, seqStrand, phase,
attributes);
156 throwerrorInvalidColumnCount;
162 constvector<string>&
columns,
172 constvector<string>&
columns,
194 catch(std::exception&) {
195 throwerrorInvalidSeqStartValue;
200 catch(std::exception&) {
201 throwerrorInvalidSeqStopValue;
204vector<string> strandLegals = {
".",
"+",
"-"};
205 if(find(strandLegals.begin(), strandLegals.end(),
columns[6]) ==
206strandLegals.end()) {
207 throwerrorInvalidSeqStrandValue;
215 constvector<string>&
columns,
225 constvector<string>&
columns,
233 stringattributesStr =
columns[8];
237vector<string> attributesVec;
241 for(
autosingleAttr: attributesVec) {
244 throwerrorInvalidAttributeFormat;
258std::vector<std::string>& attrVec)
261 stringstrCurrAttrib;
262 boolinQuotes =
false;
264 for(
autocurChar: attrStr) {
266 if(curChar ==
'\"') {
269strCurrAttrib += curChar;
271 if(curChar ==
';') {
273 if(!strCurrAttrib.empty())
274attrVec.push_back(strCurrAttrib);
275strCurrAttrib.clear();
277 if(curChar ==
'\"') {
280strCurrAttrib += curChar;
286 if(!strCurrAttrib.empty()) {
287attrVec.push_back(strCurrAttrib);
virtual void xReportProgress()
virtual bool xIgnoreLine(const string &) const
CImportMessageHandler & mErrorReporter
unsigned int LineCount() const
unsigned int mRecordCount
void Initialize(const std::string &, const std::string &, const std::string &, TSeqPos, TSeqPos, bool, double, ENa_strand, const std::string &, const std::vector< std::pair< std::string, std::string >> &)
std::vector< std::string > mValidFeatureTypes
void xInitializeType(const std::vector< std::string > &, std::string &)
void xSplitLine(const std::string &, std::vector< std::string > &)
void xInitializeSource(const std::vector< std::string > &, std::string &)
void xSplitAttributeStringBySemicolons(const std::string &, std::vector< std::string > &)
void xInitializeRecord(const std::vector< std::string > &, CFeatImportData &) override
void xInitializeLocation(const std::vector< std::string > &, std::string &, TSeqPos &, TSeqPos &, ENa_strand &)
CGff3LineReader(CImportMessageHandler &)
void xInitializeAttributes(const std::vector< std::string > &, std::vector< std::pair< std::string, std::string >> &)
std::string mColumnDelimiter
virtual bool GetNextRecord(CStreamLineReader &, CFeatImportData &) override
virtual void ReportError(const CImportError &)
static bool GetSupportedSoTerms(vector< string > &)
Simple implementation of ILineReader for i(o)streams.
static bool InitializeFrame(const std::vector< std::string > &, std::string &)
static bool InitializeScore(const std::vector< std::string > &, bool &, double &)
static const struct attribute attributes[]
static const column_t columns[]
unsigned int TSeqPos
Type for sequence locations and lengths.
bool AtEOF(void) const
Indicates (negatively) whether there is any more input.
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 bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
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 string & ToLower(string &str)
Convert string to lower case â string& version.
ENa_strand
strand of nucleic acid
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
const CharType(& source)[N]
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4