A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ucscregion__reader_8cpp_source.html below:

NCBI C++ ToolKit: src/objtools/readers/ucscregion_reader.cpp Source File

94 #define NCBI_USE_ERRCODE_X Objtools_Rd_RepMask 112

vector<string> Tokens;

113  string

Delims =

".:- \t"

;

116  for

(

int

I = 0; I <

Line

.length(); I++) {

124  string

IdStr =

Line

.substr(0, IdSubI);

125  string

SubLine =

Line

.substr(IdSubI );

129

Tokens.insert(Tokens.begin(), IdStr);

139  if

(Tokens.size() < K_START+1)

144  if

(Tokens.size() >= K_STOP+1) {

152

TopLoc->

SetInt

().SetId().Assign(*CRegionFile::x_ParseId(Tokens[

K_ID

]));

154  if

(Tokens.size() >= K_STOP+1)

159  if

(Tokens.size() >= K_STRAND+1) {

160  if

(Tokens[K_STRAND] ==

"+"

)

162  else if

(Tokens[K_STRAND] ==

"-"

)

183  if

(line[line.

length

()-1] ==

'-'

)

184

fields.push_back(

"-"

);

185  while

(fields.size() > 3)

187  if

(fields.size() == 4 && (fields.back() ==

"+"

|| fields.back() ==

"-"

))

190  size_t len

= fields[0].length();

191  if

(line[

len

] ==

'.'

)

193

fields[0] += line[

len

];

194

fields[0] += fields[1];

195

fields.

erase

(fields.begin()+1);

203  const

vector<string>& fields,

214

feature->

SetData

().SetRegion() =

"region: "

+ str_line_number;

216

feature->

SetTitle

() =

"Line:"

+ str_line_number;

222  ftable

.push_back( feature );

228  const

vector<string>& fields )

247  catch

(std::exception&) {

252  "Invalid data line: Bad \"SeqStart\" value."

) );

261  catch

(std::exception&) {

266  "Invalid data line: Bad \"SeqStop\" value."

) );

273  else if

(from < to) {

282  "Invalid data line: \"SeqStop\" less than \"SeqStart\"."

) );

286  size_t

strand_field = 3;

287  if

(strand_field < fields.size()) {

288  string

strand = fields[strand_field];

289  if

(strand !=

"+"

&& strand !=

"-"

&& strand !=

"."

) {

294  "Invalid data line: Invalid strand character."

) );

297  location

->SetStrand(( fields[strand_field] ==

"+"

) ?

313  "Malformed sequence id:"

) );

332  const size_t

MAX_RECORDS = 100000;

342  int

featureCount = 0;

344  while

(!

lr

.AtEOF()) {

359

vector<string> fields;

365  if

(tbl.size() >= MAX_RECORDS) {

370  if

(0 == featureCount) {

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

static CObjReaderLineException * Create(EDiagSev eSeverity, unsigned int uLine, const std::string &strMessage, EProblem eProblem=eProblem_GeneralParsingError, const std::string &strSeqId=string(""), const std::string &strFeatureName=string(""), const std::string &strQualifierName=string(""), const std::string &strQualifierValue=string(""), CObjReaderLineException::EErrCode eErrCode=eFormat, const TVecOfLines &vecOfOtherLines=TVecOfLines())

Please use this instead of the constructor because the ctor is protected.

static CRef< CSeq_id > AsSeqId(const string &rawId, long flags=0, bool localInts=true)

Convert a raw ID string to a Seq-id, based in given customization flags.

Defines and provides stubs for a general interface to a variety of file readers.

unsigned int m_uLineNumber

void ProcessError(CObjReaderLineException &, ILineErrorListener *)

bool xParseComment(const CTempString &, CRef< CSeq_annot > &)

namespace ncbi::objects::

CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...

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

CRef< CSeq_feat > xParseFeatureUCSCFormat(const string &Line, int Number)

CRef< CSeq_annot > ReadSeqAnnot(ILineReader &lr, ILineErrorListener *pEC) override

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

CRef< CSerialObject > ReadObject(ILineReader &lr, ILineErrorListener *pErrors=nullptr) override

Read an object from a given line reader, render it as the most appropriate Genbank object.

bool xParseFeature(const vector< string > &, CSeq_annot &, ILineErrorListener *)

CUCSCRegionReader(unsigned int=fNormal)

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

virtual ~CUCSCRegionReader()

Abstract base class for lightweight line-by-line reading.

Include a standard set of the NCBI C++ Toolkit most basic headers.

static const char location[]

@ eDiag_Error

Error message.

void Info(CExceptionArgs_Base &args)

static EAccessionInfo IdentifyAccession(const CTempString &accession, TParseFlags flags=fParse_AnyRaw)

Deduces information from a bare accession a la WHICH_db_accession; may report false negatives on prop...

EAccessionInfo

For IdentifyAccession (below)

void Reset(void)

Reset reference object.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static CTempString TruncateSpaces_Unsafe(const CTempString str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string.

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 IntToString(int value, TNumToStringFlags flags=0, int base=10)

Convert int to string.

void erase(size_type pos=0)

Truncate the string at some specified position Note: basic_string<> supports additional erase() optio...

static Uint8 StringToUInt8(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to Uint8.

size_type length(void) const

Return the length of the represented array.

static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string.

@ fAllowCommas

Allow commas. See 'ENumToStringFlags::fWithCommas'.

@ fSplit_Tokenize

All delimiters are merged and trimmed, to get non-empty tokens only.

void SetLocation(TLocation &value)

Assign a value to Location data member.

void SetTitle(const TTitle &value)

Assign a value to Title data member.

void SetData(TData &value)

Assign a value to Data data member.

bool CanGetTitle(void) const

Check if it is safe to call GetTitle method.

TFrom GetFrom(void) const

Get the From member data.

const TInt & GetInt(void) const

Get the variant data.

void SetData(TData &value)

Assign a value to Data data member.

void SetDesc(TDesc &value)

Assign a value to Desc data member.

list< CRef< CSeq_feat > > TFtable

Lightweight interface for getting lines of data with minimal memory copying.

constexpr bool empty(list< Ts... >) noexcept

Defines the CNcbiApplication and CAppException classes for creating NCBI applications.

Defines NCBI C++ exception handling.

Multi-threading – classes, functions, and features.

Useful/utility classes and methods.

static SLJIT_INLINE sljit_ins lr(sljit_gpr dst, sljit_gpr src)


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