NCBI C++ ToolKit
match_feat_table_dlg.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: match_feat_table_dlg.cpp 47464 2023-04-20 00:19:10Z evgeniev $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Andrea Asztalos
27  */
28 
29 
30 #include <ncbi_pch.hpp>
31 #include <objmgr/bioseq_ci.hpp>
32 #include <objmgr/util/sequence.hpp>
37 
38 #include <wx/imaglist.h>
39 #include <wx/sizer.h>
40 #include <wx/stattext.h>
41 #include <wx/listctrl.h>
42 #include <wx/checklst.h>
43 #include <wx/button.h>
44 #include <wx/wupdlock.h>
45 
46 
49 /*!
50  * CMatchFeatureTableDlg type definition
51  */
52 
53 IMPLEMENT_DYNAMIC_CLASS( CMatchFeatureTableDlg, wxDialog )
54 
55 
56 /*!
57  * CMatchFeatureTableDlg event table definition
58  */
59 
60 BEGIN_EVENT_TABLE( CMatchFeatureTableDlg, wxDialog )
61 
62 ////@begin CMatchFeatureTableDlg event table entries
63  EVT_BUTTON( ID_FEATTBLID_BTN, CMatchFeatureTableDlg::OnMapSelectedBtnClick )
64 
65  EVT_BUTTON( ID_AUTOMATCH_TABLE_ID, CMatchFeatureTableDlg::OnAutomatchTableIdClick )
66 
67 ////@end CMatchFeatureTableDlg event table entries
68 
70 
71 
72 /*!
73  * CMatchFeatureTableDlg constructors
74  */
75 
77 {
78  Init();
79 }
80 
81 CMatchFeatureTableDlg::CMatchFeatureTableDlg( wxWindow* parent, const objects::CSeq_entry_Handle& seh,
82  const TUniqueFeatTblIDs& ftblids,
83  wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style)
84  : m_Seh(seh), m_FtblIDs(ftblids)
85 {
86  Init();
87  Create(parent, id, caption, pos, size, style);
88 }
89 
90 
91 /*!
92  * CMatchFeatureTableDlg creator
93  */
94 
95 bool CMatchFeatureTableDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
96 {
97 ////@begin CMatchFeatureTableDlg creation
98  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
99  wxDialog::Create( parent, id, caption, pos, size, style );
100 
101  CreateControls();
102  if (GetSizer())
103  {
104  GetSizer()->SetSizeHints(this);
105  }
106  Centre();
107 ////@end CMatchFeatureTableDlg creation
108  return true;
109 }
110 
111 
112 /*!
113  * CMatchFeatureTableDlg destructor
114  */
115 
117 {
118 ////@begin CMatchFeatureTableDlg destruction
119 ////@end CMatchFeatureTableDlg destruction
120 }
121 
122 
123 /*!
124  * Member initialisation
125  */
126 
128 {
129 ////@begin CMatchFeatureTableDlg member initialisation
132  m_Map = NULL;
134  m_MappedIDs = NULL;
135 ////@end CMatchFeatureTableDlg member initialisation
136 }
137 
138 /*!
139  * Control creation for CMatchFeatureTableDlg
140  */
141 
142 
144 {
145 ////@begin CMatchFeatureTableDlg content construction
146  CMatchFeatureTableDlg* itemDialog1 = this;
147 
148  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
149  itemDialog1->SetSizer(itemBoxSizer2);
150 
151  wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("Feature Table IDs not found in record"), wxDefaultPosition, wxDefaultSize, 0 );
152  itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
153 
154  wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
155  itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 1);
156 
157  wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
158  itemBoxSizer4->Add(itemBoxSizer5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);
159 
160  m_FeatTableIDList = new wxListView(itemDialog1, ID_FEATTBLID_LSTCTRLA, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_SORT_ASCENDING);
161  itemBoxSizer5->Add(m_FeatTableIDList, 1, wxGROW | wxALL, 5);
162  m_FeatTableIDList->AppendColumn(wxT("Feature Table IDs"));
163  m_FeatTableIDList->SetColumnWidth(0, 200);
164  m_FeatTableIDList->SetMinSize(wxSize(200, -1));
165 
166  wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL);
167  itemBoxSizer4->Add(itemBoxSizer8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);
168 
169  m_SequenceIDList = new wxListView(itemDialog1, ID_FEATTBLID_LSTCTRLB, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_SORT_ASCENDING);
170  itemBoxSizer8->Add(m_SequenceIDList, 1, wxGROW | wxALL, 5);
171  m_SequenceIDList->AppendColumn(wxT("Sequence IDs"));
172  m_SequenceIDList->SetColumnWidth(0, 400);
173  m_SequenceIDList->SetMinSize(wxSize(400, -1));
174 
175  m_Map = new wxButton( itemDialog1, ID_FEATTBLID_BTN, _("Map Selected"), wxDefaultPosition, wxDefaultSize, 0 );
176  itemBoxSizer2->Add(m_Map, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);
177 
178  wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
179  itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
180 
181  wxButton* itemButton13 = new wxButton( itemDialog1, ID_AUTOMATCH_TABLE_ID, _("AutoMatch where table ID"), wxDefaultPosition, wxDefaultSize, 0 );
182  itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
183 
184  wxArrayString m_AutoMatchTypeStrings;
185  m_AutoMatchTypeStrings.Add(_("Matches"));
186  m_AutoMatchTypeStrings.Add(_("Is contained in"));
187  m_AutoMatchTypeStrings.Add(_("Is start of"));
188  m_AutoMatchTypeStrings.Add(_("Is end of"));
189  m_AutoMatchType = new wxChoice( itemDialog1, ID_AUTO_MATCH_TYPE, wxDefaultPosition, wxDefaultSize, m_AutoMatchTypeStrings, 0 );
190  itemBoxSizer12->Add(m_AutoMatchType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
191 
192  wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _("record ID"), wxDefaultPosition, wxDefaultSize, 0 );
193  itemBoxSizer12->Add(itemStaticText15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
194 
195  wxStaticText* itemStaticText16 = new wxStaticText( itemDialog1, wxID_STATIC, _("Selected matches"), wxDefaultPosition, wxDefaultSize, 0 );
196  itemBoxSizer2->Add(itemStaticText16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);
197 
198  wxArrayString m_MappedIDsStrings;
199  m_MappedIDs = new wxCheckListBox( itemDialog1, ID_FEATTBLID_CHKLSTBX, wxDefaultPosition, wxSize(-1, 109), m_MappedIDsStrings, wxLB_SINGLE | wxLB_SORT );
200  itemBoxSizer2->Add(m_MappedIDs, 1, wxEXPAND| wxALL, 5);
201 
202  wxBoxSizer* itemBoxSizer18 = new wxBoxSizer(wxHORIZONTAL);
203  itemBoxSizer2->Add(itemBoxSizer18, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2);
204 
205  wxButton* itemButton19 = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
206  itemBoxSizer18->Add(itemButton19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
207 
208  wxButton* itemButton20 = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
209  itemBoxSizer18->Add(itemButton20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
210 
211 ////@end CMatchFeatureTableDlg content construction
212  m_AutoMatchType->SetSelection(0);
213 }
214 
215 
217 {
218  string label;
219  ITERATE(CBioseq::TId, id_it, bh.GetBioseqCore()->GetId()) {
220  if ((*id_it)->IsGeneral() && (*id_it)->GetGeneral().IsSetDb() &&
221  ((*id_it)->GetGeneral().GetDb() == "TMSMART" || (*id_it)->GetGeneral().GetDb() == "BankIt" || (*id_it)->GetGeneral().GetDb() == "NCBIFILE"))
222  continue;
223  string id_label = (*id_it)->AsFastaString();
224  if (!label.empty()) {
225  label += "|";
226  }
227  label += id_label;
228  }
229  return label;
230 }
231 
232 
234 {
237  CConstRef<CSeq_id> id = (*it).GetSeqId();
238  string label;
239  id->GetLabel(&label);
240  m_FeatTableIDList->InsertItem(m_FeatTableIDList->GetItemCount(), ToWxString(label));
242  }
243 
244  m_SequenceIDList->SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER);
245  m_SeqID_map.clear();
246  for (CBioseq_CI b_iter(m_Seh, CSeq_inst::eMol_na); b_iter; ++b_iter) {
247  string label = s_GetDisplayLabel(*b_iter);
249  m_SequenceIDList->InsertItem(m_SequenceIDList->GetItemCount(), ToWxString(label));
251  }
252  if (!m_SeqID_map.empty())
253  m_SequenceIDList->SetColumnWidth(0, wxLIST_AUTOSIZE);
254  return wxDialog::TransferDataToWindow();
255 }
256 
257 static const char* sToSign = " -> ";
258 
260 {
261  ftbl_seqid_map.clear();
262  wxArrayInt checked_items;
263  m_MappedIDs->GetCheckedItems(checked_items);
264 
265 
266  for (unsigned int n = 0; n < checked_items.size(); ++n) {
267  string text = ToStdString(m_MappedIDs->GetString(checked_items[n]));
269  string ftbl_label = text.substr(0, pos);
270  string seqid_label = text.substr(pos + CTempString(sToSign).length(), NPOS);
271 
273  TStrToIDMap::const_iterator it2 = m_SeqID_map.find(seqid_label);
274  if (it1 != m_FtblID_map.end() && it2 != m_SeqID_map.end()) {
275  ftbl_seqid_map.insert(TFeatSeqIDMap::value_type(it1->second, it2->second));
276  }
277  }
278 }
279 /*!
280  * Should we show tooltips?
281  */
282 
284 {
285  return true;
286 }
287 
288 /*!
289  * Get bitmap resources
290  */
291 
292 wxBitmap CMatchFeatureTableDlg::GetBitmapResource( const wxString& name )
293 {
294  // Bitmap retrieval
295 ////@begin CMatchFeatureTableDlg bitmap retrieval
296  wxUnusedVar(name);
297  return wxNullBitmap;
298 ////@end CMatchFeatureTableDlg bitmap retrieval
299 }
300 
301 /*!
302  * Get icon resources
303  */
304 
305 wxIcon CMatchFeatureTableDlg::GetIconResource( const wxString& name )
306 {
307  // Icon retrieval
308 ////@begin CMatchFeatureTableDlg icon retrieval
309  wxUnusedVar(name);
310  return wxNullIcon;
311 ////@end CMatchFeatureTableDlg icon retrieval
312 }
313 
314 
315 void CMatchFeatureTableDlg::x_AddMatch(long item_ftbl, long item_seqid)
316 {
317  int index = m_MappedIDs->Append(m_FeatTableIDList->GetItemText(item_ftbl) + ToWxString(sToSign) + m_SequenceIDList->GetItemText(item_seqid));
318  m_MappedIDs->Check(index, true);
319 
320  wxWindowUpdateLocker noUpdates(m_FeatTableIDList);
321  m_FeatTableIDList->DeleteItem(item_ftbl);
322  if (m_FeatTableIDList->GetItemCount() >= item_ftbl + 1)
323  m_FeatTableIDList->RefreshItems(item_ftbl, m_FeatTableIDList->GetItemCount() - 1);
324 }
325 
326 /*!
327  * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FEATTBLID_BTN
328  */
329 
330 void CMatchFeatureTableDlg::OnMapSelectedBtnClick( wxCommandEvent& event )
331 {
332  long item_ftbl = m_FeatTableIDList->GetFirstSelected();
333  long item_seqid = m_SequenceIDList->GetFirstSelected();
334 
335  if (item_ftbl == -1 || item_seqid == -1) {
336  return;
337  }
338 
339  x_AddMatch(item_ftbl, item_seqid);
340 
341  event.Skip();
342 }
343 
344 
345 bool CMatchFeatureTableDlg::x_TokenMatch(const string& ft_id, const string& rec_id)
346 {
347  if (NStr::IsBlank(rec_id) || NStr::IsBlank(ft_id)) {
348  return false;
349  }
350  int match_type = m_AutoMatchType->GetSelection();
351  switch (match_type) {
352  case 0:
353  // matches
354  if (NStr::Equal(ft_id, rec_id)) {
355  return true;
356  }
357  if (NStr::Find(ft_id, ".") == string::npos) {
358  size_t ver = NStr::Find(rec_id, ".");
359  if (ver != string::npos && NStr::Equal(ft_id, rec_id.substr(0, ver))) {
360  return true;
361  }
362  }
363  if (NStr::StartsWith(ft_id, "gnl|")) {
364  size_t pos = NStr::Find(ft_id, ":");
365  if (pos != NPOS && NStr::Equal(ft_id.substr(pos + 1, NPOS), rec_id)) {
366  return true;
367  }
368  }
369  break;
370  case 1:
371  // is contained in
372  if (NStr::Find(rec_id, ft_id, NStr::eNocase) != string::npos) {
373  return true;
374  }
375  break;
376  case 2:
377  // is start of
378  if (NStr::StartsWith(rec_id, ft_id, NStr::eNocase)) {
379  return true;
380  }
381  break;
382  case 3:
383  // is end of
384  if (NStr::EndsWith(rec_id, ft_id, NStr::eNocase)) {
385  return true;
386  }
387  default:
388  break;
389  }
390  return false;
391 }
392 
393 
394 /*!
395  * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_AUTOMATCH_TABLE_ID
396  */
397 
399 {
400  wxWindowUpdateLocker noUpdates(m_FeatTableIDList);
401  wxArrayString matched_ids;
402 
403  if ( m_AutoMatchType->GetSelection() == 0)
404  {
405  LinearAutomatch(matched_ids);
406  }
407  else
408  {
409  QuadraticAutomatch(matched_ids);
410  }
411 
412  m_FeatTableIDList->Refresh();
413  m_MappedIDs->Append(matched_ids);
414  for (size_t i = 0; i < matched_ids.size(); ++i) {
415  m_MappedIDs->Check(static_cast<unsigned>(i));
416  }
417 }
418 
419 void CMatchFeatureTableDlg::QuadraticAutomatch(wxArrayString &matched_ids)
420 {
421  long item_ftbl = -1;
422 
423  for (;;) {
424  item_ftbl = m_FeatTableIDList->GetNextItem(item_ftbl, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE);
425  if (item_ftbl == -1) break;
426  string ftcheck = ToStdString(m_FeatTableIDList->GetItemText(item_ftbl));
427  if (NStr::StartsWith(ftcheck, "lcl|")) {
428  ftcheck = ftcheck.substr(4);
429  }
430  long item_seqid = -1;
431  bool found_match = false;
432  while (!found_match) {
433  item_seqid = m_SequenceIDList->GetNextItem(item_seqid, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE);
434  if (item_seqid == -1) break;
435  string sicheck = ToStdString(m_SequenceIDList->GetItemText(item_seqid));
436  vector<CTempString> tokens;
437  NStr::Split(sicheck, "|", tokens);
438  ITERATE(vector<CTempString>, t, tokens) {
439  if (x_TokenMatch(ftcheck, *t)) {
440  matched_ids.Add(m_FeatTableIDList->GetItemText(item_ftbl) + ToWxString(sToSign) + m_SequenceIDList->GetItemText(item_seqid));
441  m_FeatTableIDList->DeleteItem(item_ftbl);
442  found_match = true;
443  item_ftbl = -1;
444  break;
445  }
446  }
447  }
448  }
449 }
450 
451 void CMatchFeatureTableDlg::LinearAutomatch(wxArrayString &matched_ids)
452 {
453  long item_ftbl = -1;
454  map<string, long> label_to_item;
455  for (;;) {
456  item_ftbl = m_FeatTableIDList->GetNextItem(item_ftbl, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE);
457  if (item_ftbl == -1) break;
458  string ftcheck = ToStdString(m_FeatTableIDList->GetItemText(item_ftbl));
459  if (NStr::StartsWith(ftcheck, "lcl|")) {
460  ftcheck = ftcheck.substr(4);
461  }
462  if (ftcheck.empty())
463  continue;
464  label_to_item[ftcheck] = item_ftbl;
465 
466  if (NStr::StartsWith(ftcheck, "gnl|")) {
467  size_t pos = NStr::Find(ftcheck, ":");
468  if (pos != NPOS) {
469  string gnl = ftcheck.substr(pos + 1, NPOS);
470  if (!gnl.empty())
471  label_to_item[gnl] = item_ftbl;
472  }
473  }
474  }
475 
476  long item_seqid = -1;
477  set<long> to_delete;
478  for (;;) {
479  item_seqid = m_SequenceIDList->GetNextItem(item_seqid, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE);
480  if (item_seqid == -1) break;
481  string sicheck = ToStdString(m_SequenceIDList->GetItemText(item_seqid));
482  vector<CTempString> tokens;
483  NStr::Split(sicheck, "|", tokens, NStr::fSplit_Tokenize);
484  ITERATE(vector<CTempString>, t, tokens) {
485  auto p = label_to_item.find(*t);
486  if (p == label_to_item.end()) {
487  size_t ver = NStr::Find(*t, ".");
488  if (ver != string::npos) {
489  p = label_to_item.find(t->substr(0, ver));
490  }
491  }
492  if (p != label_to_item.end()) {
493  matched_ids.Add(m_FeatTableIDList->GetItemText(p->second) + ToWxString(sToSign) + m_SequenceIDList->GetItemText(item_seqid));
494  to_delete.insert(p->second);
495  break;
496  }
497  }
498  }
499  for (auto p = to_delete.rbegin(); p != to_delete.rend(); ++p) {
500  m_FeatTableIDList->DeleteItem(*p);
501  }
502 }
503 
505 
CBioseq_CI –.
Definition: bioseq_ci.hpp:69
CBioseq_Handle –.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void x_AddMatch(long item_ftbl, long item_seqid)
void OnMapSelectedBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FEATTBLID_BTN
objects::CSeq_entry_Handle m_Seh
void QuadraticAutomatch(wxArrayString &matched_ids)
void LinearAutomatch(wxArrayString &matched_ids)
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=ID_CMATCHFEATURETABLEDLG, const wxString &caption=_("Match Feature Table IDs"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
const set< objects::CSeq_id_Handle > m_FtblIDs
CMatchFeatureTableDlg()
Constructors.
void GetFtableIDToSeqIDMap(TFeatSeqIDMap &ftbl_seqid_map)
void OnAutomatchTableIdClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_AUTOMATCH_TABLE_ID
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
bool x_TokenMatch(const string &ft, const string &rec)
static bool ShowToolTips()
Should we show tooltips?
void Init()
Initialises member variables.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
const_iterator end() const
Definition: map.hpp:152
iterator_bool insert(const value_type &val)
Definition: map.hpp:165
bool empty() const
Definition: map.hpp:149
void clear()
Definition: map.hpp:169
const_iterator find(const key_type &key) const
Definition: map.hpp:153
iterator_bool insert(const value_type &val)
Definition: set.hpp:149
#define _(proto)
Definition: ct_nlmzip_i.h:78
static void Init(void)
Definition: cursor6.c:76
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
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_Seq_id_BestRank
use CSeq_id::BestRank() as the scoring function
Definition: sequence.hpp:107
TBioseqCore GetBioseqCore(void) const
Get bioseq core structure.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
NCBI_NS_STD::string::size_type SIZE_TYPE
Definition: ncbistr.hpp:132
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.
Definition: ncbistr.cpp:3452
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
Definition: ncbistr.cpp:2984
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
Definition: ncbistr.hpp:5424
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106
#define NPOS
Definition: ncbistr.hpp:133
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.
Definition: ncbistr.cpp:2882
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
Definition: ncbistr.hpp:5406
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.
Definition: ncbistr.hpp:5378
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
Definition: ncbistr.hpp:2510
@ eNocase
Case insensitive compare.
Definition: ncbistr.hpp:1206
static const char label[]
const TId & GetId(void) const
Get the Id member data.
Definition: Bioseq_.hpp:290
list< CRef< CSeq_id > > TId
Definition: Bioseq_.hpp:94
@ eMol_na
just a nucleic acid
Definition: Seq_inst_.hpp:113
END_EVENT_TABLE()
int i
yy_size_t n
USING_SCOPE(objects)
static const char * sToSign
string s_GetDisplayLabel(CBioseq_Handle bh)
static void text(MDB_val *v)
Definition: mdb_dump.c:62
#define wxT(x)
Definition: muParser.cpp:41
const struct ncbi::grid::netcache::search::fields::SIZE size
EIPRangeType t
Definition: ncbi_localip.c:101
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
Modified on Fri Sep 20 14:57:39 2024 by modify_doxy.py rev. 669887