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

Go to the SVN repository for this file.

1 /* $Id: multi_align_view.cpp 46079 2021-01-21 19:55:00Z grichenk $
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: Andrey Yazhuk
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
35 
37 
39 
42 
44 
46 
51 
52 #include <gui/objutils/utils.hpp>
53 #include <gui/objutils/label.hpp>
54 
55 #include <objmgr/util/sequence.hpp>
56 #include <serial/iterator.hpp>
57 
58 #include <wx/menu.h>
59 
60 
63 
64 
65 
66 
68  eCmdUseSparseAln = 8300
69 };
70 
71 
72 ///////////////////////////////////////////////////////////////////////////////
73 /// CMultiAlignView
75  "Multiple Sequence Alignment View", // type name
76  "multi_align_view", // icon alias TODO
77  "Multiple Sequence Alignment View hint",
78  "View for the multiple alignments with each column and residue colored according to its degree of mismatch",
79  "MULTI_ALIGN_VIEW", // help ID
80  "Alignment", // category
81  false, // not a singleton
82  "Seq-align",
84 );
85 
86 
89  &CMultiAlignView::OnAlnWidgetSelChanged)
90  ON_EVENT(CAlnMultiPane::CEvent, CAlnMultiPane::eSelRowChanged,
91  &CMultiAlignView::OnAlnWidgetSelChanged)
92  ON_EVENT(COpenGraphicViewEvent, CViewEvent::eOpenGraphicalViewEvent,
93  &CMultiAlignView::OnOpenGraphicalView)
95 
96 
98 : m_Sparse(false),
99  m_AlnWidget(NULL)
100 {
101 }
102 
103 
105 {
107  return m_AlnWidget;
108 }
109 
110 static
111 WX_DEFINE_MENU(kViewMenu)
112  WX_SUBMENU("&View")
113  WX_MENU_SEPARATOR_L("Contribs")
114  WX_SUBMENU("Multiple Alignment")
121  WX_SUBMENU("Hide / Show")
127  WX_SUBMENU("Master")
132  WX_SUBMENU("Coloring")
139  WX_SUBMENU("&Edit")
140  WX_MENU_SEPARATOR_L("Contribs")
141  WX_SUBMENU("Multiple Alignment")
147 WX_END_MENU()
148 
149 
150 void CMultiAlignView::x_CreateMenuBarMenu()
151 {
152  CUICommandRegistry& cmd_reg = m_Workbench->GetUICommandRegistry();
153 
154  m_MenuBarMenu.reset(cmd_reg.CreateMenu(kViewMenu));
155 }
156 
158 
159  return kViewMenu;
160 }
161 
162 void CMultiAlignView::CreateViewWindow(wxWindow* parent)
163 {
164  _ASSERT( ! m_AlnWidget);
165 
166  m_AlnWidget = new CAlnMultiWidget(parent);
167 
169 
172 
173  // setup display styles
176 
178 }
179 
180 
182 {
183  if(m_AlnWidget) {
184  m_AlnWidget->Destroy();
185  m_AlnWidget = NULL;
186  }
187 }
188 
189 
191 {
193 }
194 
196 {
197  // extract the alignments from the argument
198  const CSeq_annot* annot = dynamic_cast<const CSeq_annot*>(obj);
199  if(annot) {
200  m_OrigAnnot.Reset(annot);
201  } else {
202  const CSeq_align* align = dynamic_cast<const CSeq_align*>(obj);
203  if(align) {
204  m_OrigAlign.Reset(align);
205  }
206  }
207 
208  return (m_OrigAnnot || m_OrigAlign);
209 }
210 
211 bool CMultiAlignView::InitView(TConstScopedObjects& objects, const objects::CUser_object*)
212 {
214 
215  CScope* scope = NULL;
216  const CObject* obj = NULL;
217 
218  if(objects.size() == 1) {
219  obj = objects[0].object.GetPointer();
220  scope = objects[0].scope.GetPointer();
221  }
222 
223  if(x_GetValidInputData(obj)) {
225  _ASSERT(srv);
226 
227  CRef<CGBWorkspace> ws = srv->GetGBWorkspace();
228  if (!ws) return false;
229 
230  CGBDocument* doc = dynamic_cast<CGBDocument*>(ws->GetProjectFromScope(*scope));
231  if (doc) {
232  x_AttachToProject(*doc);
234  return true;
235  } else return false;
236  } else {
237  // cannot represent the data
239  return false;
240  }
241 
242 }
243 
244 
246 {
248 
250 
251  if (x_HasProject()) {
252  CScope* scope = x_GetScope();
253 
254  _ASSERT(scope);
255 
256  if (m_OrigAnnot) {
257  m_Builder.Init(*scope, *m_OrigAnnot);
258  m_Sparse =
259  m_OrigAnnot->GetData().IsAlign()
260  && m_OrigAnnot->GetData().GetAlign().front()->CanGetSegs()
261  &&(
262  m_OrigAnnot->GetData().GetAlign().front()->GetSegs().IsSparse()
263  || m_OrigAnnot->GetData().GetAlign().front()->GetSegs().IsSpliced()
264  )
265  ;
266  } else if (m_OrigAlign) {
267  m_Builder.Init(*scope, *m_OrigAlign);
268  m_Sparse = m_OrigAlign->CanGetSegs()
269  &&(
270  m_OrigAlign->GetSegs().IsSparse()
271  || m_OrigAlign->GetSegs().IsSpliced()
272  )
273  ;
274  }
275  if (m_Sparse) {
278  }
279  m_Builder.SetListener(this);
280 
283 
285  }
286 }
287 
288 
290 {
291  /*
292  if(
293  evt.GetSubtype() == CProjectViewEvent::eData
294  || evt.GetSubtype() == CProjectViewEvent::eBothPropsData
295  ){
296  // reset datasource to make sure the active job is deleted
297  m_AlnWidget->GetModel()->SetDataSource(NULL);
298  m_AlnWidget->SetDataSource(NULL);
299  m_DataSource.Reset();
300  OnProjectChanged();
301  m_AlnWidget->Refresh();
302  }
303  */
304 
305  if(
308  ){
310  }
311 }
312 
313 
314 // handles notifications from the Data Source
316 {
317  if (m_AlnWidget) {
318  m_AlnWidget->OnDSChanged(update);
319  }
320 
321  if(update.GetType() == CDataChangeNotifier::eChanged) {
324  }
325 }
326 
327 
329 {
331 
332  CScope* scope = x_GetScope();
333  m_ObjIndex.Clear(scope);
334 
335  // for every row in the alignment - register a {handle, id} pair
336  IAlnExplorer::TNumrow n_rows = m_DataSource->GetNumRows();
337  for( IAlnExplorer::TNumrow row = 0; row < n_rows; row++ ) {
338  if(m_DataSource->CanGetId(row)) {
339  const CSeq_id& id = m_DataSource->GetSeqId(row);
340  m_ObjIndex.Add(new CSelRowHandle(row), id);
341  }
342  }
343 }
344 
345 typedef vector<CConstRef<CSeq_id> > TRSeqIdVector;
346 
347 
349  CSelectionEvent::TRangeColl& loc) const
350 {
351  TSeqPos from = m_DataSource->GetSeqStart(row);
352  TSeqPos to = m_DataSource->GetSeqStop(row);
353  CAlnVec::TSignedRange total_r(from, to);
354 
356  unique_ptr<IAlnSegmentIterator> p_it(m_DataSource->CreateSegmentIterator(row, total_r, flags));
357  IAlnSegmentIterator& it = *p_it;
358 
359  for( ; it; ++it ) {
360  const IAlnSegment::TSignedRange& aln_r = it->GetRange();
361  CSelectionEvent::TRange r(aln_r.GetFrom(), aln_r.GetTo());
362  loc.CombineWith(r);
363  }
364 }
365 
366 
368 {
369  seq_coll.clear();
370  if(m_DataSource.GetPointer() && ! m_DataSource->IsEmpty()
371  && m_DataSource->IsSetAnchor()) {
372  // retrieve linear selection on master sequence
374 
375  CAlnVecMultiDataSource::TNumrow master_row = m_DataSource->GetAnchor();
376  const TRangeColl& aln_coll = m_AlnWidget->GetSelection();
377 
378  m_DataSource->GetSeqFromAln(master_row, aln_coll, seq_coll);
379  return true;
380  }
381  return false;
382 }
383 
384 
386 {
387  if (m_AlnWidget && x_HasProject()) {
388  typedef IAlnMultiDataSource ::TNumrow TNumrow;
389 
390  // object selection
391  vector<TNumrow> rows;
393  CScope* scope = x_GetScope();
394  objs.reserve(rows.size());
395 
396  ITERATE(vector<TNumrow>, it, rows) { // iterate by selected rows
397  TNumrow row = *it;
398  const CSeq_id& id = m_DataSource->GetSeqId(row);
399 
400  objs.push_back(SConstScopedObject(&id, scope));
401  }
402 
403  // range selection
405  if(x_GetSeqRangeSelection(seq_coll) && ! seq_coll.Empty()) {
406  CAlnVecMultiDataSource::TNumrow master_row = m_DataSource->GetAnchor();
407  const CSeq_id& master_id = m_DataSource->GetSeqId(master_row);
408  CRef<CSeq_loc> loc = CSeqUtils::CreateSeq_loc(master_id, seq_coll);
409  if (loc) {
410  objs.push_back(SConstScopedObject(loc, scope));
411  }
412  }
413  }
414 }
415 
416 
417 // handles incoming selection broadcast (overriding CView virtual function)
419 {
420  if (m_DataSource.Empty() || m_DataSource->IsEmpty()) return;
421 
422  bool has_anchor = m_DataSource->IsSetAnchor();
423  CScope* scope = x_GetScope();
424 
425  _ASSERT(scope);
426 
427  // process Range Selection
428  if(evt.HasRangeSelection() && has_anchor) {
430  TRangeColl coll, aln_coll;
431 
432  CAlnVecMultiDataSource::TNumrow master_row = m_DataSource->GetAnchor();
433  const CSeq_id& master_id = m_DataSource->GetSeqId(master_row);
434  evt.GetRangeSelection(master_id, *scope, coll);
435 
436  m_DataSource->GetAlnFromSeq(master_row, coll, aln_coll);
437 
438  m_AlnWidget->SetSelection(aln_coll);
439  }
440 
441  // process Object Selection
442  if(evt.HasObjectSelection()) {
443  vector<CAlnVec::TNumrow> sel_rows;
444 
445  TConstObjects sel_objs;
446  evt.GetRangeSelectionAsLocs(sel_objs);
447 
448  CConstRef<CSeq_id> row_id;
450 
451  CObjectIndex::TResults results;
452 
453  ITERATE(CSelectionEvent::TIds, it_id, evt.GetIds()) {
454  const CSeq_id& id = **it_id;
455  CSeq_id_Descr descr(NULL, id, evt.GetScope());
456  // TODO - put descr in SelectionEvent
457 
458  results.clear();
459  m_ObjIndex.GetMatches(descr, results);
460  ITERATE(CObjectIndex::TResults, it_r, results) {
461  const CSelRowHandle* row_handle =
462  reinterpret_cast<const CSelRowHandle*>(*it_r);
463  sel_rows.push_back(row_handle->GetNumrow());
464  }
465  }
466 
467  ITERATE(CSelectionEvent::TIdLocs, it_loc, evt.GetIdLocs()) {
468  CConstRef<CIdLoc> id_loc = *it_loc;
469  CSeq_id_Descr descr(NULL, *id_loc->m_Id, evt.GetScope());
470  // TODO - put descr in SelectionEvent
471 
472  results.clear();
473  m_ObjIndex.GetMatches(descr, results);
474  ITERATE(CObjectIndex::TResults, it_r, results) {
475  const CSelRowHandle* row_handle =
476  reinterpret_cast<const CSelRowHandle*>(*it_r);
477  IAlnExplorer::TNumrow row = row_handle->GetNumrow();
478 
479  bool match = true;
481  match = false;
482 
483  TSeqPos pos = m_DataSource->GetSeqStart(row);
484  if(pos == id_loc->m_Range.GetFrom()) {
485  pos = m_DataSource->GetSeqStop(row);
486  match = (pos == id_loc->m_Range.GetTo());
487  }
488  }
489  if(match) {
490  sel_rows.push_back(row);
491  }
492  }
493  }
494 
495  m_AlnWidget->Select(sel_rows, true, true);
496  }
497 }
498 
499 
501 {
502  if(m_AlnWidget && m_DataSource.GetPointer() && ! m_DataSource->IsEmpty()) {
503  // set Range Selection
505  if(x_GetSeqRangeSelection(seq_coll)) {
506  CAlnVecMultiDataSource::TNumrow master_row = m_DataSource->GetAnchor();
507  const CSeq_id& master_id = m_DataSource->GetSeqId(master_row);
508  evt.AddRangeSelection(master_id, seq_coll);
509  }
510 
511  // set Object Selection
512  typedef IAlnMultiDataSource::TNumrow TNumrow;
513 
514  vector<TNumrow> rows;
516  ITERATE(vector<TNumrow>, it, rows) { // iterate by selected rows
517  TNumrow row = *it;
518  const CSeq_id& id = m_DataSource->GetSeqId(row);
519 
521  TSeqPos from = m_DataSource->GetSeqStart(row);
522  TSeqPos to = m_DataSource->GetSeqStop(row);
523 
524  evt.AddObjectSelection(id, CRange<TSeqPos>(from, to));
525  } else {
526  evt.AddObjectSelection(id);
527  }
528  }
529  }
530 }
531 
532 
533 // handles incoming selection broadcast (overriding CView virtual function)
534 // this event handler reacts on notification coming from CAlnMultiWidget
536 {
537  _ASSERT(evt);
538 
539  switch (evt->GetID()) {
542  if (m_SelectionService)
544  break;
545  default:
546  break;
547  }
548 }
549 
550 
552 {
553  COpenGraphicViewEvent* openEvent = static_cast<COpenGraphicViewEvent*>(evt);
555  CIRef<IProjectView> view = srv->AddProjectView("Graphical Sequence View", openEvent->GetObject(), openEvent->GetParams());
556 }
557 
558 
559 void CMultiAlignView::SetRegistryPath(const string& reg_path)
560 {
561  m_RegPath = reg_path; // store for later use
562 
563  m_AlnWidget->SetRegistryPath(reg_path + ".Widget");
564 }
565 
566 
568 {
569  if( ! m_RegPath.empty()) {
571  }
572 }
573 
574 
576 {
577  if( ! m_RegPath.empty()) {
579  }
580 }
581 
582 
584 {
585  const CObject* obj = m_OrigAnnot ? (const CObject*) m_OrigAnnot.GetPointer()
587  return obj;
588 }
589 
590 
591 ///////////////////////////////////////////////////////////////////////////////
592 /// CMultiAlignViewFactory
594 {
595  static string sid("multiple_alignment_view_factory");
596  return sid;
597 }
598 
600 {
601  static string slabel("Multiple Sequence Alignment View Factory");
602  return slabel;
603 }
604 
605 
607 {
608  string alias = GetViewTypeDescriptor().GetIconAlias();
609  provider.RegisterFileAlias(ToWxString(alias), wxT("multi_align_view.png"));
610 }
611 
612 
614  wxFileArtProvider& provider)
615 {
616  WidgetsData_RegisterCommands(cmd_reg, provider);
617  CAlnMultiWidget::RegisterCommands(cmd_reg, provider);
618 }
619 
620 
622 {
624 }
625 
626 
628 {
629  return new CMultiAlignView();
630 }
631 
632 
634 {
635 /*
636  TFingerprint print(CMultiAlignView::m_TypeDescr.GetLabel(), false);
637  if(print == fingerprint) {
638  return new CMultiAlignView();
639  }
640 */
641  return NULL;
642 }
643 
644 bool CMultiAlignViewFactory::IsCompatibleWith( const CObject& object, objects::CScope& scope )
645 {
646  const type_info& type = typeid(object);
647 
648  if( typeid(CSeq_align) == type ){
649  return true;
650  }
651 
652  if( typeid(CSeq_annot) == type ){
653  const CSeq_annot* annot = dynamic_cast<const CSeq_annot*>(&object);
654  return annot && annot->IsAlign();
655  }
656 
657 /*
658  if( typeid(CSeq_id) == type ){
659  return true;
660  }
661 */
662 
663  return false;
664 }
665 
667 {
668  bool found_good = false;
669  bool found_bad = false;
670 
672  const CObject* object = oitr->object;
673  CScope* scope = oitr->scope;
674 
675  if( object && scope && IsCompatibleWith( *object, *scope ) ){
676  found_good = true;
677  } else {
678  found_bad = true;
679  }
680  }
681 
682  return
683  found_good
684  ? fCanShowSeparated |( found_bad ? fCanShowSome : fCanShowAll )
685  : fCanShowNone
686  ;
687 }
688 
689 
691 {
692  if( objects.size() < 2 ){
693  return true;
694  }
695 
697  CSeq_annot::TData::TAlign& aligns = data->SetAlign();
698 
699  CScope* scope = NULL;
701  if( scope == NULL ){
702  scope = it->scope;
703  }
704  const CObject* const_obj = it->object;
705  CObject* obj = const_cast<CObject*>( const_obj );
706 
707  CRef<CSeq_align> align( dynamic_cast<CSeq_align*>( obj ) );
708  if( align ){
709  aligns.push_back( align );
710  }
711  }
712 
713  CRef<CSeq_annot> annot( new CSeq_annot() );
714  annot->SetData( *data );
715 
716  objects.clear();
717  objects.push_back(SConstScopedObject(annot, scope));
718 
719  return true;
720 }
721 
722 class CMAPanel;
723 
724 ///////////////////////////////////////////////////////////////////////////////
725 /// CMAViewManager
726 ///
728 {
729 public:
731  : COpenViewManager( factory )
732  //, mf_IsSet( false )
733  {
734  }
735 
736  virtual bool DoTransition( EAction action );
737 
738 public:
739 
740 /*
741  objects::CScope* GetScope() const { return m_Scope; }
742  const CMAView::TAlignVector& GetAligns() const { return m_Aligns; }
743  const vector<int>& GetGroups() const { return m_Groups; }
744  const vector< set<CSeq_id_Handle> >& GetHandlesSet() const { return m_AlnHandles; }
745  int GetNumSegments( int aGroupIx ) const {
746  return m_NumSegs[aGroupIx];
747  }
748 */
749  virtual wxPanel* GetCurrentPanel();
750  virtual bool CanDo( EAction action );
751 
752 protected:
753  enum EState {
755  };
756 
757 protected:
758  virtual void FinalizeParams();
759 
761  virtual CMAPanel* CreateAnchorPanel();
762  virtual void FinalizeAnchor();
763 
764 private:
766 /*
767  objects::CScope* m_Scope;
768  CMAView::TAlignVector m_Aligns;
769  vector<int> m_Groups;
770  vector< set<CSeq_id_Handle> > m_AlnHandles;
771  vector<int> m_NumSegs;
772  bool mf_IsSet;
773 */
774 };
775 
776 ///////////////////////////////////////////////////////////////////////////////
777 /// CMAPanel
778 ///
779 class CMAPanel : public CParamsPanel
780 {
781 
782 public:
783 
784  CMAPanel();
785  CMAPanel( wxWindow* parent, wxWindowID id = SYM_CONVRESPANEL_IDNAME, const wxPoint& pos = SYM_CONVRESPANEL_POSITION, const wxSize& size = SYM_CONVRESPANEL_SIZE, long style = SYM_CONVRESPANEL_STYLE );
786 
787  virtual bool Create( wxWindow* parent, wxWindowID id = SYM_CONVRESPANEL_IDNAME, const wxPoint& pos = SYM_CONVRESPANEL_POSITION, const wxSize& size = SYM_CONVRESPANEL_SIZE, long style = SYM_CONVRESPANEL_STYLE );
788 
789  void Init();
790 
791  virtual void CreateControls();
792 
793  enum {
795  ID_ONEVIEWPEROBJECT = 10035
796  };
797  ////@end CConversionResultPanel member variables
798 
799  void SetManager( CMAViewManager* aManager ){
800  m_Manager = aManager;
801  }
802 
803  /// add your methods here
804  virtual void SetObjects( CObjectList& objs );
805 
806  /// Return the selected item
807  virtual bool GetSelection( TConstScopedObjects& buf );
808 
809  /// Force OneViewPerObject true, and lock it
810  virtual void EnforceOneViewPerObject();
811 
812  /// @name IRegSettings implementation
813  /// @{
814  virtual void SetRegistryPath(const string& path);
815  virtual void LoadSettings();
816  virtual void SaveSettings() const;
817  /// @}
818 
819 private:
822 };
823 
824 
825 ///////////////////////////////////////////////////////////////////////////////
826 /// CMAViewManager implementation
827 ///
829 {
830 
831  if( m_State == eAnchor ){
832  if( action == eNext ){
833  // finalize choice
834  TConstScopedObjects seqs;
835  m_AnchorPanel->GetSelection( seqs );
836 
838  CSeq_annot::TData::TAlign& chosen_aligns = data->SetAlign();
839 
840  CScope* scope = NULL;
842  const CSeq_id* const_id = dynamic_cast<const CSeq_id*>( it->object.GetPointer() );
843  if( !const_id ) continue;
844 
845  CSeq_id_Handle chosen_idh = CSeq_id_Handle::GetHandle( *const_id );
846  chosen_idh = sequence::GetId( chosen_idh, *it->scope, sequence::eGetId_Canonical );
847 
849  if( !scope ){
850  scope = ix->scope;
851  }
852 
853  list< CRef< CSeq_align > > aligns;
854 
855  const CSeq_annot* annot = dynamic_cast<const CSeq_annot*>( ix->object.GetPointer() );
856  if( annot && annot->IsAlign() ){
857  aligns = const_cast<list< CRef< CSeq_align > >&>( annot->GetData().GetAlign() );
858  }
859 
860  const CSeq_align* align = dynamic_cast<const CSeq_align*>( ix->object.GetPointer() );
861  if( align ){
862  aligns.push_back( CRef<CSeq_align>( const_cast<CSeq_align*>( align ) ) );
863  }
864 
865 
866  NON_CONST_ITERATE( list< CRef< CSeq_align > >, aix, aligns ){
867  CSeq_align* aln = aix->GetPointer();
868 
869  int num_seqs = aln->CheckNumRows();
870  if( num_seqs <= 0 ){
871  continue;
872  }
873 
874  for( int q = 0; q < num_seqs; q++ ){
875  const CSeq_id& seq_id = aln->GetSeq_id( q );
876  if (seq_id.Match(*const_id)) {
877  chosen_aligns.push_back(*aix);
878  break;
879  }
881  idh = sequence::GetId( idh, *ix->scope, sequence::eGetId_Canonical );
882  if( idh == chosen_idh ){
883  chosen_aligns.push_back( *aix );
884  break;
885  }
886  }
887  }
888  }
889  }
890 
891  CRef<CSeq_annot> annot( new CSeq_annot() );
892  annot->SetData( *data );
893 
894  m_OutputObjects.clear();
895  m_OutputObjects.push_back(SConstScopedObject(annot, scope));
896 
897 
898 
899 
900 
901  FinalizeAnchor();
902  return true;
903 
904  } else {
905  // roll back to alignments
906  m_State = eInvalid;
907  action = eNext;
908 
909  return COpenViewManager::DoTransition( action );
910  }
911  } else {
912  if( !COpenViewManager::DoTransition( action ) ){
913  return false;
914  }
915 
916  if( m_State != eAnchor ){
917  return true;
918  }
919 
920  // if( action == eBack ) that is we came from 'Completed' (or whatever)
921  // we need to restore alignment set, otherwise we can use m_OutputObjects
922 
924  //! show panels with seqs
925 
926  set<CSeq_id_Handle> all_idh_set;
927  CRef<CObjectList> oblist( new CObjectList() );
928 
930 
931  list< CRef< CSeq_align > > aligns;
932 
933  const CSeq_annot* annot = dynamic_cast<const CSeq_annot*>( ix->object.GetPointer() );
934  if( annot && annot->IsAlign() ){
935  aligns = const_cast<list< CRef< CSeq_align > >&>( annot->GetData().GetAlign() );
936  }
937 
938  const CSeq_align* align = dynamic_cast<const CSeq_align*>( ix->object.GetPointer() );
939  if( align ){
940  aligns.push_back( CRef<CSeq_align>( const_cast<CSeq_align*>( align ) ) );
941  }
942 
943 
944  NON_CONST_ITERATE( list< CRef< CSeq_align > >, aix, aligns ){
945  CSeq_align* aln = aix->GetPointer();
946 
947  int num_seqs = aln->CheckNumRows();
948  if( num_seqs <= 0 ){
949  continue;
950  }
951 
952  for( int q = 0; q < num_seqs; q++ ){
953  const CSeq_id& seq_id = aln->GetSeq_id( q );
955  idh = sequence::GetId( idh, *ix->scope, sequence::eGetId_Canonical );
956  if( all_idh_set.insert( idh ).second ){
957  oblist->AddRow(
958  const_cast<CSeq_id*>( idh.GetSeqId().GetPointer() ),
959  ix->scope
960  );
961  }
962  }
963  }
964  }
965 
967  m_AnchorPanel->Hide();
970 
971  m_AnchorPanel->SetObjects( *oblist );
972 
973 
974  } else {
975  FinalizeAnchor();
976  }
977 
978  return true;
979  }
980 }
981 
983 {
984  m_State = eAnchor;
985 }
986 
988 {
989  if( m_State == eAnchor ){
990  return action == eNext || action == eBack;
991  }
992 
993  return COpenViewManager::CanDo( action );
994 }
995 
997 {
998  if( m_State == eAnchor ){
999  return m_AnchorPanel;
1000  }
1001 
1003 }
1004 
1006 {
1007  set<CSeq_id_Handle> common_idh_set;
1008 
1010 
1011  list< CRef< CSeq_align > > aligns;
1012 
1013  const CSeq_annot* annot = dynamic_cast<const CSeq_annot*>( ix->object.GetPointer() );
1014  if( annot && annot->IsAlign() ){
1015  aligns = const_cast<list< CRef< CSeq_align > >&>( annot->GetData().GetAlign() );
1016  }
1017 
1018  const CSeq_align* align = dynamic_cast<const CSeq_align*>( ix->object.GetPointer() );
1019  if( align ){
1020  aligns.push_back( CRef<CSeq_align>( const_cast<CSeq_align*>( align ) ) );
1021  }
1022 
1023 
1024  NON_CONST_ITERATE( list< CRef< CSeq_align > >, aix, aligns ){
1025  CSeq_align* aln = aix->GetPointer();
1026 
1027  int num_seqs = aln->CheckNumRows();
1028  if( num_seqs <= 0 ){
1029  continue;
1030  }
1031 
1032  set<CSeq_id_Handle> idh_set;
1033  for( int q = 0; q < num_seqs; q++ ){
1034  const CSeq_id& seq_id = aln->GetSeq_id( q );
1035  CSeq_id_Handle idh = CSeq_id_Handle::GetHandle( seq_id );
1036  idh = sequence::GetId( idh, *ix->scope, sequence::eGetId_Canonical );
1037  idh_set.insert( idh );
1038  }
1039 
1040  if( common_idh_set.empty() ){
1041  // fill the set initially
1042  common_idh_set = idh_set;
1043 
1044  } else {
1045  // check if the set has common seqs
1046  set<CSeq_id_Handle> intersection;
1047  ITERATE( set<CSeq_id_Handle>, hix, common_idh_set ){
1048  if( idh_set.find( *hix ) != idh_set.end() ){
1049  intersection.insert( *hix );
1050  }
1051  }
1052 
1053  if( intersection.empty() ){
1054  return true;
1055  } else {
1056  common_idh_set = intersection;
1057  }
1058  }
1059  }
1060  }
1061 
1062  return false;
1063 }
1064 
1066 {
1067  CMAPanel* panel = new CMAPanel();
1068 
1069  //panel->SetManager( this );
1070 
1071  return panel;
1072 }
1073 
1075 {
1076  m_State = eCompleted;
1077 }
1078 
1079 ///////////////////////////////////////////////////////////////////////////////
1080 /// CMAPanel implementation
1081 ///
1083 {
1084  Init();
1085 }
1086 
1087 
1088 CMAPanel::CMAPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1089 {
1090  Init();
1091  Create(parent, id, pos, size, style);
1092 }
1093 
1094 
1095 bool CMAPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1096 {
1097  ////@begin CMAPanel creation
1098  CParamsPanel::Create( parent, id, pos, size, style );
1099 
1100  CreateControls();
1101  if (GetSizer())
1102  {
1103  GetSizer()->SetSizeHints(this);
1104  }
1105  Centre();
1106  ////@end CMAPanel creation
1107  return true;
1108 }
1109 
1111 {
1112  m_Manager = NULL;
1113  m_ObLiWgt = NULL;
1114 }
1115 
1116 
1118 {
1119  ////@begin CMAPanel content construction
1120  CMAPanel* itemPanel1 = this;
1121 
1122  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
1123  itemPanel1->SetSizer(itemBoxSizer2);
1124 
1125  wxStaticText* v_StatusText = new wxStaticText(
1126  itemPanel1, wxID_ANY, _(
1127  "The supplied alignments do not contain common sequences. "
1128  "Please choose one or more sequences to be taken as basis(anchor); "
1129  "we filter out other alignments which do not contain these sequences. "
1130  "You can choose all the sequences, however, it may be impossible for "
1131  "to present the whole set of alignments in one view. "
1132  ), wxDefaultPosition, wxSize(-1, 50), 0
1133  );
1134  itemBoxSizer2->Add(v_StatusText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1135 
1136  m_ObLiWgt = new CObjectListWidget( itemPanel1, wxID_ANY, wxDefaultPosition, wxSize(100, 100), 0 );
1137  itemBoxSizer2->Add( m_ObLiWgt, 1, wxGROW|wxALL, 5 );
1138 
1139  /*
1140  m_OneViewPerObjectCheckBox = new wxCheckBox( itemPanel1, ID_ONEVIEWPEROBJECT, _("Open each object in a separate view"), wxDefaultPosition, wxDefaultSize, 0 );
1141  m_OneViewPerObjectCheckBox->SetValue(true);
1142  itemBoxSizer2->Add(m_OneViewPerObjectCheckBox, 0, wxALIGN_LEFT|wxLEFT|wxBOTTOM, 5);
1143  */
1144 
1145  // Set validators
1146  //m_OneViewPerObjectCheckBox->SetValidator( wxGenericValidator(& m_OneViewPerObject) );
1147  ////@end CMAPanel content construction
1148 
1149 }
1150 
1151 
1153 {
1154  m_ObLiWgt->SetObjectList( pObjList );
1155  m_ObLiWgt->SelectAll();
1156 }
1157 
1159 {
1160  if( !m_ObLiWgt->TransferDataFromWindow() ){
1161  return false;
1162  }
1163 
1165 
1166  return ( ! buf.empty());
1167 }
1168 
1170 {
1171  //CParamsPanel::ForceOneViewPerObject();
1172 }
1173 
1174 
1175 void CMAPanel::SetRegistryPath(const string& path)
1176 {
1178 }
1179 
1180 static const char* kDMGroupList = "MultiAlnAnchorList";
1181 
1182 
1184 {
1186 
1187  if( !m_RegPath.empty() ){
1189  CRegistryWriteView view = gui_reg.GetWriteView(
1190  m_RegPath + "." + kDMGroupList
1191  );
1193  }
1194 }
1195 
1196 
1198 {
1200 
1201  // Protection from older config savings
1202  m_OneViewPerObject = false;
1203 
1204  if ( !m_RegPath.empty() ) {
1206  CRegistryReadView view = gui_reg.GetReadView(
1207  m_RegPath + "." + kDMGroupList
1208  );
1209 
1211  TransferDataToWindow();
1212  }
1213 }
1214 
1216 {
1217  m_ViewManager = new CMAViewManager( *this );
1218 }
1219 
1220 
1221 
User-defined methods of the data storage class.
CRangeCollection< TSeqPos > TRangeColl
@ eCmdMarkSelected
@ eCmdShowAll
@ eCmdUnsetMaster
@ eCmdUnMarkAll
@ eCmdMoveSelectedUp
@ eCmdUnMarkSelected
@ eCmdSetSelMaster
@ eCmdShowOnlySelected
@ eCmdUnhideSelected
@ eCmdHideSelected
void Init(objects::CScope &scope, const objects::CSeq_align &align)
initial data set from which an alignment will be build
CRef< IAlnMultiDataSource > CreateDataSource()
virtual void SetListener(CDataChangeNotifier::IListener *pListener)
Subscribe a new listener for data source.
void PreCreateDataSource(bool sparse)
class CAlnMultiPane
class CAlnMultiWidget
void GetSelectedRows(vector< TNumrow > &rows)
const TRangeColl & GetSelection(void) const
virtual void SetDataSource(IAlnMultiDataSource *p_ds, objects::CScope *scope)
virtual void SaveSettings() const
virtual void LoadSettings()
virtual void SetStyleCatalog(const CRowStyleCatalog *catalog)
virtual void Select(const vector< TNumrow > &rows, bool b_select, bool b_invert_others=false)
virtual void OnDSChanged(CDataChangeNotifier::CUpdate &update)
static void RegisterCommands(CUICommandRegistry &cmd_reg, wxFileArtProvider &provider)
class CAlnMultiWidget
void SetSelection(const TRangeColl &coll)
virtual const CWidgetDisplayStyle * GetDisplayStyle() const
virtual void CreateWidget(CAlnMultiModel *model=NULL)
performs initialization, creates Model and Controls.
void SetMergeFlags(TMergeFlags flags, bool set)
Set/clear merge flags.
@ fAllowTranslocation
Allow translocations on the same row.
@ fSkipSortByScore
In greedy algos, skip sorting input alignments by score thus allowing for user-defined sort order.
CUpdate - notification send by CUIDataSource to the listener.
CEvent - generic event implementation TODO TODO - Attachments.
Definition: event.hpp:86
CGBDocument.
Definition: document.hpp:113
virtual void SetRegistryPath(const string &reg_path)
CRegistryWriteView GetWriteView(const string &section)
get a read-write view at a particular level.
Definition: registry.cpp:462
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
void SetManager(CMAViewManager *aManager)
virtual void LoadSettings()
virtual bool GetSelection(TConstScopedObjects &buf)
Return the selected item.
virtual bool Create(wxWindow *parent, wxWindowID id=SYM_CONVRESPANEL_IDNAME, const wxPoint &pos=SYM_CONVRESPANEL_POSITION, const wxSize &size=SYM_CONVRESPANEL_SIZE, long style=SYM_CONVRESPANEL_STYLE)
virtual void CreateControls()
virtual void EnforceOneViewPerObject()
Force OneViewPerObject true, and lock it.
CObjectListWidget * m_ObLiWgt
CMAViewManager * m_Manager
virtual void SetObjects(CObjectList &objs)
add your methods here
CMAPanel()
CMAPanel implementation.
virtual void SetRegistryPath(const string &path)
virtual void SaveSettings() const
CMAViewManager.
CMAPanel * m_AnchorPanel
virtual void FinalizeParams()
virtual wxPanel * GetCurrentPanel()
return the panel corresponding to the current state the function may create a new panel or return a p...
CMAViewManager(IProjectViewFactory &factory)
virtual CMAPanel * CreateAnchorPanel()
virtual void FinalizeAnchor()
virtual bool NeedAnchorPanel(TConstScopedObjects &objects)
virtual bool DoTransition(EAction action)
CMAViewManager implementation.
virtual bool CanDo(EAction action)
indicates whether a transition (action) is possible
CMultiAlignView.
void Clear(objects::CScope *scope)
void Add(ISelObjectHandle *obj_handle, CObject &obj)
void GetMatches(const CObject &object, objects::CScope &scope, TResults &results) const
CObjectListWidget - mediator widget.
void GetSelection(TConstScopedObjects &objects)
ISelection-style API.
void SetObjectList(CObjectList &list)
CObjectList Data structure representing a list of CObjects with associated Scopes and other optional ...
Definition: object_list.hpp:63
int AddRow(CObject *obj, objects::CScope *scope)
CObject –.
Definition: ncbiobj.hpp:180
SConstScopedObject & GetObject()
Definition: view_event.hpp:96
const objects::CUser_object * GetParams() const
Definition: view_event.hpp:97
virtual bool CanDo(EAction action)
indicates whether a transition (action) is possible
virtual wxPanel * GetCurrentPanel()
return the panel corresponding to the current state the function may create a new panel or return a p...
virtual bool DoTransition(EAction action)
perform transition if possible and returns true, otherwise the function shall warn the user about the...
TConstScopedObjects m_OutputObjects
The output objects after view-specific object conversion and possible object aggregation.
virtual void LoadSettings()
virtual void SaveSettings() const
virtual void SetRegistryPath(const string &path)
virtual bool Create(wxWindow *parent, wxWindowID id=ID_CPARAMSPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxNO_BORDER|wxTAB_TRAVERSAL)
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 x_UpdateContentLabel()
virtual objects::CScope * x_GetScope() const
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.
TThisType & CombineWith(const TRange &r)
Definition: range_coll.hpp:195
bool Empty() const
Definition: range_coll.hpp:138
CRef –.
Definition: ncbiobj.hpp:618
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
CRowDisplayStyle is a base class representing a display style for IAlignRow.
void SetDefaultStyle(CRowDisplayStyle *style)
assumes ownership
void SetWidgetStyle(const CWidgetDisplayStyle *style)
CScope –.
Definition: scope.hpp:92
CSelectionEvent CSelectionEvent is used for broadcasting selection between views.
Definition: obj_event.hpp:68
vector< CConstRef< objects::CSeq_id > > TIds
Definition: obj_event.hpp:75
const TIdLocs & GetIdLocs() const
Definition: obj_event.hpp:123
bool HasRangeSelection() const
Range Selection - represents a collection of selected segments.
Definition: obj_event.cpp:92
static bool sm_MatchAlnLocs
Definition: obj_event.hpp:208
void AddRangeSelection(const objects::CSeq_id &id, const TRangeColl &segs)
void GetRangeSelectionAsLocs(TConstObjects &objs) const
Definition: obj_event.cpp:145
vector< CConstRef< CIdLoc > > TIdLocs
Definition: obj_event.hpp:76
objects::CScope & GetScope()
Definition: obj_event.hpp:95
const objects::CHandleRangeMap & GetRangeSelection() const
Definition: obj_event.cpp:98
const TIds & GetIds() const
Definition: obj_event.hpp:122
bool HasObjectSelection()
Object Selection - represents select Objects (such as features, alignments, etc)
Definition: obj_event.cpp:171
bool AddObjectSelection(const CObject &obj)
Definition: obj_event.cpp:177
TDim CheckNumRows(void) const
Validatiors.
Definition: Seq_align.cpp:73
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
Definition: Seq_align.cpp:317
bool IsAlign(void) const
Definition: Seq_annot.cpp:182
CUICommandRegistry is a centralized registry where all application commands should be registered.
Definition: ui_command.hpp:146
wxMenu * CreateMenu(const SwxMenuItemRec *items)
create a menu from a static definition (see WX_*_MENU macros)
Definition: ui_command.cpp:349
CViewTypeDescriptor - holds description of a view type.
Definition: view.hpp:98
void LoadTableSettings(const CRegistryReadView &view, bool byName=false)
void SaveTableSettings(CRegistryWriteView &view, bool saveSorting=true) const
IAlnExplorer::TNumrow TNumrow
Alignment segment iterator interface.
EFlags
Iterator options.
@ eSkipGaps
Skip gap segments (show only aligned ranges)
virtual const TSignedRange & GetRange(void) const =0
Get the selected row range.
IProjectViewFactory.
virtual const CViewTypeDescriptor & GetViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
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
Definition: set.hpp:45
iterator_bool insert(const value_type &val)
Definition: set.hpp:149
void clear()
Definition: set.hpp:153
bool empty() const
Definition: set.hpp:133
const_iterator find(const key_type &key) const
Definition: set.hpp:137
const_iterator end() const
Definition: set.hpp:136
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
#define _(proto)
Definition: ct_nlmzip_i.h:78
static uch flags
@ eCmdAlnShowMethodsDlg
@ eCmdMethodProperties
void WidgetsData_RegisterCommands(CUICommandRegistry &cmd_reg, wxFileArtProvider &provider)
Register standard commands defined in this file and wxWidgets headers.
#define false
Definition: bool.h:36
static int type
Definition: getdata.c:31
char data[12]
Definition: iconv.c:80
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
Definition: ncbimisc.hpp:822
#define NULL
Definition: ncbistd.hpp:225
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
static CRef< objects::CSeq_loc > CreateSeq_loc(const objects::CSeq_id &id, const CRangeCollection< TSeqPos > &ranges)
Definition: utils.cpp:555
CObjectIndex m_ObjIndex
CAlnMultiDSBuilder m_Builder
virtual const SwxMenuItemRec * GetMenuDef() const
simpler way to provide a static menu using macros defined earlier in this file
virtual void OnProjectChanged()
void GetSelection(CSelectionEvent &evt) const
get selection for broadcasting
virtual bool x_GetSeqRangeSelection(CAlnMultiWidget::TRangeColl &seq_coll) const
virtual void x_RebuildObjectIndex()
virtual void x_GetRowSeqLoc(CAlnVec::TNumrow row, CSelectionEvent::TRangeColl &loc) const
virtual bool x_MergeObjects(TConstScopedObjects &objects)
CConstRef< objects::CSeq_annot > m_OrigAnnot
original data object passed to the view
CRef< COpenViewManager > m_ViewManager
virtual void DestroyViewWindow()
destroy Window corresponding to the view
void OnAlnWidgetSelChanged(CEvent *evt)
virtual void x_OnSetSelection(CSelectionEvent &evt)
override in derived classes in order to handle selection broadcast
IAlnExplorer::TNumrow GetNumrow() const
virtual bool IsCompatibleWith(const CObject &object, objects::CScope &scope)
virtual void CreateViewWindow(wxWindow *parent)
create Window corresponding to the view
void OnOpenGraphicalView(CEvent *evt)
virtual IView * CreateInstanceByFingerprint(const TFingerprint &fingerprint) const
if fingerprint is recognized - creates and returns a new instance
virtual void SaveSettings() const
CRowStyleCatalog m_StyleCatalog
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
virtual void OnDSChanged(CDataChangeNotifier::CUpdate &update)
virtual void LoadSettings()
virtual wxWindow * GetWindow()
returns a pointer to the wxWindow representing the client
virtual const CObject * x_GetOrigObject() const
virtual IView * CreateInstance() const
creates a view instance
virtual const CViewTypeDescriptor & GetTypeDescriptor() const
return an object providing meta information about thei view type
virtual void RegisterIconAliases(wxFileArtProvider &provider)
called by the framework to give Factory a chance to register images used by view
virtual string GetExtensionIdentifier() const
CMultiAlignViewFactory.
virtual void RegisterCommands(CUICommandRegistry &cmd_reg, wxFileArtProvider &provider)
called by the framework to give Factory a chance to register commands used by view
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 bool x_GetValidInputData(const CObject *obj)
virtual int TestInputObjects(TConstScopedObjects &objects)
tests input objects (probably using object conversion, or not) and returns a combination of ETestResu...
CIRef< IAlnMultiDataSource > m_DataSource
CConstRef< objects::CSeq_align > m_OrigAlign
virtual void SetRegistryPath(const string &reg_path)
CAlnMultiWidget * m_AlnWidget
virtual const CProjectViewTypeDescriptor & GetProjectViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
const TEventID GetID(void) const
Inline Implementation.
Definition: event.hpp:164
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.
#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
@ eCmdResetSelection
Definition: command.hpp:97
@ eCmdZoomSeq
Zoom to Selection.
Definition: command.hpp:74
@ eCmdZoomSel
Definition: command.hpp:73
CConstRef< CSeq_id > GetSeqId(void) const
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
Definition: Seq_id.hpp:1065
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
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_Canonical
Definition: sequence.hpp:114
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:1439
bool Empty(void) const THROWS_NONE
Check if CRef is empty – not pointing to any object, which means having a null value.
Definition: ncbiobj.hpp:719
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
TTo GetTo(void) const
Get the To member data.
Definition: Range_.hpp:269
TFrom GetFrom(void) const
Get the From member data.
Definition: Range_.hpp:222
void SetData(TData &value)
Assign a value to Data data member.
Definition: Seq_annot_.cpp:244
list< CRef< CSeq_align > > TAlign
Definition: Seq_annot_.hpp:194
const TAlign & GetAlign(void) const
Get the variant data.
Definition: Seq_annot_.hpp:641
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_annot_.hpp:873
char * buf
#define wxT(x)
Definition: muParser.cpp:41
USING_SCOPE(objects)
ON_EVENT(CAlnMultiPane::CEvent, CAlnMultiPane::eLinearSelChanged, &CMultiAlignView::OnAlnWidgetSelChanged) ON_EVENT(CAlnMultiPane
vector< CConstRef< CSeq_id > > TRSeqIdVector
CProjectViewTypeDescriptor s_MultiAlignViewTypeDescr("Multiple Sequence Alignment View", "multi_align_view", "Multiple Sequence Alignment View hint", "View for the multiple alignments with each column and residue colored according to its degree of mismatch", "MULTI_ALIGN_VIEW", "Alignment", false, "Seq-align", eAnyObjectsAccepted)
CMultiAlignView.
CMultiAlignViewCommands
@ eCmdUseSparseAln
static const char * kDMGroupList
const struct ncbi::grid::netcache::search::fields::SIZE size
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
#define SYM_CONVRESPANEL_POSITION
#define SYM_CONVRESPANEL_IDNAME
#define SYM_CONVRESPANEL_STYLE
CConversionResultPanel.
#define SYM_CONVRESPANEL_SIZE
static int match(register const pcre_uchar *eptr, register const pcre_uchar *ecode, const pcre_uchar *mstart, int offset_top, match_data *md, eptrblock *eptrb, unsigned int rdepth)
Definition: pcre_exec.c:513
@ eAnyObjectsAccepted
static static static wxID_ANY
#define row(bind, expected)
Definition: string_bind.c:73
Definition: type.c:6
#define _ASSERT
#define WX_DEFINE_MENU(name)
New macros for defining menus for use with CUICommandRegistry.
Definition: ui_command.hpp:266
#define WX_SUBMENU(label)
Definition: ui_command.hpp:288
#define WX_END_MENU()
Definition: ui_command.hpp:294
#define WX_MENU_SEPARATOR_L(label)
Definition: ui_command.hpp:285
#define WX_MENU_ITEM(cmd)
Definition: ui_command.hpp:270
#define WX_MENU_SEPARATOR()
Definition: ui_command.hpp:282
#define WX_END_SUBMENU()
Definition: ui_command.hpp:291
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
Modified on Wed Apr 17 13:08:56 2024 by modify_doxy.py rev. 669887