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

Go to the SVN repository for this file.

1 /* $Id: vcf_table_view.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: Dmitry Rudnev
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
35 
37 
39 #include <gui/core/document.hpp>
40 
43 
53 
57 
58 #include <gui/utils/app_popup.hpp>
59 
62 #include <objmgr/util/sequence.hpp>
63 #include <wx/msgdlg.h>
64 
67 
68 
69 ///////////////////////////////////////////////////////////////////////////////
70 /// CVcfTableView
71 
73  "VCF Table View", // type name
74  "vcf_table_view", // icon alias TODO
75  "Show tabular information about VCFs",
76  "The VCF Table View provides a tabular break-down of a loaded VCF file",
77  "VCF_TABLE_VIEW", // help ID
78  "Sequence", // category
79  false, // not a singleton
80  "Seq-loc",
82 );
83 
84 // handler for custom Vcf commands injected into the grid menu
85 class CVcfGridEvtExt : public CObject,
86  public IGridEvtExt
87 {
88 public:
89  enum EEventType {
90 // eCmdLinkRefVcf = 8800,
91  };
92 protected:
93  DECLARE_EVENT_TABLE()
94 };
95 
96 BEGIN_EVENT_TABLE(CVcfGridEvtExt, wxEvtHandler)
97 // EVT_MENU(CVcfGridEvtExt::eCmdLinkRefVcf, CVcfGridEvtExt::OnEventLinkout)
99 
100 
102 {
103 public:
104  virtual void GetRows(const ITableData& table, const CSelectionEvent& evt, vector<size_t>& rows) const;
105  virtual void GetSelection(const ITableData& table, const vector<size_t>& rows, CSelectionEvent& evt) const;
106 };
107 
108 
109 void CVcfTableSelection::GetRows(const ITableData& table, const CSelectionEvent& evt, vector<size_t>& rows) const
110 {
111  size_t nRows(table.GetRowsCount());
112  const CSelectionEvent::TVcfVariants& sel_variants(evt.GetVcfVariants());
113  size_t n_sel_variants(sel_variants.size());
114  for(size_t i=0; i<nRows; i++) {
115  SConstScopedObject row_obj(table.GetRowObject(i));
116  const CVcfVariant* vcf_variant(dynamic_cast<const CVcfVariant*>(row_obj.object.GetPointer()));
117  if(vcf_variant) {
118  for(size_t j=0; j<n_sel_variants; j++) {
119  if(vcf_variant->WeakMatch(*sel_variants[j])) {
120  rows.push_back(i);
121  break;
122  }
123  }
124  }
125  }
126 
127 }
128 
129 void CVcfTableSelection::GetSelection(const ITableData& table, const vector<size_t>& rows, CSelectionEvent& evt) const
130 {
131  size_t n_sel_rows(rows.size());
132  for(size_t i=0; i<n_sel_rows; i++) {
133  SConstScopedObject row_obj(table.GetRowObject(i));
134  const CVcfVariant* vcf_variant(dynamic_cast<const CVcfVariant*>(row_obj.object.GetPointer()));
135  if(vcf_variant) {
136  evt.AddObjectSelection(*vcf_variant);
137  }
138  }
139 }
140 
141 
143 {
144 public:
146 
147  virtual wxWindow* GetWindow() { return m_Window; }
148  virtual wxEvtHandler* GetCommandHandler() { return m_Window->GetEventHandler(); }
149  /// @}
150 
151  /// @name IView implementation
152  /// @(
153  virtual const CViewTypeDescriptor& GetTypeDescriptor() const
154  {
155  return s_VcfViewTypeDescr;
156  }
157  virtual void CreateViewWindow(wxWindow* parent);
158  virtual void DestroyViewWindow();
159  /// @}
160 
161  /// @name IProjectView implementation
162  /// @{
163  virtual bool InitView(TConstScopedObjects& objects, const objects::CUser_object* params);
164  virtual void OnProjectChanged(CProjectViewEvent& evt);
165  /// @}
166 
167  /// @name ISelectionClient Implementation
168  /// @{
169  virtual void GetSelection(CSelectionEvent& evt) const;
170  virtual void GetSelection(TConstScopedObjects& objs) const;
171  virtual void GetMainObject(TConstScopedObjects& objs) const;
172  /// @}
173 
174  /// @addtogroup CProjectViewBase overridables
175  /// @{
176  virtual void GetCompatibleToolBars(vector<string>& names);
177  virtual const CObject* x_GetOrigObject() const;
178  /// @}
179 
180  virtual void OnWidgetSelChanged();
181  /// populate a visible range event for broadcasting
182  virtual void GetVisibleRanges(CVisibleRange& vrange) const;
183 
184  /// @name IRegSettings interface implementation
185  /// @{
186  virtual void SetRegistryPath(const string& reg_path);
187  virtual void LoadSettings();
188  virtual void SaveSettings() const;
189  /// @}
190 
191 protected:
192  void x_OnDataChanged(CEvent* evt);
193  void x_OnUrlHover(CEvent* evt);
194  void x_QueryStatusChange(CEvent* evt);
195  virtual void x_OnSetSelection(CSelectionEvent& evt);
196 
198 
200  wxWindow* m_Window;
202 };
203 
206  &CVcfTableView::x_OnDataChanged)
208  &CVcfTableView::x_OnUrlHover)
210  &CVcfTableView::x_QueryStatusChange)
212 
213 
214 void CVcfTableView::CreateViewWindow(wxWindow* parent)
215 {
216  _ASSERT(!m_Window);
217 
218  CGridWidget* widget = new CGridWidget(parent, wxID_ANY, wxDefaultPosition, wxSize(0, 0), wxBORDER_NONE);
219  widget->SetTableSelection(new CVcfTableSelection());
220  m_Window = widget;
221 
222  widget->SetEventExt(new CVcfGridEvtExt());
223 
224  widget->AddListener(this, ePool_Parent);
225 }
226 
228 {
229  if( m_Window ){
230  m_Window->Destroy();
231  m_Window = 0;
232  }
233 }
234 
235 bool CVcfTableView::InitView(TConstScopedObjects& objects, const objects::CUser_object*)
236 {
238  CScope* scope = NULL;
239  const CObject* object = NULL;
240 
241  if(objects.size() == 1) {
242  object = objects[0].object.GetPointer();
243  scope = objects[0].scope.GetPointer();
244 
245  const CSeq_loc* loc = dynamic_cast<const CSeq_loc*> (object);
246  const CSeq_id* sid = dynamic_cast<const CSeq_id*> (object);
247  const CBioseq* seq = dynamic_cast<const CBioseq*> (object);
248  const CSeq_entry* seq_entry = dynamic_cast<const CSeq_entry*> (object);
249  if (seq_entry && seq_entry->IsSeq())
250  seq = &seq_entry->GetSeq();
251 
252  if (loc) {
253  sid = &sequence::GetId(*loc, scope);
254  } else if (seq) {
255  sid = seq->GetFirstId();
256  }
257  if (sid) {
258  static const wxString strInitializing = wxT("Initializing...");
259  SConstScopedObject s_obj(sid, scope);
260  CBioseq_Handle handle;
261  try {
262  handle = GUI_AsyncExec(
263  [&s_obj](ICanceled&)
264  {
265  const CSeq_id* id = dynamic_cast<const CSeq_id*>(s_obj.object.GetPointer());
266  CScope* scope = s_obj.scope.GetPointer();
267 
268  CBioseq_Handle handle;
269  if (id && scope) {
270  handle = scope->GetBioseqHandle(*id);
271  // resolving the seq-id in other form to avoid
272  // potential future network connection
273  CSeq_id_Handle idh = handle.GetSeq_id_Handle();
274  idh = sequence::GetId(*idh.GetSeqId(), *scope, sequence::eGetId_Best);
275  }
276  return handle;
277  },
278  strInitializing);
279  } catch (CException& e) {
280  string str("Failed to retrieve sequence: ");
281  str += e.GetMsg();
282  wxMessageBox(ToWxString(str));
283  return false;
284  }
285  if ( !handle ) {
286  string str;
287  sid->GetLabel(&str);
288  ReportIDError(str, sid->IsLocal(), "VCF Table View");
289  return false;
290  }
292  _ASSERT(srv);
293 
294  CRef<CGBWorkspace> ws = srv->GetGBWorkspace();
295  if (!ws) return false;
296 
297  CGBDocument* doc = dynamic_cast<CGBDocument*>(ws->GetProjectFromScope(*objects[0].scope));
298  _ASSERT(doc);
299 
300  const objects::CProjectFolder& prj_folder(doc->GetData());
301 
302  if(!prj_folder.IsSetItems())
303  return false;
304 
305  vector< CIRef<INonAsnTrackDataFactory> > data_factories;
307 
308  if (data_factories.empty())
309  return false;
310 
311 // LOG_POST(Info << "CVcfTableView::InitView() " << " for: " << sid->AsFastaString() << ", m_NonAsnTrackData: " <<
312 // m_NonAsnTrackData.GetPointer());
313  for (const auto& prj_item : prj_folder.GetItems()) {
314 // LOG_POST(Info << "\tChecking item: " << prj_item->GetLabel());
315  if (!prj_item->GetItem().IsOther())
316  continue;
317 
318  for (auto &factory : data_factories) {
319  CIRef<INonAsnTrackData> track_data(factory->CreateTrackData(*sid, *prj_item));
320  if (track_data.IsNull()) {
321  continue;
322  }
323  m_NonAsnTrackData.Reset(track_data);
324  }
325  }
326 // LOG_POST(Info << "m_NonAsnTrackData reset to: " << m_NonAsnTrackData.GetPointer());
327 
328  if(m_NonAsnTrackData.IsNull()) {
329  return false;
330  }
332  if(loc) {
333  range = loc->GetTotalRange();
334  } else {
335  }
336  CRef<CTableDataVcf> table_data(new CTableDataVcf(*scope, handle, range, m_NonAsnTrackData->GetBlob()));
337 
338  if (table_data) {
339  table_data->LoadData();
340  table_data->AddListener(this, ePool_Parent);
341 
342  CGridWidget* widget = (CGridWidget*)m_Window;
343 
344  if (doc) {
345  widget->Init(*table_data, &doc->GetUndoManager());
346  //!! avoid an auto-resize to check whether all data is requested at once
347  //!! widget->GetGrid()->AutoSizeRows();
348  x_AttachToProject(*doc);
350  return true;
351  }
352  return false;
353  }
354  }
355  }
356  // cannot represent the data
358  return false;
359 }
360 
362 {
363  if (evt.GetSubtype() == CProjectViewEvent::eData ||
365  m_Window->Refresh();
366  }
367 }
368 
370 {
371  if(m_SelectionService) {
374  }
375 }
376 
378 {
379  if (m_Window && x_HasProject()) {
381  auto nFirstRow(grid->SetSelection(evt));
382  grid->ScrollToRow(static_cast<int>(nFirstRow));
383  }
384 }
385 
387 {
388  if (m_Window && x_HasProject()) {
390 
391  TConstScopedObjects sobjs;
392  grid->GetSelectedObjects (sobjs);
393 
394  TConstObjects objs;
395  ITERATE(TConstScopedObjects, it, sobjs) {
396  objs.push_back(it->object);
397  }
398 
399  evt.AddObjectSelection(objs);
400  }
401 }
402 
403 /// Populate a visible range event prior to broadcasting
405 {
406  TConstScopedObjects sel_objs;
407  GetSelection(sel_objs);
408 
409  ITERATE(TConstScopedObjects, it, sel_objs) {
410  const CSeq_loc * loc = dynamic_cast<const CSeq_loc*>(it->object.GetPointer());
411  const CSeq_feat * sft = dynamic_cast<const CSeq_feat*>(it->object.GetPointer());
412  const CSeq_annot * ant = dynamic_cast<const CSeq_annot*>(it->object.GetPointer());
413  const CVcfVariant *vant = dynamic_cast<const CVcfVariant*>(it->object.GetPointer());
414  if(loc) {
415  vrange.AddLocation(*loc);
416  }
417  else if (sft) {
418  vrange.AddLocation(sft->GetLocation());
419  }
420  else if (vant) {
421  vrange.AddLocation(vant->GetLocation());
422  }
423  else if (ant) {
424  const CSeq_annot::C_Data::TFtable &feats =ant->GetData().GetFtable();
425  ITERATE (CSeq_annot::C_Data::TFtable, feat, feats) {
426  vrange.AddLocation((*feat)->GetLocation());
427  }
428  }
429  }
430 }
431 
432 
434 {
435  if (m_Window && x_HasProject()) {
437  grid->GetSelectedObjects (objs);
438  }
439 }
440 
441 
443 {
444  if (m_Window && x_HasProject()) {
445  /*CGridWidget* grid = (CGridWidget*)m_Window;*/
446 
447  if(m_OrigObjects.size() > 0) {
448  const SConstScopedObject& ScopedObject(m_OrigObjects[0]);
449  const CObject* object = ScopedObject.object.GetPointer();
450  if (object) {
451  CScope* scope(const_cast<CScope*>(ScopedObject.scope.GetPointer()));
452  objs.push_back(SConstScopedObject(object, scope));
453  }
454  }
455  }
456 }
457 
458 // override function to suppress Navigation toolbar
460 {
462 }
463 
465 {
466  if(m_OrigObjects.size() > 0) {
467  return m_OrigObjects[0].object.GetPointer();
468  }
469 
470  return NULL;
471 }
472 
474 {
475  CGridWidgetEvent* gridEvt = dynamic_cast<CGridWidgetEvent*>(evt);
476  if (!gridEvt) return;
477 
479  sb_srv->SetStatusMessage(ToStdString(gridEvt->GetURL()));
480 }
481 
483 {
484  CQueryPanelEvent* queryEvt = dynamic_cast<CQueryPanelEvent*>(evt);
485  if (!queryEvt) return;
486 
488  sb_srv->SetStatusMessage(queryEvt->GetStatus());
489 }
490 
492 {
493  if (!m_Workbench)
494  return;
495 
496  CVcfTableEvent* tableEvt(dynamic_cast<CVcfTableEvent*>(evt));
497  if (!tableEvt) return;
498 
499  CIRef<ITableData> table_data = tableEvt->GetTableData();
500 
501  CGridWidget* widget = (CGridWidget*)GetWindow();
504 
505  widget->Init(*table_data, x_GetUndoManager());
506  //!! this probably affects asking for all data at once!
507  //!! maybe auto sizing can be done based on the first 100 rows instead of trying to grab all of them?
508  if(table_data->GetRowsCount() < 100) {
509  widget->GetGrid()->AutoSizeRows();
510  }
511  widget->Refresh();
512 }
513 
514 void CVcfTableView::SetRegistryPath(const string& reg_path)
515 {
516  IRegSettings* reg_set = dynamic_cast<IRegSettings*>(m_Window);
517  if (reg_set)
518  reg_set->SetRegistryPath(reg_path);
519 }
520 
522 {
523  IRegSettings* reg_set = dynamic_cast<IRegSettings*>(m_Window);
524  if (reg_set)
525  reg_set->LoadSettings();
526 }
527 
528 
530 {
531  IRegSettings* reg_set = dynamic_cast<IRegSettings*>(m_Window);
532  if (reg_set)
533  reg_set->SaveSettings();
534 }
535 
536 ///////////////////////////////////////////////////////////////////////////////
537 /// CVcfTableViewFactory
539 {
540  static string sid("vcf_table_view_factory");
541  return sid;
542 }
543 
545 {
546  static string slabel("VCF Table View Factory");
547  return slabel;
548 }
549 
551 {
552  string alias = GetViewTypeDescriptor().GetIconAlias();
553  provider.RegisterFileAlias(ToWxString(alias), wxT("feature_table_view.png"));
554 }
555 
556 
558 {
559  return s_VcfViewTypeDescr;
560 }
561 
563 {
564  vector<CUICommand*> Commands;
565 /* CUICommand* cmd(new CUICommand(CVcfGridEvtExt::eCmdLinkRefVcf,
566  "&RefVcf Link",
567  "RefVcf Link",
568  ""));
569  Commands.push_back(cmd);
570 */
571  return Commands;
572 }
573 
575 {
576  return new CVcfTableView();
577 }
578 
579 
581 {
582  return NULL;
583 }
584 
585 
587 {
588  bool found_good = false;
589  bool found_bad = false;
590  for( size_t i = 0; i < objects.size(); i++ ){
591  const CObject* obj = objects[i].object;
592  const type_info& type = typeid(*obj);
593  bool isThisGood(typeid(CSeq_loc) == type);
594 
595  if(isThisGood && !found_good) {
596  found_good = true;
597  }
598  if(!isThisGood && !found_bad) {
599  found_bad = true;
600  }
601  }
602  if( found_good ){
603  return fCanShowSeparated | (found_bad ? fCanShowSome : fCanShowAll);
604  }
605  return fCanShowNone;
606 }
607 
std::invoke_result< _Fty, ICanceled & >::type GUI_AsyncExec(_Fty &&_Fnarg, const wxString &msg=wxT("Accessing network..."))
Definition: async_call.hpp:130
CBioseq_Handle –.
const CSeq_id * GetFirstId() const
Definition: Bioseq.cpp:271
CEvent - generic event implementation TODO TODO - Attachments.
Definition: event.hpp:86
CGBDocument.
Definition: document.hpp:113
CUndoManager & GetUndoManager()
Definition: document.hpp:158
const wxString & GetURL() const
Definition: grid_event.hpp:70
void SetEventExt(IGridEvtExt *evtExt)
void Init(ITableData &table_data, ICommandProccessor *cmdProccessor)
CGrid * GetGrid()
void SetTableSelection(ITableSelection *tableSelection)
CObject –.
Definition: ncbiobj.hpp:180
CProjectService - a service providing API for operations with Workspaces and Projects.
virtual void x_ReportInvalidInputData(TConstScopedObjects &objects)
use this function to report incompatible data in InitView()
virtual void OnProjectChanged()
virtual void x_UpdateContentLabel()
virtual void x_AttachToProject(CGBDocument &doc)
ISelectionService * m_SelectionService
virtual bool x_HasProject() const
CProjectViewEvent.
Definition: document.hpp:62
EEventSubtype GetSubtype() const
Definition: document.hpp:96
CProjectViewTypeDescriptor - holds description of a project view type.
CProjectView.
virtual CUndoManager * x_GetUndoManager()
gets undo manager
void BroadcastVisibleRange(CVisibleRange::EBasicPolicy bp)
fire a non-recursive visible range changed event
const string & GetStatus() const
CRef –.
Definition: ncbiobj.hpp:618
CScope –.
Definition: scope.hpp:92
CSelectionEvent CSelectionEvent is used for broadcasting selection between views.
Definition: obj_event.hpp:68
vector< CConstRef< objects::CVcfVariant > > TVcfVariants
Definition: obj_event.hpp:80
const TVcfVariants & GetVcfVariants() const
Definition: obj_event.hpp:125
bool AddObjectSelection(const CObject &obj)
Definition: obj_event.cpp:177
Definition: Seq_entry.hpp:56
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
CIRef< ITableData > GetTableData()
virtual void GetSelection(const ITableData &table, const vector< size_t > &rows, CSelectionEvent &evt) const
virtual void GetRows(const ITableData &table, const CSelectionEvent &evt, vector< size_t > &rows) const
virtual const CProjectViewTypeDescriptor & GetProjectViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
virtual vector< CUICommand * > GetCommands()
returns a vector of commands (takes ownership over CUICommand pointers)
virtual int TestInputObjects(TConstScopedObjects &objects)
tests input objects (probably using object conversion, or not) and returns a combination of ETestResu...
virtual void RegisterIconAliases(wxFileArtProvider &provider)
called by the framework to give Factory a chance to register images used by view
virtual IView * CreateInstanceByFingerprint(const TFingerprint &fingerprint) const
if fingerprint is recognized - creates and returns a new instance
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
virtual IView * CreateInstance() const
creates a view instance
virtual string GetExtensionIdentifier() const
CVcfTableViewFactory.
virtual void x_OnSetSelection(CSelectionEvent &evt)
override in derived classes in order to handle selection broadcast
void x_OnUrlHover(CEvent *evt)
virtual void CreateViewWindow(wxWindow *parent)
create Window corresponding to the view
virtual void DestroyViewWindow()
destroy Window corresponding to the view
void x_QueryStatusChange(CEvent *evt)
virtual void GetVisibleRanges(CVisibleRange &vrange) const
populate a visible range event for broadcasting
void x_OnDataChanged(CEvent *evt)
virtual void SetRegistryPath(const string &reg_path)
virtual wxWindow * GetWindow()
returns a pointer to the wxWindow representing the client
virtual bool InitView(TConstScopedObjects &objects, const objects::CUser_object *params)
initialize view with data, inside this function the view must call CProjectService::AttachView to con...
virtual void OnWidgetSelChanged()
TConstScopedObjects m_OrigObjects
virtual void GetMainObject(TConstScopedObjects &objs) const
Adds the main data objects represented by the client to "objects".
virtual void SaveSettings() const
virtual void GetSelection(CSelectionEvent &evt) const
get selection for broadcasting
wxWindow * m_Window
virtual wxEvtHandler * GetCommandHandler()
IWMClient implementation.
virtual const CViewTypeDescriptor & GetTypeDescriptor() const
return an object providing meta information about thei view type
CIRef< INonAsnTrackData > m_NonAsnTrackData
virtual void LoadSettings()
CViewTypeDescriptor - holds description of a view type.
Definition: view.hpp:98
void AddLocation(const objects::CSeq_loc &loc)
Interface for testing cancellation request in a long lasting operation.
Definition: icanceled.hpp:51
virtual const CViewTypeDescriptor & GetViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
IRegSettings An interface for objects that save / restore settings using CGuiRegistry.
virtual void SaveSettings() const =0
virtual void LoadSettings()=0
virtual void SetRegistryPath(const string &path)=0
virtual void OnSelectionChanged(ISelectionClient *source)=0
notifies Service and its observers about changes in selection
IView - represents a standard visual part of Workbench UI.
Definition: view.hpp:73
CFingerprint identifies an instance of IWMClient and is used for labeling layout positions.
Definition: wm_client.hpp:58
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
static int nRows
Definition: cn3d_png.cpp:115
static const struct name_t names[]
static const char * str(char *buf, int n)
Definition: stats.c:84
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
virtual void GetCompatibleToolBars(vector< string > &names)
returns the names of toolbars compatible with this class (toolbars that are relevant and useful in th...
virtual const CObject * x_GetOrigObject() const
#define NULL
Definition: ncbistd.hpp:225
const string & GetMsg(void) const
Get message string.
Definition: ncbiexpt.cpp:461
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
Definition: service.hpp:91
#define EXT_POINT__NONASN_TRACK_DATA_FACTORY
bool WeakMatch(const CVcfVariant &right) const
Definition: snp_gui.hpp:315
CRef< objects::CScope > scope
Definition: objects.hpp:53
void GetExtensionAsInterface(const string &ext_point_id, vector< CIRef< I > > &interfaces)
GetExtensionAsInterface() is a helper function that extracts all extensions implementing the specifie...
vector< CConstRef< CObject > > TConstObjects
Definition: objects.hpp:64
virtual const string & GetIconAlias() const
Definition: ui_object.cpp:130
#define END_EVENT_MAP()
Ends definition of Command Map.
CConstRef< CObject > object
Definition: objects.hpp:52
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
virtual void AddListener(CEventHandler *listener, int pool_name=ePool_Default)
Add a listener.
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
const objects::CSeq_loc & GetLocation() const
Definition: snp_gui.hpp:302
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
Definition: Seq_id.cpp:2040
CConstRef< CSeq_id > GetSeqId(void) const
TRange GetTotalRange(void) const
Definition: Seq_loc.hpp:913
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
Definition: sequence.hpp:101
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
const CSeq_id_Handle & GetSeq_id_Handle(void) const
Get handle of id used to obtain this bioseq handle.
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:1684
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
Definition: ncbiobj.hpp:735
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
const TLocation & GetLocation(void) const
Get the Location member data.
Definition: Seq_feat_.hpp:1117
bool IsLocal(void) const
Check if variant Local is selected.
Definition: Seq_id_.hpp:775
const TSeq & GetSeq(void) const
Get the variant data.
Definition: Seq_entry_.cpp:102
bool IsSeq(void) const
Check if variant Seq is selected.
Definition: Seq_entry_.hpp:257
const TFtable & GetFtable(void) const
Get the variant data.
Definition: Seq_annot_.hpp:621
list< CRef< CSeq_feat > > TFtable
Definition: Seq_annot_.hpp:193
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_annot_.hpp:873
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
END_EVENT_TABLE()
int i
#define wxT(x)
Definition: muParser.cpp:41
range(_Ty, _Ty) -> range< _Ty >
@ eOneObjectAccepted
static static static wxID_ANY
Definition: type.c:6
#define _ASSERT
USING_SCOPE(objects)
CProjectViewTypeDescriptor s_VcfViewTypeDescr("VCF Table View", "vcf_table_view", "Show tabular information about VCFs", "The VCF Table View provides a tabular break-down of a loaded VCF file", "VCF_TABLE_VIEW", "Sequence", false, "Seq-loc", eOneObjectAccepted)
CVcfTableView.
ON_EVENT(CVcfTableEvent, CVcfTableEvent::eDataChanged, &CVcfTableView::x_OnDataChanged) ON_EVENT(CGridWidgetEvent
void ReportIDError(const string &id_label, bool is_local, const string &title="Error message")
Definition: wx_utils.cpp:99
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
Modified on Fri Apr 12 17:18:10 2024 by modify_doxy.py rev. 669887