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

NCBI C++ ToolKit: src/gui/widgets/edit/inference_panel.cpp Source File

38 #include <wx/statbox.h> 39 #include <wx/combobox.h> 94 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

95

CFormattedQualPanel::Create( parent,

id

, pos,

size

, style );

100

GetSizer()->SetSizeHints(

this

);

144

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxHORIZONTAL);

145

itemCFormattedQualPanel1->SetSizer(itemBoxSizer2);

147

wxArrayString m_CategoryCtrlStrings;

148

m_CategoryCtrlStrings.Add(wxEmptyString);

149

m_CategoryCtrlStrings.Add(

_

(

"COORDINATES"

));

150

m_CategoryCtrlStrings.Add(

_

(

"DESCRIPTION"

));

151

m_CategoryCtrlStrings.Add(

_

(

"EXISTENCE"

));

152  m_CategoryCtrl

=

new

wxChoice( itemCFormattedQualPanel1,

ID_CHOICE12

, wxDefaultPosition, wxDefaultSize, m_CategoryCtrlStrings, 0 );

153

itemBoxSizer2->Add(

m_CategoryCtrl

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);

155

wxArrayString m_TypeCtrlStrings;

156

m_TypeCtrlStrings.Add(wxEmptyString);

157

m_TypeCtrlStrings.Add(

_

(

"similar to sequence"

));

158

m_TypeCtrlStrings.Add(

_

(

"similar to protein"

));

159

m_TypeCtrlStrings.Add(

_

(

"similar to DNA"

));

160

m_TypeCtrlStrings.Add(

_

(

"similar to RNA"

));

161

m_TypeCtrlStrings.Add(

_

(

"similar to mRNA"

));

162

m_TypeCtrlStrings.Add(

_

(

"similar to EST"

));

163

m_TypeCtrlStrings.Add(

_

(

"similar to other RNA"

));

164

m_TypeCtrlStrings.Add(

_

(

"profile"

));

165

m_TypeCtrlStrings.Add(

_

(

"nucleotide motif"

));

166

m_TypeCtrlStrings.Add(

_

(

"protein motif"

));

167

m_TypeCtrlStrings.Add(

_

(

"ab initio prediction"

));

168

m_TypeCtrlStrings.Add(

_

(

"alignment"

));

169  m_TypeCtrl

=

new

wxChoice( itemCFormattedQualPanel1,

ID_CHOICE13

, wxDefaultPosition, wxDefaultSize, m_TypeCtrlStrings, 0 );

170

itemBoxSizer2->Add(

m_TypeCtrl

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);

173

itemBoxSizer2->Add(

m_ExtraCtrlSizer

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);

180

wxSizerItemList& itemList = itemBoxSizer2->GetChildren();

181  for

(wxSizerItemList::iterator it = itemList.begin(); it != itemList.end(); ++it) {

182  if

((*it)->GetWindow()) {

183

(*it)->GetWindow()->GetSize(&x, &y);

198

{

"similar to AA sequence"

,

"similar to protein"

},

199

{

"similar to DNA sequence"

,

"similar to DNA"

},

200

{

"similar to RNA sequence"

,

"similar to RNA"

},

201

{

"similar to RNA sequence, EST"

,

"similar to EST"

},

202

{

"similar to RNA sequence, mRNA"

,

"similar to mRNA"

},

203

{

"similar to RNA sequence, other"

,

"similar to other RNA"

},

213  int

win_height, win_width;

214

GetSize(&win_width, &win_height);

215  string

category, type_str,

database

, accession, program,

version

, acc_list;

216  bool

is_same_species;

218

objects::CGb_qual::ParseInferenceString(

val

, category, type_str, is_same_species,

database

,

219

accession, program,

version

, acc_list);

225  if

(!category.empty())

226  for

(

unsigned int i

= 1;

i

< categories.size();

i

++) {

233  string

display_type_str = type_str;

234  auto

display_type_str_it = sc_InferenceTypeSynonymPairMap.find(type_str.c_str());

235  if

( display_type_str_it != sc_InferenceTypeSynonymPairMap.end())

236

display_type_str = display_type_str_it->second;

237  m_TypeCtrl

->SetStringSelection(wxEmptyString);

240  if

(!display_type_str.empty())

241  for

(

unsigned int i

= 1;

i

<

types

.size();

i

++) {

255

wxCheckBox* same_species =

new

wxCheckBox(

this

,

wxID_ANY

,

_

(

"(same species)"

), wxDefaultPosition, wxDefaultSize, 0 );

256

same_species->SetValue(is_same_species);

259

wxArrayString choices;

260

choices.push_back(

_

(

"GenBank"

));

261

choices.push_back(

_

(

"EMBL"

));

262

choices.push_back(

_

(

"DDBJ"

));

263

choices.push_back(

_

(

"INSD"

));

264

choices.push_back(

_

(

"RefSeq"

));

265

choices.push_back(

_

(

"UniProt"

));

266

choices.push_back(

_

(

"PDB"

));

267

choices.push_back(

_

(

"UniProtKB"

));

268

choices.push_back(

_

(

"Other"

));

269

wxChoice* database_ctrl =

new

wxChoice(

this

,

wxID_ANY

, wxDefaultPosition, wxSize(70, -1), choices, 0 );

271

database_ctrl->SetToolTip(

_

(

"Database"

));

273

wxStaticText* colon =

new

wxStaticText(

this

,

wxID_ANY

,

_

(

":"

), wxDefaultPosition );

276

wxTextCtrl* accession_ctrl =

new

wxTextCtrl(

this

,

wxID_ANY

, wxEmptyString, wxDefaultPosition, wxSize(90, -1), 0 );

277  m_ExtraCtrlSizer

->Add(accession_ctrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);

278

accession_ctrl->SetToolTip(

_

(

"Accession (must include version)"

));

281

accession_ctrl->SetValue(

ToWxString

(accession));

286

wxTextCtrl* program_ctrl =

new

wxTextCtrl(

this

,

wxID_ANY

, wxEmptyString, wxDefaultPosition, wxSize(60, -1), 0 );

288

program_ctrl->SetToolTip(

_

(

"Program or Database"

));

290

wxStaticText* colon =

new

wxStaticText(

this

,

wxID_ANY

,

_

(

":"

), wxDefaultPosition );

293

wxTextCtrl* version_ctrl =

new

wxTextCtrl(

this

,

wxID_ANY

, wxEmptyString, wxDefaultPosition, wxSize(60, -1), 0 );

295

version_ctrl->SetToolTip(

_

(

"Version or Accession"

));

297

program_ctrl->SetValue(

ToWxString

(program));

301

wxArrayString ProgramCtrlStrings;

302

ProgramCtrlStrings.Add(wxEmptyString);

303

ProgramCtrlStrings.Add(

_

(

"tRNAScan"

));

304

ProgramCtrlStrings.Add(

_

(

"Genscan"

));

305

ProgramCtrlStrings.Add(

_

(

"SignalP"

));

306

wxComboBox* program_ctrl =

new

wxComboBox(

this

,

wxID_ANY

, wxEmptyString, wxDefaultPosition, wxSize(60, -1), ProgramCtrlStrings, wxCB_DROPDOWN );

308

program_ctrl->SetToolTip(

_

(

"Program"

));

310

wxStaticText* colon =

new

wxStaticText(

this

,

wxID_ANY

,

_

(

":"

), wxDefaultPosition );

313

wxTextCtrl* version_ctrl =

new

wxTextCtrl(

this

,

wxID_ANY

, wxEmptyString, wxDefaultPosition, wxSize(60, -1), 0 );

315

version_ctrl->SetToolTip(

_

(

"Version"

));

317

program_ctrl->SetValue(

ToWxString

(program));

321

wxTextCtrl* program_ctrl =

new

wxTextCtrl(

this

,

wxID_ANY

, wxEmptyString, wxDefaultPosition, wxSize(60, -1), 0 );

323

program_ctrl->SetToolTip(

_

(

"Program"

));

325

wxStaticText* colon =

new

wxStaticText(

this

,

wxID_ANY

,

_

(

":"

), wxDefaultPosition );

328

wxTextCtrl* version_ctrl =

new

wxTextCtrl(

this

,

wxID_ANY

, wxEmptyString, wxDefaultPosition, wxSize(60, -1), 0 );

330

version_ctrl->SetToolTip(

_

(

"Version"

));

332

colon =

new

wxStaticText(

this

,

wxID_ANY

,

_

(

":"

), wxDefaultPosition );

335

wxTextCtrl* acc_list_ctrl =

new

wxTextCtrl(

this

,

wxID_ANY

, wxEmptyString, wxDefaultPosition, wxSize(120, 50), wxTE_MULTILINE );

337

acc_list_ctrl->SetToolTip(

_

(

"Accession List"

));

340

program_ctrl->SetValue(

ToWxString

(program));

342

acc_list_ctrl->SetValue(

ToWxString

(acc_list));

347  if

(!found && !

val

.empty())

349

wxTextCtrl* illegal_value =

new

wxTextCtrl(

this

,

wxID_ANY

, wxString(

val

), wxDefaultPosition, wxSize(100, -1), 0 );

354

wxWindow* parent = this->GetParent();

372  val

+= category +

": "

;

376  for

(

auto

synonyms : sc_InferenceTypeSynonymPairMap)

379

i_type = synonyms.first;

387  if

(itemList.size() == 0) {

392

wxCheckBox* same_species =

dynamic_cast<

wxCheckBox*

>

(itemList[0]->GetWindow());

395  if

(same_species->GetValue()) {

396  val

+=

" (same species)"

;

402  string

evidence_basis;

403  bool

preceeding_colon =

false

;

404  while

(pos < itemList.size()) {

405  string

add_text =

""

;

406

wxTextCtrl*

text

=

dynamic_cast<

wxTextCtrl*

>

(itemList[pos]->GetWindow());

410

wxComboBox* combo =

dynamic_cast<

wxComboBox*

>

(itemList[pos]->GetWindow());

414

wxChoice* chc =

dynamic_cast<

wxChoice*

>

(itemList[pos]->GetWindow());

416

add_text =

ToStdString

(chc->GetStringSelection());

418

wxStaticText* ctrl =

dynamic_cast<

wxStaticText*

>

(itemList[pos]->GetWindow());

425  if

(add_text ==

":"

)

427

preceeding_colon =

true

;

431  if

(

NStr::Equal

(i_type,

"alignment"

) && pos == itemList.size() - 1) {

433

vector<string> tokens;

436  ITERATE

(vector<string>, it, tokens) {

441  if

(pos == string::npos) {

445  if

(pos == string::npos) {

455  if

(!add_text.empty())

457  if

(preceeding_colon)

458

evidence_basis +=

":"

;

459

evidence_basis += add_text;

461

preceeding_colon =

false

;

465  if

(!evidence_basis.empty())

466  val

+=

":"

+ evidence_basis;

487  if

(height !=

NULL

) {

490  if

(width !=

NULL

) {

bool Create(wxWindow *parent, wxWindowID id=ID_CTWOPARTQUALPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)

Creation.

wxBoxSizer * m_ExtraCtrlSizer

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

void OnChoice13Selected(wxCommandEvent &event)

wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE13

virtual void OnChildChange(wxWindow *wnd)

void CreateControls()

Creates the controls and sizers.

virtual void SetValue(string val)

~CInferencePanel()

Destructor.

CInferencePanel()

Constructors.

void Init()

Initialises member variables.

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

static bool ShowToolTips()

Should we show tooltips?

wxChoice * m_CategoryCtrl

virtual void GetDimensions(int *width, int *height)

virtual string GetValue()

virtual void NotifyParentOfChange()

class CStaticArrayMap<> provides access to a static array in much the same way as CStaticArraySet<>,...

static const struct type types[]

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

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 IsBlank(const CTempString str, SIZE_TYPE pos=0)

Check if a string is blank (has no text).

static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)

Find the pattern in the string.

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 EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive equality of a substring with another string.

static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)

Test for equality of a substring with another string.

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.

SStaticPair< const char *, const char * > TInferenceTypeSynonymPairElem

CStaticArrayMap< const char *, const char *, PNocase_CStr > TInferenceTypeSynonymPairMap

static const TInferenceTypeSynonymPairElem k_inference_type_synonym_pair_map[]

DEFINE_STATIC_ARRAY_MAP(TInferenceTypeSynonymPairMap, sc_InferenceTypeSynonymPairMap, k_inference_type_synonym_pair_map)

use only n Cassandra database for the lookups</td > n</tr > n< tr > n< td > yes</td > n< td > do not use tables BIOSEQ_INFO and BLOB_PROP in the Cassandra database

static void text(MDB_val *v)

const string version

version string

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

Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...

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