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

Go to the SVN repository for this file.

1 /* $Id: correct_rna_strand_dlg.cpp 47479 2023-05-02 13:24:02Z ucko $
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: Colleen Bollin
27  */
28 
29 
30 #include <ncbi_pch.hpp>
31 
32 ////@begin includes
33 ////@end includes
34 
35 #include <corelib/ncbifile.hpp>
36 #include <objmgr/bioseq_ci.hpp>
37 #include <objmgr/util/sequence.hpp>
38 #include <util/line_reader.hpp>
44 #include <wx/stattext.h>
45 #include <wx/filename.h>
46 #include <wx/sstream.h>
47 #include <wx/txtstrm.h>
48 #include <wx/button.h>
49 #include <wx/msgdlg.h>
50 
51 ////@begin XPM images
52 ////@end XPM images
53 
55 
57 
58 /*!
59  * CCorrectRNAStrandDlg type definition
60  */
61 
62 IMPLEMENT_DYNAMIC_CLASS( CCorrectRNAStrandDlg, CBulkCmdDlg )
63 
64 
65 /*!
66  * CCorrectRNAStrandDlg event table definition
67  */
68 
69 BEGIN_EVENT_TABLE( CCorrectRNAStrandDlg, CBulkCmdDlg )
70 
71 ////@begin CCorrectRNAStrandDlg event table entries
73 
75 
77 
78 ////@end CCorrectRNAStrandDlg event table entries
79 
81 
82 
83 /*!
84  * CCorrectRNAStrandDlg constructors
85  */
86 
88 {
89  Init();
90 }
91 
92 CCorrectRNAStrandDlg::CCorrectRNAStrandDlg( wxWindow* parent, IWorkbench* wb, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
93 : CBulkCmdDlg(wb)
94 {
95  Init();
96  Create(parent, id, caption, pos, size, style);
98 }
99 
100 
101 /*!
102  * CCorrectRNAStrandDlg creator
103  */
104 
105 bool CCorrectRNAStrandDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
106 {
107 ////@begin CCorrectRNAStrandDlg creation
108  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
109  CBulkCmdDlg::Create( parent, id, caption, pos, size, style );
110 
111  CreateControls();
112  if (GetSizer())
113  {
114  GetSizer()->SetSizeHints(this);
115  }
116  Centre();
117 ////@end CCorrectRNAStrandDlg creation
118  return true;
119 }
120 
121 
122 /*!
123  * CCorrectRNAStrandDlg destructor
124  */
125 
127 {
128 ////@begin CCorrectRNAStrandDlg destruction
129 ////@end CCorrectRNAStrandDlg destruction
130 }
131 
132 
133 /*!
134  * Member initialisation
135  */
136 
138 {
139 ////@begin CCorrectRNAStrandDlg member initialisation
143  m_UseSmart = NULL;
144 ////@end CCorrectRNAStrandDlg member initialisation
145  m_NumRows = 0;
146  m_TotalHeight = 0;
147  m_ScrollRate = 0;
148 }
149 
150 
151 /*!
152  * Control creation for CCorrectRNAStrandDlg
153  */
154 
156 {
157 ////@begin CCorrectRNAStrandDlg content construction
158  CCorrectRNAStrandDlg* itemCBulkCmdDlg1 = this;
159 
160  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
161  itemCBulkCmdDlg1->SetSizer(itemBoxSizer2);
162 
163  m_SequenceListWindow = new wxScrolledWindow( itemCBulkCmdDlg1, ID_RNA_STRAND_SCROLLEDWINDOW, wxDefaultPosition, wxSize(100, 100), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
164  itemBoxSizer2->Add(m_SequenceListWindow, 0, wxGROW|wxALL, 5);
165  m_SequenceListWindow->SetScrollbars(1, 1, 0, 0);
166  m_SequenceListSizer = new wxBoxSizer(wxVERTICAL);
168 
169  m_SequenceListWindow->FitInside();
170 
171  wxButton* itemButton5 = new wxButton( itemCBulkCmdDlg1, ID_REFRESH_STRAND_BTN, _("Refresh Strand Results"), wxDefaultPosition, wxDefaultSize, 0 );
172  itemBoxSizer2->Add(itemButton5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
173 
174  m_ReverseFeaturesBtn = new wxCheckBox( itemCBulkCmdDlg1, ID_REVERSE_FEATURES_BTN, _("Also reverse features"), wxDefaultPosition, wxDefaultSize, 0 );
175  m_ReverseFeaturesBtn->SetValue(false);
176  itemBoxSizer2->Add(m_ReverseFeaturesBtn, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
177 
178  m_UseSmart = new wxCheckBox( itemCBulkCmdDlg1, ID_USE_SMART_FOR_STRAND_BTN, _("Use SMART for strand information"), wxDefaultPosition, wxDefaultSize, 0 );
179  m_UseSmart->SetValue(true);
180  m_UseSmart->Enable(false);
181  itemBoxSizer2->Add(m_UseSmart, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
182 
183  wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxHORIZONTAL);
184  itemBoxSizer2->Add(itemBoxSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
185 
186  wxButton* itemButton9 = new wxButton( itemCBulkCmdDlg1, ID_AUTOCORRECT_STRAND_BTN, _("Autocorrect Minus Strands"), wxDefaultPosition, wxDefaultSize, 0 );
187  itemBoxSizer8->Add(itemButton9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
188 
189  wxButton* itemButton10 = new wxButton( itemCBulkCmdDlg1, ID_CANCEL_RNA_STRAND_BTN, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
190  itemBoxSizer8->Add(itemButton10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
191 
192 ////@end CCorrectRNAStrandDlg content construction
194 }
195 
196 
197 /*!
198  * Should we show tooltips?
199  */
200 
202 {
203  return true;
204 }
205 
206 /*!
207  * Get bitmap resources
208  */
209 
210 wxBitmap CCorrectRNAStrandDlg::GetBitmapResource( const wxString& name )
211 {
212  // Bitmap retrieval
213 ////@begin CCorrectRNAStrandDlg bitmap retrieval
214  wxUnusedVar(name);
215  return wxNullBitmap;
216 ////@end CCorrectRNAStrandDlg bitmap retrieval
217 }
218 
219 /*!
220  * Get icon resources
221  */
222 
223 wxIcon CCorrectRNAStrandDlg::GetIconResource( const wxString& name )
224 {
225  // Icon retrieval
226 ////@begin CCorrectRNAStrandDlg icon retrieval
227  wxUnusedVar(name);
228  return wxNullIcon;
229 ////@end CCorrectRNAStrandDlg icon retrieval
230 }
231 
232 
233 /*!
234  * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_REFRESH_STRAND_BTN
235  */
236 
238 {
240 }
241 
242 
243 /*!
244  * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CANCEL_RNA_STRAND_BTN
245  */
246 
248 {
249  Destroy();
250 }
251 
252 
253 /*!
254  * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_AUTOCORRECT_STRAND_BTN
255  */
256 
258 {
261  if (cmd) {
262  ExecuteCmd(cmd);
263  Destroy();
264  } else {
265  string error = GetErrorMessage();
266  if (!NStr::IsBlank(error)) {
267  wxMessageBox(ToWxString(error), wxT("Error"),
268  wxOK | wxICON_ERROR, NULL);
269  }
270  }
271 }
272 
273 
275 {
276  CFeat_CI fit(bsh);
277  while (fit) {
279  CRef<CSeq_feat> new_feat(new CSeq_feat());
280  new_feat->Assign(*f);
281  CSeq_loc* rc = sequence::SeqLocRevCmpl(new_feat->GetLocation(), &(m_TopSeqEntry.GetScope()));
282  new_feat->SetLocation().Assign(*rc);
283  CSeq_feat_Handle fh = m_TopSeqEntry.GetScope().GetSeq_featHandle(*f);
284  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(fh, *new_feat)));
285  ++fit;
286  }
287 }
288 
289 
291 {
292  m_ErrorMessage = "";
293  CRef<CCmdComposite> cmd(new CCmdComposite("Autocorrect RNA sequences"));
294  bool any_change = false;
295  if (m_SeqList.empty()) {
296  m_ErrorMessage = "No sequences selected.";
297  return CRef<CCmdComposite>(NULL);
298  }
299  for (size_t i = 0; i < m_PickList.size(); i++) {
300  if (m_PickList[i]->GetValue()) {
301  // process this one
303  CRef<CSeq_inst> inst(new CSeq_inst());
304  inst->Assign(bsh.GetInst());
305  ReverseComplement(*inst, &(bsh.GetScope()));
306  CRef<CCmdChangeBioseqInst> flip(new CCmdChangeBioseqInst(bsh, *inst));
307  cmd->AddCommand(*flip);
308  if (m_ReverseFeaturesBtn->GetValue()) {
309  x_ReverseFeatures(bsh, cmd);
310  }
311  any_change = true;
312  }
313  }
314  if (!any_change) {
315  cmd.Reset(NULL);
316  m_ErrorMessage = "No sequences selected.";
317  }
318  return cmd;
319 }
320 
321 
323 {
324  return m_ErrorMessage;
325 }
326 
327 
329 {
330  bool rval = false;
331  if (!bsh) {
332  return false;
333  }
335  if ((*it)->IsGenbank()) {
336  rval = true;
337  break;
338  }
339  }
340  return rval;
341 }
342 
343 static bool CompByStrand(const pair<string,int>& first, const pair<string,int>& second)
344 {
345  return (first.second > second.second);
346 }
347 
348 
350 {
351  Freeze();
352  // remove existing subitems
353  while (m_SequenceListSizer->GetItemCount() > 0) {
354  int pos = 0;
355  m_SequenceListSizer->GetItem(pos)->DeleteWindows();
356  m_SequenceListSizer->Remove(pos);
357  }
358 
359  m_SequenceListSizer->Clear();
360  m_TotalHeight = 0;
361  m_NumRows = 0;
362  m_ScrollRate = 0;
363  m_SeqList.clear();
364  m_StatusList.clear();
365  m_PickList.clear();
366  m_AccessionList.clear();
367  m_SeqMap.clear();
368 
370  bool use_smart = m_UseSmart->GetValue();
372  while (bi) {
373  if (!use_smart || s_HasGenBankId(*bi)) {
374  // only collect sequences with GenBank ID for SMART
375  m_SeqList.push_back(*bi);
376  }
377  ++bi;
378  }
379 
380  // TODO: Get statuses
381  for (size_t i = 0; i < m_SeqList.size(); i++) {
383  }
384  if (use_smart) {
386  } else {
388  }
389 
390  vector<pair<string,int> > values;
391  size_t pos = 0;
392  ITERATE(vector<CBioseq_Handle>, it, m_SeqList) {
393  string label;
394  ITERATE(CBioseq::TId, it2, (*it).GetCompleteBioseq()->GetId()) {
395  if ((*it2)->IsGenbank() && (*it2)->GetGenbank().IsSetAccession()) {
396  label = (*it2)->GetGenbank().GetAccession();
397  break;
398  }
399  }
400  if (label.empty())
401  (*it).GetCompleteBioseq()->GetLabel(&label, CBioseq::eContent);
402 
403  values.push_back(pair<string,int>(label, m_StatusList[pos]));
404  m_SeqMap[label] = *it;
405  pos++;
406  }
407 
408  stable_sort(values.begin(),values.end(),CompByStrand);
409  for (unsigned int i=0; i<values.size(); i++)
410  {
411  x_AddRow(values[i].first, x_StringFromStrand(ERNAstrand_return_val(values[i].second)), values[i].second == RNAstrand_MINUS);
412  m_AccessionList.push_back(values[i].first);
413  }
414 
415  m_SequenceListWindow->SetVirtualSize(-1, m_TotalHeight);
416  m_SequenceListWindow->SetScrollRate(0, m_ScrollRate);
417  m_SequenceListWindow->FitInside();
418  Layout();
419  Thaw();
420 }
421 
422 
423 void CCorrectRNAStrandDlg::x_AddRow(const string& text, const string& status, bool selected)
424 {
425  wxSizer *row_sizer = new wxBoxSizer(wxHORIZONTAL);
426  m_SequenceListSizer->Add(row_sizer, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0);
427 
428  wxStaticText* acc = new wxStaticText( m_SequenceListWindow, wxID_STATIC, ToWxString(text), wxDefaultPosition, wxSize(100, -1));
429  row_sizer->Add(acc);
430  wxStaticText* stat = new wxStaticText( m_SequenceListWindow, wxID_STATIC, ToWxString(status), wxDefaultPosition, wxSize(100, -1));
431  row_sizer->Add(stat);
432  wxCheckBox* check = new wxCheckBox( m_SequenceListWindow, wxID_ANY, wxEmptyString);
433  check->SetValue(selected);
434  row_sizer->Add(check);
435  m_PickList.push_back(check);
436 
437  int row_width;
438  int row_height;
439  check->GetSize(&row_width, &row_height);
440 
441  m_TotalHeight += row_height;
442  m_ScrollRate = row_height;
443  m_NumRows++;
444 }
445 
446 
447 static const string RNAstrand_strings[] =
448 { "Plus", "Minus", "Mixed", "No Hits", "Unexpected", "Parse Error", "In Progress" };
449 
450 static const size_t k_NumRNAstrand_strings = sizeof (RNAstrand_strings) / sizeof (string);
451 
453 {
455  for (size_t i = 0; i < k_NumRNAstrand_strings; i++) {
456  if (NStr::Equal (status, RNAstrand_strings [i])
457  || (i == RNAstrand_MIXED
458  && NStr::StartsWith (status, RNAstrand_strings [i]))) {
459  rval = (ERNAstrand_return_val) i;
460  break;
461  }
462  }
463  return rval;
464 }
465 
466 
468 {
469  return RNAstrand_strings[rval];
470 }
471 
472 
473 void CCorrectRNAStrandDlg::x_ProcessRNAStrandLine(const CTempString& line, size_t pos, size_t max)
474 {
475  SIZE_TYPE tab_pos = line.find('\t');
476  if (tab_pos != string::npos) {
477  string accession = line.substr(0, tab_pos);
478  string status = line.substr(tab_pos + 1);
479  // need to find position to match label
480  bool found = false;
481  for (size_t i = pos; i < max && !found; i++) {
482  CBioseq_Handle bsh = m_SeqList[i];
484  if ((*it)->IsGenbank()) {
485  if (NStr::EqualNocase((*it)->GetGenbank().GetAccession(), accession)) {
486  m_StatusList[i] = x_StrandFromString(status);
487  found = true;
488  }
489  break;
490  }
491  }
492  }
493  }
494 }
495 
496 
498 {
499  if (m_SeqList.empty()) {
500  return;
501  }
502 
503 #ifdef NCBI_OS_MSWIN
504  wxString strandcmd = wxT("\\\\snowman\\win-coremake\\App\\Ncbi\\smart\\bin\\tmsgetstrand.bat");
505 #else
506  wxString strandcmd = wxT("/net/snowman/vol/export2/win-coremake/App/Ncbi/smart/bin/linux/tmsgetstrand.sh");
507 #endif
508 
509  if (!wxFileName::FileExists(strandcmd)) {
510  wxMessageBox(_("Path to RNA Strand executable does not exist!"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
511  return;
512  }
513 
514  size_t pos = 0;
515  while (pos < m_SeqList.size()) {
516  size_t max = pos + 25;
517  if (max > m_SeqList.size()) {
518  max = m_SeqList.size();
519  }
520 
521  wxArrayString output;
522  {{
523 
524  ///
525  /// compose the RNA Strand command line
526  ///
527 
528  wxStringOutputStream strstr;
529  wxTextOutputStream os(strstr);
530 
531  os << strandcmd
532  << wxT(" -a ");
533 
534 #ifndef NCBI_OS_MSWIN
535  os << "\"";
536 #endif
537  for (size_t i = pos; i < max; i++) {
538  CBioseq_Handle bsh = m_SeqList[i];
540  if ((*it)->IsGenbank() && (*it)->GetGenbank().IsSetAccession()) {
541  os << (*it)->GetGenbank().GetAccession();
542  if (i < max - 1) {
543  os << ",";
544  }
545  break;
546  }
547  }
548  }
549 
550 #ifndef NCBI_OS_MSWIN
551  os << "\"";
552 #endif
553 
554 
555 
556  wxString cmdline = strstr.GetString();
557  LOG_POST(Info << "Launching RNA Strand:");
558  LOG_POST(Info << cmdline);
559 
560  long exit_code = ::wxExecute(cmdline, output, wxEXEC_SYNC | wxEXEC_HIDE_CONSOLE);
561  if (exit_code != 0)
562  {
563  wxMessageBox(_("Failed to launch RNA Strand executable."), wxT("Error"), wxOK | wxICON_ERROR, NULL);
564  return;
565  }
566 
567 
568  }}
569 
570  if (output.IsEmpty()) {
571  wxMessageBox(_("Unable to read RNA Strand results."), wxT("Error"), wxOK | wxICON_ERROR, NULL);
572  return;
573  } else {
574  for (size_t i=0; i<output.GetCount(); i++)
576  }
577 
578 
579  // move marker
580  pos = max;
581  }
582 
583 }
584 
585 
587 {
588 
589 }
590 
591 
CBioseq_CI –.
Definition: bioseq_ci.hpp:69
CBioseq_Handle –.
@ eContent
Definition: Bioseq.hpp:103
virtual void ExecuteCmd(CRef< CCmdComposite > cmd)
objects::CSeq_entry_Handle m_TopSeqEntry
bool Create(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxFrameNameStr)
string m_ErrorMessage
bool GetTopLevelSeqEntryAndProcessor()
void Init()
Initialises member variables.
void x_ProcessRNAStrandLine(const CTempString &line, size_t pos, size_t max)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
ERNAstrand_return_val x_StrandFromString(const string &status)
static bool ShowToolTips()
Should we show tooltips?
wxScrolledWindow * m_SequenceListWindow
vector< ERNAstrand_return_val > m_StatusList
vector< CBioseq_Handle > m_SeqList
void OnCancelRnaStrandBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CANCEL_RNA_STRAND_BTN
void CreateControls()
Creates the controls and sizers.
void x_AddRow(const string &text, const string &status, bool selected)
vector< wxCheckBox * > m_PickList
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void x_ReverseFeatures(CBioseq_Handle bsh, CRef< CCmdComposite > cmd)
void OnRefreshStrandBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_REFRESH_STRAND_BTN
bool Create(wxWindow *parent, wxWindowID id=10299, const wxString &caption=_("Correct RNA Strandedness"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
virtual CRef< CCmdComposite > GetCommand()
void OnAutocorrectStrandBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_AUTOCORRECT_STRAND_BTN
string x_StringFromStrand(ERNAstrand_return_val rval)
map< string, CBioseq_Handle > m_SeqMap
CFeat_CI –.
Definition: feat_ci.hpp:64
CSeq_feat_Handle –.
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
void clear()
Definition: map.hpp:169
static const size_t k_NumRNAstrand_strings
USING_SCOPE(ncbi::objects)
bool s_HasGenBankId(CBioseq_Handle bsh)
static const string RNAstrand_strings[]
static bool CompByStrand(const pair< string, int > &first, const pair< string, int > &second)
#define ID_AUTOCORRECT_STRAND_BTN
#define ID_CANCEL_RNA_STRAND_BTN
#define ID_USE_SMART_FOR_STRAND_BTN
#define ID_REFRESH_STRAND_BTN
#define ID_REVERSE_FEATURES_BTN
#define ID_RNA_STRAND_SCROLLEDWINDOW
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
#define _(proto)
Definition: ct_nlmzip_i.h:78
static void Init(void)
Definition: cursor6.c:76
#define check(s)
Definition: describecol2.c:21
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:46
void ReverseComplement(const BidirectionalIterator &first, const BidirectionalIterator &last)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
Definition: ncbidiag.hpp:226
void Info(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1185
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
CSeq_loc * SeqLocRevCmpl(const CSeq_loc &loc, CScope *scope)
Get reverse complement of the seq-loc (?)
CConstRef< CBioseq > GetCompleteBioseq(void) const
Get the complete bioseq.
CScope & GetScope(void) const
Get scope this handle belongs to.
const TInst & GetInst(void) const
CConstRef< CSeq_feat > GetSeq_feat(void) const
Get current seq-feat.
#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 bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106
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:5411
CTempString substr(size_type pos) const
Obtain a substring from this string, beginning at a given offset.
Definition: tempstr.hpp:776
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5352
size_type find(const CTempString match, size_type pos=0) const
Find the first instance of the entire matching string within the current string, beginning at an opti...
Definition: tempstr.hpp:655
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:5383
static const char label[]
void SetLocation(TLocation &value)
Assign a value to Location data member.
Definition: Seq_feat_.cpp:131
const TLocation & GetLocation(void) const
Get the Location member data.
Definition: Seq_feat_.hpp:1117
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
Lightweight interface for getting lines of data with minimal memory copying.
static void text(MDB_val *v)
Definition: mdb_dump.c:62
#define wxT(x)
Definition: muParser.cpp:41
void ReportUsage(const wxString &dialog_name)
Report opening & accepting events in the editing package.
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
T max(T x_, T y_)
double f(double x_, const double &y_)
Definition: njn_root.hpp:188
static SQLCHAR output[256]
Definition: print.c:5
static static static wxID_ANY
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
Modified on Sat Dec 09 04:46:01 2023 by modify_doxy.py rev. 669887