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

Go to the SVN repository for this file.

1 /* $Id: table_xform_panel.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: Bob Falk
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>////@begin includes
33 ////@end includes
34 
35 #include "table_xform_panel.hpp"
41 
44 
47 
48 IMPLEMENT_DYNAMIC_CLASS( CTableXformPanel, wxPanel )
49 
50 BEGIN_EVENT_TABLE( CTableXformPanel, wxPanel )
51 
52 ////@begin CTableXformPanel event table entries
53  EVT_BUTTON( ID_SAVEIMPORTPARMS, CTableXformPanel::OnSaveImportParmsClick )
54  EVT_RADIOBUTTON( ID_CONVERTTOFEATURES, CTableXformPanel::OnConvertToFeaturesSelected )
55  EVT_RADIOBUTTON( ID_CREATELOCATIONS, CTableXformPanel::OnCreateLocationsSelected )
56  EVT_RADIOBUTTON( ID_CONVERTTOSNP, CTableXformPanel::OnConvertToSnpSelected )
57  EVT_RADIOBUTTON( ID_DONOTCONVERT, CTableXformPanel::OnDoNotConvertSelected )
58 ////@end CTableXformPanel event table entries
59 
61 
63 {
64  Init();
65 }
66 
67 CTableXformPanel::CTableXformPanel( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
68 {
69  Init();
70  Create(parent, id, caption, pos, size, style);
71 }
72 
73 bool CTableXformPanel::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
74 {
75 ////@begin CTableXformPanel creation
76  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
77  wxPanel::Create( parent, id, pos, size, style );
78 
80  if (GetSizer())
81  {
82  GetSizer()->SetSizeHints(this);
83  }
84  Centre();
85 ////@end CTableXformPanel creation
86  return true;
87 }
88 
90 {
91 ////@begin CTableXformPanel destruction
92 ////@end CTableXformPanel destruction
93 }
94 
96 {
97 ////@begin CTableXformPanel member initialisation
102  m_XformInfo = NULL;
104 ////@end CTableXformPanel member initialisation
105 
107 
109 }
110 
112 {
113 ////@begin CTableXformPanel content construction
114  // Generated by DialogBlocks, 14/05/2019 11:42:24 (unregistered)
115 
116  CTableXformPanel* itemPanel1 = this;
117 
118  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
119  itemPanel1->SetSizer(itemBoxSizer2);
120 
121  wxStaticText* itemStaticText3 = new wxStaticText( itemPanel1, wxID_STATIC, _("Create Features or Locations from Table Columns"), wxDefaultPosition, wxDefaultSize, 0 );
122  itemStaticText3->SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("Tahoma")));
123  itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
124 
125  wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
126  itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_LEFT|wxALL, 5);
127 
128  wxButton* itemButton5 = new wxButton( itemPanel1, ID_SAVEIMPORTPARMS, _("Save Import Parameters..."), wxDefaultPosition, wxDefaultSize, 0 );
129  itemBoxSizer4->Add(itemButton5, 0, wxALIGN_LEFT|wxALL, 5);
130 
131  wxStaticBox* itemStaticBoxSizer6Static = new wxStaticBox(itemPanel1, wxID_ANY, _("Choose to create locations, features, or keep the table as is, then click \"Next\""));
132  wxStaticBoxSizer* itemStaticBoxSizer6 = new wxStaticBoxSizer(itemStaticBoxSizer6Static, wxHORIZONTAL);
133  itemBoxSizer4->Add(itemStaticBoxSizer6, 1, wxGROW|wxALL, 5);
134 
135  wxStaticBox* itemStaticBoxSizer7Static = new wxStaticBox(itemStaticBoxSizer6->GetStaticBox(), wxID_ANY, _("Transformation Type"));
136  wxStaticBoxSizer* itemStaticBoxSizer7 = new wxStaticBoxSizer(itemStaticBoxSizer7Static, wxVERTICAL);
137  itemStaticBoxSizer6->Add(itemStaticBoxSizer7, 0, wxALIGN_TOP|wxALL, 5);
138 
139  m_ConvertToFeatures = new wxRadioButton( itemStaticBoxSizer7->GetStaticBox(), ID_CONVERTTOFEATURES, _("Convert to Feature Table"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
140  m_ConvertToFeatures->SetValue(false);
141  m_ConvertToFeatures->SetHelpText(_("Add and update fields needed to view rows as region features."));
143  m_ConvertToFeatures->SetToolTip(_("Add and update fields needed to view rows as region features."));
144  itemStaticBoxSizer7->Add(m_ConvertToFeatures, 0, wxALIGN_LEFT|wxALL, 5);
145 
146  m_CreateLocations = new wxRadioButton( itemStaticBoxSizer7->GetStaticBox(), ID_CREATELOCATIONS, _("Create Locations"), wxDefaultPosition, wxDefaultSize, 0 );
147  m_CreateLocations->SetValue(false);
148  m_CreateLocations->SetHelpText(_("Add location fields to the table derived from the original table data. Open the table in the Generic Table View."));
150  m_CreateLocations->SetToolTip(_("Add location fields to the table derived from the original table data. Open the table in the Generic Table View."));
151  itemStaticBoxSizer7->Add(m_CreateLocations, 0, wxALIGN_LEFT|wxALL, 5);
152 
153  m_ConvertToSnips = new wxRadioButton( itemStaticBoxSizer7->GetStaticBox(), ID_CONVERTTOSNP, _("Create SNP Variation Features"), wxDefaultPosition, wxDefaultSize, 0 );
154  m_ConvertToSnips->SetValue(false);
155  m_ConvertToSnips->SetHelpText(_("Add and update fields needed to view rows as snps (variations)."));
157  m_ConvertToSnips->SetToolTip(_("Add and update fields needed to view rows as snps (variations)."));
158  itemStaticBoxSizer7->Add(m_ConvertToSnips, 0, wxALIGN_LEFT|wxALL, 5);
159 
160  m_KeepTableUnchanged = new wxRadioButton( itemStaticBoxSizer7->GetStaticBox(), ID_DONOTCONVERT, _("Keep Table Unchanged"), wxDefaultPosition, wxDefaultSize, 0 );
161  m_KeepTableUnchanged->SetValue(true);
162  itemStaticBoxSizer7->Add(m_KeepTableUnchanged, 0, wxALIGN_LEFT|wxALL, 5);
163 
164  m_XformInfo = new wxStaticText( itemStaticBoxSizer6->GetStaticBox(), wxID_STATIC, _(" \"\n\n\n\n\n \"\n "), wxDefaultPosition, wxSize(360, -1), wxALIGN_LEFT|wxST_NO_AUTORESIZE );
165  itemStaticBoxSizer6->Add(m_XformInfo, 1, wxGROW|wxALL, 10);
166 
167  wxStaticBox* itemStaticBoxSizer13Static = new wxStaticBox(itemPanel1, wxID_ANY, _("Table Data"));
168  wxStaticBoxSizer* itemStaticBoxSizer13 = new wxStaticBoxSizer(itemStaticBoxSizer13Static, wxHORIZONTAL);
169  itemBoxSizer2->Add(itemStaticBoxSizer13, 1, wxGROW|wxLEFT, 5);
170 
171  wxPanel* itemPanel14 = new wxPanel( itemStaticBoxSizer13->GetStaticBox(), ID_TABLEXFORMPANEL, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
172  itemStaticBoxSizer13->Add(itemPanel14, 1, wxGROW|wxTOP, 5);
173 
174  wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxHORIZONTAL);
175  itemPanel14->SetSizer(itemBoxSizer15);
176 
177  m_TableDataListCtrl = new CTableDataListCtrl( itemPanel14, ID_CTABLEDATALISTCTRL, wxDefaultPosition, wxSize(100, 100), 0 );
178  itemBoxSizer15->Add(m_TableDataListCtrl, 1, wxGROW|wxALL, 5);
179 
180 ////@end CTableXformPanel content construction
181 }
182 
183 bool CTableXformPanel::Show(bool show)
184 {
185  bool res = wxPanel::Show(show);
186 
187  // Force the panel to layout correctly right away
188  if (show) {
189  m_TableDataListCtrl->ClearAll();
190  this->GetParent()->Layout();
191 
192  /// Create an ITableData-derived data source from set-annot
194  CIRef<ITableData> table_data;
195  table_data.Reset(CreateObjectInterface<ITableData>(so, NULL));
196 
197  /// If successful, use the new datasource to initialize the list control
198  if (table_data) {
199  m_TableDataListCtrl->InitDataSource(*table_data);
200  Refresh();
201  }
202  }
203 
204  return res;
205 }
206 
207 void CTableXformPanel::SetMainTitle(const wxString& title)
208 {
209  //m_MainBox->SetLabel(title);
210 }
211 
212 bool CTableXformPanel::x_AddLocations(string& errMsg, ICanceled& canceled)
213 {
214  if (canceled.IsCanceled())
215  return false;
216 
217  string msg;
218  vector<CTableAnnotDataSource::STableLocation> locations =
220 
221  if (canceled.IsCanceled())
222  return false;
223 
224  if (locations.size() == 0) {
225  ERR_POST(Info << "Table Import - Unable to create locations: " << msg);
226  errMsg = msg + string(" - Unable to create locations");
227  return false;
228  }
229 
230  bool success = false;
231  for (size_t i = 0; i < locations.size(); ++i) {
232  if (canceled.IsCanceled())
233  return false;
234 
235  bool result = false;
236  try {
237  if (!locations[i].m_IsRsid)
238  result = m_AnnotTableData->AddSeqLoc(locations[i], static_cast<int>(i + 1), &canceled);
239  else
240  result = m_AnnotTableData->AddSnpSeqLoc(locations[i], static_cast<int>(i + 1), &canceled);
241 
242  if (result)
243  success = true; // function returns success if any locs are added
244  }
245  catch (CException& c) {
246  LOG_POST(Error << "Adding location #: " << i << " to table: " << c.GetMsg());
247  }
248 
249  if (result) {
250  ERR_POST(Info << "Table Import - Added location using columns: ");
251  ERR_POST(Info << locations[i].GetColumnInfo());
252  }
253  else {
254  errMsg = "Table Import - Error adding location to table";
255  ERR_POST(Info << "Table Import - Error adding location to table using columns: ");
256  ERR_POST(Info << locations[i].GetColumnInfo());
257  }
258  }
259  return success && !canceled.IsCanceled();
260 }
261 
262 bool CTableXformPanel::x_CreateFeatures(bool create_snps, string& errMsg, ICanceled& canceled)
263 {
264  if (canceled.IsCanceled())
265  return false;
266 
267  string msg;
268  vector<CTableAnnotDataSource::STableLocation> locations =
270 
271  if (canceled.IsCanceled())
272  return false;
273 
274  // Any location can be a feature, but only 1. If we find more than 1
275  // we choose to to create any features.
276  if (locations.size() > 1) {
277  ERR_POST(Info << "Table Import - Unable to create features: more than 1 location found");
278  errMsg = "Unable to create features - table has more than 1 location per row";
279  return false;
280  }
281  // unable to identify columns needed to create location info needed by features.
282  else if (locations.size() == 0) {
283  ERR_POST(Info << "Table Import - Unable to create features: " << msg);
284  errMsg = msg + string(" - Unable to create features");
285  return false;
286  }
287  else if (create_snps &&
288  (locations[0].m_IsRsid == false || locations[0].m_GenotypeCol == -1)) {
289  ERR_POST(Info << "Table Import - Unable to create SNiPs: table must have an RSID and Genotype column specified");
290  errMsg = "Unable to create SNiPs: table must have an RSID and Genotype column specified";
291  return false;
292  }
293 
294 
295  bool success = false;
296  try {
297  if (create_snps) {
298  success = m_AnnotTableData->CreateSnps(locations[0], &canceled);
299  }
300  else { // create regions features (for snip ids or locations)
301  if (!locations[0].m_IsRsid)
302  success = m_AnnotTableData->CreateFeature(locations[0], &canceled);
303  else
304  success = m_AnnotTableData->CreateSnpFeature(locations[0], &canceled);
305  }
306  }
307  catch (CException& c) {
308  LOG_POST(Error << "Error converting table to feature table: " << c.GetMsg());
309  }
310 
311  if (success) {
312  ERR_POST(Info << "Table Import - Transformed into feature table using columns: ");
313  ERR_POST(Info << locations[0].GetColumnInfo());
314  }
315  else {
316  errMsg = "Table Import - Error transforming into feature table";
317  ERR_POST(Info << "Table Import - Error transforming into feature table using columns: ");
318  ERR_POST(Info << locations[0].GetColumnInfo());
319  }
320  return success && !canceled.IsCanceled();
321 }
322 
323 
325 {
326  // Do the actual transformation here.
327  if (m_KeepTableUnchanged->GetValue()) {
329  return true;
330  }
331 
332  if (m_CreateLocations->GetValue()) {
333  // Create features asynchronously so user can see progress
334  string errMsg;
335  if (GUI_AsyncExec(
336  [this, &errMsg](ICanceled& canceled) { return this->x_AddLocations(errMsg, canceled); },
337  wxT("Adding locations..."))) {
339  return true;
340  }
341 
342  if (!errMsg.empty())
343  wxMessageBox(errMsg);
344 
345  return false;
346  }
347  else if (m_ConvertToFeatures->GetValue()) {
348  // Create features asynchronously so user can see progress
349  string errMsg;
350  if (GUI_AsyncExec(
351  [this, &errMsg](ICanceled& canceled) { return this->x_CreateFeatures(false, errMsg, canceled); },
352  wxT("Creating features..."))) {
354  return true;
355  }
356 
357  if (!errMsg.empty())
358  wxMessageBox(errMsg);
359 
360  return false;
361  }
362  else if (m_ConvertToSnips->GetValue()) {
363  // Create features asynchronously so user can see progress
364  string errMsg;
365  if (GUI_AsyncExec(
366  [this, &errMsg](ICanceled& canceled) { return this->x_CreateFeatures(true, errMsg, canceled); },
367  wxT("Creating features..."))) {
369  return true;
370  }
371 
372  if (!errMsg.empty())
373  wxMessageBox(errMsg);
374 
375  return false;
376  }
377 
378  return true;
379 }
380 
381 void CTableXformPanel::SetRegistryPath( const string& path )
382 {
383  m_RegPath = path;
384 }
385 
386 static const string kTransformationTypeTag = "TransformationType";
387 
389 {
390  if ( !m_RegPath.empty() ) {
392  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
394 
395  m_CreateLocations->SetValue(false);
396  m_ConvertToFeatures->SetValue(false);
397  m_KeepTableUnchanged->SetValue(false);
398 
399  switch (m_LastXform) {
400  case eRegionFeatures:
401  m_ConvertToFeatures->SetValue(true);
402  break;
403  case eAddLocs:
404  m_CreateLocations->SetValue(true);
405  break;
406  case eNoTransform:
407  m_KeepTableUnchanged->SetValue(true);
408  break;
409  default:
410  m_KeepTableUnchanged->SetValue(true);
411  }
412  }
413 
414  x_SetHelpText();
415 }
416 
417 
419 {
420 }
421 
423 {
424  return true;
425 }
426 
427 wxBitmap CTableXformPanel::GetBitmapResource( const wxString& name )
428 {
429  // Bitmap retrieval
430 ////@begin CTableXformPanel bitmap retrieval
431  wxUnusedVar(name);
432  return wxNullBitmap;
433 ////@end CTableXformPanel bitmap retrieval
434 }
435 wxIcon CTableXformPanel::GetIconResource( const wxString& name )
436 {
437  // Icon retrieval
438 ////@begin CTableXformPanel icon retrieval
439  wxUnusedVar(name);
440  return wxNullIcon;
441 ////@end CTableXformPanel icon retrieval
442 }
443 
444 void CTableXformPanel::OnCreateLocationsSelected( wxCommandEvent& event )
445 {
446  string msg;
447  vector<CTableAnnotDataSource::STableLocation> locations =
449 
450  // unable to identify columns needed to create location
451  if (locations.size() == 0) {
452  wxMessageBox(msg + " - Unable to create locations");
453  }
454 
455  x_SetHelpText();
456 }
457 
459 {
460  string msg;
461  vector<CTableAnnotDataSource::STableLocation> locations =
463 
464  // Any location can be a feature, but only 1. If we find more than 1
465  // we choose to to create any features.
466  if (locations.size() > 1) {
467  wxMessageBox("Unable to create features - table has more than 1 location per row");
468  }
469  // unable to identify columns needed to create location info needed by features.
470  else if (locations.size() == 0) {
471  wxMessageBox(msg + " - Unable to create features");
472  }
473 
474  x_SetHelpText();
475 }
476 
477 void CTableXformPanel::OnConvertToSnpSelected( wxCommandEvent& event )
478 {
479  string msg;
480  vector<CTableAnnotDataSource::STableLocation> locations =
482 
483  // Any location can be a feature, but only 1. If we find more than 1
484  // we choose to to create any features.
485  if (locations.size() > 1) {
486  wxMessageBox("Unable to create features - table has more than 1 location per row");
487  }
488  // unable to identify columns needed to create location info needed by features.
489  else if (locations.size() == 0) {
490  wxMessageBox(msg + " - Unable to create features");
491  }
492  else if (locations[0].m_IsRsid == false || locations[0].m_GenotypeCol == -1) {
493  wxMessageBox("Unable to create SNP features from table - table must have an RSID and Genotype column specified");
494  }
495 
496  x_SetHelpText();
497 }
498 
499 void CTableXformPanel::OnDoNotConvertSelected( wxCommandEvent& event )
500 {
501  // Just save table as-is.
502  x_SetHelpText();
503 }
504 
506 {
507  if (m_KeepTableUnchanged->GetValue()) {
508  m_XformInfo->SetLabel("Save the table with no changes");
509  }
510  else if (m_ConvertToFeatures->GetValue()) {
511  m_XformInfo->SetLabel(
512  "Convert current table into a table of features \
513 that can be displayed in the Graphical Sequence View by enabling \
514 \"Other Features\" with sub-track \"region\".");
515  }
516  else if (m_CreateLocations->GetValue()) {
517  m_XformInfo->SetLabel(
518  "Add location column(s) to the table based on existing \
519 ID and position fields. Double-click on locations in the Generic \
520 Table View to open them in their own default view. Generic Table View \
521 also broadcasts the locations which can be seen in Selection Inspector.");
522  }
523  else if (m_ConvertToSnips->GetValue()) {
524  m_XformInfo->SetLabel(
525  "Convert current table into a table of SNP features \
526 that can be displayed in the Graphical Sequence View by enabling \
527 \"Other Features\" with sub-track \"region\".");
528  }
529 
530  int width;
531  m_XformInfo->GetClientSize(&width, nullptr);
532  m_XformInfo->Wrap(width);
533 
534 //ID and position fields. Open the saved table in the Generic Table \
535 //View that lets you double-click on locations to open them in their default \
536 //view and also broadcasts them which can be seen in Selection Inspector.");
537 }
538 
539 void CTableXformPanel::OnSaveImportParmsClick( wxCommandEvent& event )
540 {
541  wxFileDialog dlg(this, wxT("Select a file"), wxT(""), wxT(""),
544  wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
545 
546  if (dlg.ShowModal() != wxID_OK)
547  return;
548 
549  CNcbiOfstream out_file(dlg.GetPath().fn_str());
550  if (!out_file) {
551  wxMessageBox("Error opening selected file: " + dlg.GetPath(), "File Error");
552  return;
553  }
554 
555  string transformation_type = "none";
556  if (m_CreateLocations->GetValue())
557  transformation_type = "seqlocs";
558  else if (m_ConvertToFeatures->GetValue())
559  transformation_type = "features";
560 
561  try {
562  CUser_object user_object;
563 
564  user_object.SetType().SetStr() = "table load parameters";
565  user_object.AddField("conversion-type", transformation_type);
566 
567  m_ImportedTableData->ExportTableParms(user_object);
568 
569  out_file << MSerial_AsnText << user_object;
570  }
571  catch (CException& ex) {
572  wxMessageBox(ToWxString(ex.GetMsg()), "Error");
573  }
574 
575 }
576 
577 
579 
std::invoke_result< _Fty, ICanceled & >::type GUI_AsyncExec(_Fty &&_Fnarg, const wxString &msg=wxT("Accessing network..."))
Definition: async_call.hpp:130
static wxString GetDialogFilter(EFileType fileType)
static CGuiRegistry & GetInstance()
access the application-wide singleton
Definition: registry.cpp:400
CRegistryReadView GetReadView(const string &section) const
get a read-only view at a particular level.
Definition: registry.cpp:428
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
Definition: reg_view.cpp:230
CScope –.
Definition: scope.hpp:92
bool AddSeqLoc(const STableLocation &fc, int loc_number, ICanceled *cancel=NULL)
Add a location to the table based on the specified columns.
CRef< CSeq_annot > GetContainer()
vector< STableLocation > FindLocations(string &msg, bool strand_required)
Find colums that can be combined to form locations based on column info If no locations are found,...
bool CreateSnps(const STableLocation &fc, ICanceled *cancel=NULL)
Create snips (features that show variations) for each row.
bool CreateSnpFeature(const STableLocation &fc, ICanceled *cancel=NULL)
Create a region feature for each snp using specified snp (rsid) column.
bool AddSnpSeqLoc(const STableLocation &fc, int loc_number, ICanceled *cancel=NULL)
Add a location to the table using the rsid (snp/variation) ids location from the snp db.
bool CreateFeature(const STableLocation &fc, ICanceled *cancel=NULL)
Create a feature using specified columns.
CTableDataListCtrl -.
void InitDataSource(ITableData &table_data)
Set/update data source.
void ExportTableParms(CUser_object &user_object)
Export table load parameters in ASN user-data format.
bool Create(wxWindow *parent, wxWindowID id=ID_CTABLEXFORMPANEL, const wxString &caption=_("Table Data Transform"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
void OnConvertToFeaturesSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_CONVERTTOFEATURES
CRef< objects::CScope > m_Scope
static bool ShowToolTips()
void SetRegistryPath(const string &path)
wxRadioButton * m_KeepTableUnchanged
wxRadioButton * m_CreateLocations
void OnDoNotConvertSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_DONOTCONVERT
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
bool x_CreateFeatures(bool create_snps, string &errMsg, ICanceled &canceled)
wxRadioButton * m_ConvertToSnips
wxRadioButton * m_ConvertToFeatures
void SetMainTitle(const wxString &title)
bool x_AddLocations(string &errMsg, ICanceled &canceled)
wxStaticText * m_XformInfo
eTransformType m_LastXform
Records type of most recent transform (needed to allow undo)
void x_SetHelpText()
Set text to describe consequenses of chosen transformation option.
CTableDataListCtrl * m_TableDataListCtrl
bool Show(bool show)
Override Show() to allow initialization each time window is displayed.
void OnSaveImportParmsClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SAVEIMPORTPARMS
CRef< CTableImportDataSource > m_ImportedTableData
Contents of tabular file.
void SaveSettings() const
CRef< CTableAnnotDataSource > m_AnnotTableData
Tabular file converted to a seq-annot.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnConvertToSnpSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_CONVERTTOSNP
void OnCreateLocationsSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_CREATELOCATIONS
CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)
add a data field to the user object that holds a given value
Interface for testing cancellation request in a long lasting operation.
Definition: icanceled.hpp:51
#define _(proto)
Definition: ct_nlmzip_i.h:78
static void Init(void)
Definition: cursor6.c:76
string
Definition: cgiapp.hpp:690
#define NULL
Definition: ncbistd.hpp:225
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
Definition: ncbidiag.hpp:186
#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 Error(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1197
const string & GetMsg(void) const
Get message string.
Definition: ncbiexpt.cpp:461
void Info(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1185
#define MSerial_AsnText
I/O stream manipulators –.
Definition: serialbase.hpp:696
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
virtual bool IsCanceled(void) const =0
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
Definition: ncbistre.hpp:500
void SetType(TType &value)
Assign a value to Type data member.
END_EVENT_TABLE()
int i
#define wxT(x)
Definition: muParser.cpp:41
const struct ncbi::grid::netcache::search::fields::SIZE size
The Object manager core.
static static static wxID_ANY
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
USING_SCOPE(objects)
static const string kTransformationTypeTag
else result
Definition: token2.c:20
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
Modified on Fri Sep 20 14:57:08 2024 by modify_doxy.py rev. 669887