(p = line; *p !=
'\0'&& *p !=
' '&& *p !=
'\t';)
106gi = (*p ==
'\0') ?
false:
true;
115entry->
drop=
true;
120 for(
r= q + 1; *
r>=
'0'&& *
r<=
'9';)
126entry->
drop=
true;
137entry->
drop=
true;
147entry->
drop=
true;
152 for(*p++ =
ch1; *p ==
' '|| *p ==
'\t';)
156 if(*p !=
'\0'&& ! ign_toks) {
167entry->
drop=
true;
171 for(q = p; *q >=
'0'&& *q <=
'9';)
175entry->
drop=
true;
191 for(p = line; *p ==
' '|| *p ==
'\t';)
211 for(q =
str+ 5; *q >=
'0'&& *q <=
'9';)
217 for(q = p + 5; *q >=
'0'&& *q <=
'9';)
224 for(q =
str+ 5; *q ==
'0';)
227 for(q = p + 5; *q ==
'0';)
236ibp->
bases= to - from + 1;
278 autotibnp = ibl.before_begin();
281 while(! end_of_file) {
285tibnp = ibl.emplace_after(tibnp, entry);
293after_LOCUS =
false;
294after_DEFNTN =
false;
295after_SOURCE =
false;
296after_REFER =
false;
298after_ORIGIN =
false;
299after_COMMENT =
false;
300after_VERSION =
false;
306line_locus =
nullptr;
313 while(currentKeyword !=
ParFlat_END&& ! end_of_file) {
314 switch(currentKeyword) {
318entry->
drop=
true;
327entry->
drop=
true;
329after_COMMENT =
true;
334 if(p && atol(p + 3) > 0)
336 if(pp->
accver==
false)
340entry->
drop=
true;
343after_VERSION =
true;
345 while(*p ==
' '|| *p ==
'\t')
347 for(q = p; *q !=
'\0'&& *q !=
'\r'&& *q !=
'\n';)
351 if(*q !=
' '&& *q !=
'\t') {
356line_ver =
StringSave(string_view(p, q - p));
362 while(*p ==
' '|| *p ==
'\t')
364 for(q = p; *q !=
'\0'&& *q !=
' '&& *q !=
'\t'&&
365*q !=
'\r'&& *q !=
'\n';)
367line_nid =
StringSave(string_view(p, q - p));
372entry->
drop=
true;
373}
else if(after_LOCUS ==
false) {
375entry->
drop=
true;
377after_DEFNTN =
true;
383entry->
drop=
true;
384}
else if(after_LOCUS ==
false|| after_DEFNTN ==
false) {
386entry->
drop=
true;
388after_SOURCE =
true;
397entry->
drop=
true;
402 if(entry->
is_mga==
false) {
404entry->
drop=
true;
408entry->
drop=
true;
415entry->
drop=
true;
417(after_LOCUS ==
false||
418after_DEFNTN ==
false||
419after_SOURCE ==
false)) {
421entry->
drop=
true;
429entry->
drop=
true;
432(after_LOCUS ==
false||
433after_DEFNTN ==
false||
434after_SOURCE ==
false||
435after_FEAT ==
false)) {
437entry->
drop=
true;
439after_ORIGIN =
true;
444 if(acwflag ==
false)
456 "Error at linenum %d. Segmented sets are not supported.",
458entry->
drop=
true;
463entry->
drop=
true;
467 if(entry->
is_tpa==
false&&
478kwds.push_front(finfo.
str+ 8);
483dbl.push_front(finfo.
str+ 8);
492 while(! end_of_file && (finfo.
str[0] ==
' '|| finfo.
str[0] ==
'\t')) {
494kwds.push_back(finfo.
str);
499dbl.push_back(finfo.
str);
511 if(! kwds.empty()) {
525 if(finfo.
str[0] !=
' '&& finfo.
str[0] !=
'\t'&&
527entry->
drop=
true;
533 if(! entry->
drop) {
538entry->
drop=
true;
540 if(entry->
is_mga&& after_MGA ==
false)
543 if(after_LOCUS ==
false)
546 if(after_VERSION ==
false&& pp->
accver)
549 if(after_DEFNTN ==
false)
552 if(after_SOURCE ==
false)
556entry->
is_wgs==
false&&
562 if(after_FEAT ==
false) {
581line_locus =
nullptr;
593 if(acwflag ==
false&&
601(*fun)(entry,
data->mBuf.ptr,
static_cast<Int4>(
data->mBuf.len));
620 for(
auto& it : ibl) {
624 return(end_of_file);
bool QSIndex(ParserPtr pp, const TIndBlkList &ibl, unsigned ibl_size)
DataBlk * LoadEntry(ParserPtr pp, size_t offset, size_t len)
#define ERR_FORMAT_LineTypeOrder
std::list< std::string > TKeywordList
int fta_atoi(string_view sv)
bool fta_StartsWith(const char *s1, string_view s2)
bool StringEquN(const char *s1, const char *s2, size_t n)
bool StringEqu(const char *s1, const char *s2)
size_t StringLen(const char *s)
char * StringRChr(char *s, const char c)
void FtaDeletePrefix(int prefix)
#define FtaErrPost(sev, level,...)
static const char * str(char *buf, int n)
vector< string > genbankKeywords
static void ParseGenBankVersion(IndexblkPtr entry, char *line, char *nid, Parser::ESource source, Parser::EMode mode, bool ign_toks)
static bool gb_err_field(const char *str)
bool GenBankIndex(ParserPtr pp, void(*fun)(IndexblkPtr entry, char *offset, Int4 len))
static bool fta_check_mga_line(char *line, IndexblkPtr ibp)
int32_t Int4
4-byte (32-bit) signed integer
char Char
Alias for char.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
IndexblkPtr InitialEntry(ParserPtr pp, FinfoBlk &finfo)
bool FindNextEntryBuf(bool end_of_file, FileBuf &fbuf, FinfoBlk &finfo, string_view keyword)
bool XReadFileBuf(FileBuf &fbuf, FinfoBlk &finfo)
bool CkLocusLinePos(char *offset, Parser::ESource source, LocusContPtr lcp, bool is_mga)
void MsgSkipTitleFail(const char *flatfile, FinfoBlk &finfo)
bool SkipTitleBuf(FileBuf &fbuf, FinfoBlk &finfo, string_view keyword)
forward_list< unique_ptr< Indexblk > > TIndBlkList
#define ERR_VERSION_NonDigitVerNum
#define ERR_VERSION_MissingVerNum
#define ERR_ACCESSION_NoAccessNum
#define ERR_FORMAT_IncorrectMGALine
#define ERR_VERSION_IncorrectGIInVersion
#define ERR_VERSION_NonDigitGI
#define ERR_VERSION_BadVersionLine
#define ERR_VERSION_InvalidVersion
#define ERR_FORMAT_MissingField
#define ERR_ENTRY_InvalidLineType
#define ERR_VERSION_AccessionsDontMatch
if(yy_accept[yy_current_state])
const CharType(& source)[N]
static const BitmapCharRec ch1
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
const CConstRef< CSeq_id > GetAccession(const CSeq_id_Handle &id_handle)
vector< IndexblkPtr > entrylist
void check_est_sts_gss_tpa_kwds(const TKeywordList &kwds, size_t len, IndexblkPtr entry, bool tpa_check, bool &specialist_db, bool &inferential, bool &experimental, bool &assembly)
bool CheckLineType(string_view str, Int4 type, const vector< string > &keywordList, bool after_origin)
int SrchKeyword(string_view str, const vector< string > &keywordList)
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