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/gb__load__option__panel_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/loaders/gb_load_option_panel.cpp Source File

48 #include <wx/stattext.h> 49 #include <wx/statbox.h> 51 #include <wx/bitmap.h> 52 #include <wx/msgdlg.h> 53 #include <wx/settings.h> 55 #include <wx/txtstrm.h> 56 #include <wx/sstream.h> 92 

wxPanel::Create( parent,

id

, pos,

size

, style );

97

GetSizer()->SetSizeHints(

this

);

128

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

129

itemPanel1->SetSizer(itemBoxSizer2);

131

wxStaticText* itemStaticText3 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Accessions to load:"

), wxDefaultPosition, wxDefaultSize, 0 );

132

itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_LEFT|wxALL, 5);

134

wxStaticText* itemStaticText4 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Separate accessions with spaces, tabs, commas or semicolons.\nAdd a range to accession after colon (NT_029999:5k-10k)."

), wxDefaultPosition, wxDefaultSize, 0 );

135

itemBoxSizer2->Add(itemStaticText4, 0, wxGROW|wxALL, 5);

137  m_AccInput

=

new CRichTextCtrl

( itemPanel1,

ID_ACC_INPUT

, wxEmptyString, wxDefaultPosition, itemPanel1->ConvertDialogToPixels(wxSize(250, 100)), wxWANTS_CHARS|wxTE_RICH2|wxTE_MULTILINE );

138

itemBoxSizer2->Add(

m_AccInput

, 1, wxGROW|wxALL, 5);

140

wxStaticText* itemStaticText6 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Recently loaded accessions:"

), wxDefaultPosition, wxDefaultSize, 0 );

141

itemBoxSizer2->Add(itemStaticText6, 0, wxALIGN_LEFT|wxALL, 5);

143  m_MRUWindow

=

new CwxHtmlWindow

( itemPanel1,

ID_HTMLWINDOW2

, wxDefaultPosition, itemPanel1->ConvertDialogToPixels(wxSize(250, 100)), wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );

144

itemBoxSizer2->Add(

m_MRUWindow

, 1, wxGROW|wxALL, 5);

148  m_ErrStyle

.SetBackgroundColour(wxColour(255, 200, 200));

169

wxStringOutputStream strstrm;

170

wxTextOutputStream os(strstrm);

172

os <<

wxT

(

"<html><body>"

);

174  for

( TMap::const_reverse_iterator it =

map

.rbegin(); it !=

map

.rend(); ++it) {

175

time_t

t

= it->first;

177  string

acc = it->second.GetAccession();

179

os <<

wxT

(

"<b><a href=\""

) << acc <<

wxT

(

"\">"

) << acc

180

<<

wxT

(

"</a></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"

)

181

<<

wxT

(

"<font color=#808080>last&nbsp;loaded&nbsp;&nbsp;"

)

186

os <<

wxT

(

"</body></html>"

);

189  m_MRUWindow

->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));

206 #define GB_LOADER_ERR "GenBank - Error in input" 208 #define INVALID_ELEMS_MSG " elements are not valid sequence identifiers and so cannot be loaded.\ 209 \nWould you like to proceed?" 211 #define INVALID_INPUT "Input does not contain valid sequence identifiers." 213 #define EMPTY_INPUT "Please specify one or more sequence identifiers to load!" 224

wxOK | wxICON_ERROR,

this

);

228

wxOK | wxICON_ERROR,

this

);

233

wxYES_NO | wxICON_EXCLAMATION,

this

);

241 const char

*

sRangeRegexp

=

"[0-9,]+[kKmM]?([-:]|\\.\\.)[0-9,]+[kKmM]?"

;

260

from = NStr::StringToNumeric<CSeq_interval::TFrom>(pos.front()) - 1;

261

to = NStr::StringToNumeric<CSeq_interval::TTo>(pos.back()) - 1;

282

vector<string> splits;

283

vector<SIZE_TYPE> split_pos;

285  size_t size

= splits.size();

286

tokens.resize(

size

);

288  for

(

size_t i

= 0;

i

<

size

;

i

++) {

289

tokens[

i

].m_Pos = (

int

)split_pos[

i

];

290

tokens[

i

].m_Size = (

int

)splits[

i

].

size

();

291

tokens[

i

].m_Valid =

false

;

297  CRegexp

regexGenAcc(

"GC(A|F)_\\d{9}(.\\d+)"

);

299  size_t

processed = 0;

301  for

(; processed <

size

; processed++) {

305  string

s_id = splits[processed];

311  if

(na.find(

"."

) == string::npos)

313  m_NAs

.push_back(na);

314

tokens[processed].m_Valid =

true

;

319  size_t

pos = s_id.find(

':'

);

321  bool

seq_id_valid =

true

;

323  if

(pos != string::npos) {

324

range = s_id.substr(pos + 1);

325

s_id = s_id.substr(0, pos);

328

seq_id_valid = re.

IsMatch

(range);

336

seq_id_valid =

false

;

355

ival.

SetId

().Assign(*id_copy);

360

seq_id_valid =

false

;

364

seq_id_valid =

false

;

369  if

(!regexGenAcc.

IsMatch

(s_id))

370

seq_id_valid =

false

;

372

seq_id_valid =

true

;

373

tokens[processed].m_GenomicAccession =

true

;

381

tokens[processed].m_Valid = seq_id_valid;

387  return

(

int

)processed;

392  static bool

fReentry =

false

;

401

vector<Token> tokens;

405

},

wxT

(

"Validating accessions..."

));

413  bool

restoreFocus = (wxWindow::FindFocus() ==

m_AccInput

);

417  for

(

size_t i

= 0;

i

< (size_t)processed;

i

++) {

418  if

(!tokens[

i

].m_Valid) {

420  int

start = tokens[

i

].m_Pos;

421  int

end = start + tokens[

i

].m_Size;

422  if

(valid_start < start)

427  string value

=

text

.substr(tokens[

i

].m_Pos, tokens[

i

].m_Size);

433  int

start = tokens[processed].m_Pos;

434  int

end = (

int

)

text

.size();

435  if

(valid_start < start)

440  if

(valid_start < (

int

)

text

.size())

452  const

wxHtmlLinkInfo

info

=

event

.GetLinkInfo();

458

vector<string> tokens;

461  for

(vector<string>::iterator it = tokens.begin(); it != tokens.end(); ++it) {

464

tokens.push_back(acc);

471  if

(!

input

.empty())

477 static const char

*

kPanelTag

=

"GenBankLoadOptionPanel"

;

489  if

(encoded.size() < 10000) {

505

vector<string> values;

511  CTime

time(it->first);

514  string

accession = it->second.GetAccession();

515

values.push_back(s_time);

516

values.push_back(accession);

534

vector<string> values;

538  for

(

size_t i

= 0;

i

+ 1 < values.size() ; ) {

539  string

s_time = values[

i

++];

540  string

accession = values[

i

++];

547

}

catch

(

const

exception&) {

562  static bool

fReentry =

false

;

std::invoke_result< _Fty, ICanceled & >::type GUI_AsyncExec(_Fty &&_Fnarg, const wxString &msg=wxT("Accessing network..."))

CRegistryWriteView GetWriteView(const string &section)

get a read-write view at a particular level.

static CGuiRegistry & GetInstance()

access the application-wide singleton

CRegistryReadView GetReadView(const string &section) const

get a read-only view at a particular level.

class CRegistryReadView provides a nested hierarchical view at a particular key.

string GetString(const string &key, const string &default_val=kEmptyStr) const

void GetStringVec(const string &key, vector< string > &val) const

void Set(const string &key, int val)

access a named key at this level, with no recursion

CRichTextCtrl - a wrapper for wxRichTextCtrl that handles additional keyboard events (such as Clipboa...

CAccDescriptor value_type

const TTimeToTMap & GetMap() const

void Add(T elem, time_t time=0)

Interface for testing cancellation request in a long lasting operation.

const char * sRangeRegexp

static string sFormatTimePeriod(CTime &t_now, CTime &t_before)

#define INVALID_ELEMS_MSG

static string sDelim(" \t,;\n\r")

static bool sParseRange(CSeq_interval &ival, const string &range)

static const char * kIdsInputTag

static const char * kMRUTag

static const char * kPanelTag

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

static bool IsNAA(const string &annot, bool isStrict=false)

check if a given annotation is a named annotation accession[.version][number] when isSctrict == false...

void SaveMruAccessions(const string &regPath)

vector< string > m_ValidTokens

vector< CRef< CObject > > TIdsVec

void SaveSettings(const string &regPath)

void SetInput(const string &input)

static bool ShowToolTips()

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

void OnRecentAccClicked(wxHtmlLinkEvent &event)

wxEVT_COMMAND_HTML_LINK_CLICKED event handler for ID_HTMLWINDOW2

vector< string > m_GenomicAccessions

~CGenBankLoadOptionPanel()

CRichTextCtrl * m_AccInput

void OnAccInputUpdated(wxCommandEvent &event)

wxEVT_COMMAND_TEXT_UPDATED event handler for ID_ACC_INPUT

int x_ProccessText(const string &text, vector< Token > &tokens, ICanceled &canceled)

CGenBankLoadOptionPanel()

CwxHtmlWindow * m_MRUWindow

bool Create(wxWindow *parent, wxWindowID id=ID_CGENBANKLOADOPTIONPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(266, 184), long style=wxTAB_TRAVERSAL)

void LoadSettings(const string &regPath)

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...

virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)

Optimized implementation of CSerialObject::Assign, which is not so efficient.

CConstRef< CSeq_id > GetSeqId(void) const

EAccessionInfo

For IdentifyAccession (below)

static E_Choice GetAccType(EAccessionInfo info)

static CSeq_id_Handle GetHandle(const CSeq_id &id)

Normal way of getting a handle, works for any seq-id.

const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)

If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...

@ eGetId_Best

return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function

static CRef< CObjectManager > GetInstance(void)

Return the existing object manager or create one.

void AddDefaults(TPriority pri=kPriority_Default)

Add default data loaders from object manager.

TObjectType * GetPointer(void) THROWS_NONE

Get pointer,.

bool IsMatch(CTempString str, TMatch flags=fMatch_default)

Check existence substring which match a specified pattern.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

virtual bool IsCanceled(void) const =0

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 URLDecode(const CTempString str, EUrlDecode flag=eUrlDec_All)

URL-decode string.

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

static string IntToString(int value, TNumToStringFlags flags=0, int base=10)

Convert int to string.

static string Join(const TContainer &arr, const CTempString &delim)

Join strings using the specified delimiter.

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 & ToUpper(string &str)

Convert string to upper case – string& version.

static string URLEncode(const CTempString str, EUrlEncode flag=eUrlEnc_SkipMarkChars)

URL-encode string.

@ fSplit_Tokenize

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

CTime & ToLocalTime(void)

Convert the time into local time.

string AsString(const CTimeFormat &format=kEmptyStr, TSeconds out_tz=eCurrentTimeZone) const

Transform time to string.

time_t GetTimeT(void) const

Get time in time_t format.

static CTimeFormat GetPredefined(EPredefined fmt, TFlags flags=fDefault)

Get predefined format.

@ eCurrent

Use current time. See also CCurrentTime.

@ eISO8601_DateTimeSec

Y-M-DTh:m:s (eg 1997-07-16T19:20:30)

void SetTo(TTo value)

Assign a value to To data member.

void SetId(TId &value)

Assign a value to Id data member.

void SetFrom(TFrom value)

Assign a value to From data member.

E_Choice

Choice variants.

unsigned int

A callback function used to compare two keys in a database.

The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format

static void text(MDB_val *v)

const struct ncbi::grid::netcache::search::fields::SIZE size

const GenericPointer< typename T::ValueType > T2 value

C++ wrappers for the Perl-compatible regular expression (PCRE) library.

wxString ToWxString(const string &s)

string ToStdString(const wxString &s)


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