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

Go to the SVN repository for this file.

1 /* $Id: sequence_viewer_window.cpp 100477 2023-08-04 16:22:30Z lanczyck $
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: Paul Thiessen
27 *
28 * File Description:
29 * implementation of GUI part of main sequence/alignment viewer
30 *
31 * ===========================================================================
32 */
33 
34 #include <ncbi_pch.hpp>
35 #include <corelib/ncbistd.hpp>
36 
38 
39 #ifdef __WXMSW__
40 #include <windows.h>
41 #include <wx/msw/winundef.h>
42 #endif
43 #include <wx/wx.h>
44 
45 #include "taxonomy_tree.hpp"
47 #include "sequence_viewer.hpp"
48 #include "alignment_manager.hpp"
49 #include "sequence_set.hpp"
50 #include "show_hide_dialog.hpp"
51 #include "sequence_display.hpp"
52 #include "messenger.hpp"
54 #include "molecule_identifier.hpp"
55 #include "cn3d_tools.hpp"
56 #include "cn3d_blast.hpp"
57 
59 
60 
61 BEGIN_SCOPE(Cn3D)
62 
63 static double prevPSSMWeight = -1.0; // so scoring dialog remembers prev value
64 
65 BEGIN_EVENT_TABLE(SequenceViewerWindow, wxFrame)
67  EVT_CLOSE ( SequenceViewerWindow::OnCloseWindow)
68  EVT_MENU (MID_SHOW_HIDE_ROWS, SequenceViewerWindow::OnShowHideRows)
69  EVT_MENU (MID_DELETE_ROW, SequenceViewerWindow::OnDeleteRow)
70  EVT_MENU (MID_MOVE_ROW, SequenceViewerWindow::OnMoveRow)
71  EVT_MENU (MID_SHOW_UPDATES, SequenceViewerWindow::OnShowUpdates)
72  EVT_MENU_RANGE(MID_REALIGN_ROW, MID_REALIGN_HLIT_ROWS, SequenceViewerWindow::OnRealign)
73  EVT_MENU_RANGE(MID_SORT_IDENT, MID_SORT_LOOPS, SequenceViewerWindow::OnSort)
74  EVT_MENU (MID_SCORE_THREADER, SequenceViewerWindow::OnScoreThreader)
75  EVT_MENU_RANGE(MID_MARK_BLOCK, MID_CLEAR_MARKS, SequenceViewerWindow::OnMarkBlock)
76  EVT_MENU_RANGE(MID_EXPORT_FASTA, MID_EXPORT_PSSM, SequenceViewerWindow::OnExport)
77  EVT_MENU (MID_SELF_HIT, SequenceViewerWindow::OnSelfHit)
78  EVT_MENU_RANGE(MID_TAXONOMY_FULL, MID_TAXONOMY_ABBR, SequenceViewerWindow::OnTaxonomy)
79  EVT_MENU_RANGE(MID_HIGHLIGHT_BLOCKS, MID_CLEAR_HIGHLIGHTS, SequenceViewerWindow::OnHighlight)
81 
83  ViewerWindowBase(parentSequenceViewer, wxPoint(0,500), wxSize(1000,200)),
84  sequenceViewer(parentSequenceViewer), taxonomyTree(NULL)
85 {
86  SetWindowTitle();
87 
88  viewMenu->AppendSeparator();
89  viewMenu->Append(MID_SHOW_HIDE_ROWS, "Show/Hide &Rows");
90  viewMenu->Append(MID_SCORE_THREADER, "Show PSSM+Contact &Scores");
91  viewMenu->Append(MID_SELF_HIT, "Show Se&lf-Hits");
92  wxMenu *subMenu = new wxMenu;
93  subMenu->Append(MID_EXPORT_FASTA, "&FASTA");
94  subMenu->Append(MID_EXPORT_A2M, "&A2M FASTA");
95  subMenu->Append(MID_EXPORT_TEXT, "&Text");
96  subMenu->Append(MID_EXPORT_HTML, "&HTML");
97  subMenu->Append(MID_EXPORT_PSSM, "&PSSM");
98  viewMenu->Append(MID_EXPORT, "&Export...", subMenu);
99  subMenu = new wxMenu;
100  subMenu->Append(MID_TAXONOMY_FULL, "&Full");
101  subMenu->Append(MID_TAXONOMY_ABBR, "&Abbreviated");
102  viewMenu->Append(MID_TAXONOMY, "Show Ta&xonomy...", subMenu);
103  viewMenu->AppendSeparator();
104  viewMenu->Append(MID_HIGHLIGHT_BLOCKS, "Highlight &blocks");
105  viewMenu->Append(MID_EXPAND_HIGHLIGHTS, "Exp&and Highlights to Aligned Columns");
106  viewMenu->Append(MID_RESTRICT_HIGHLIGHTS, "Restr&ict Highlights to Row", "", true);
107  viewMenu->Append(MID_CLEAR_HIGHLIGHTS, "Clear &Highlights");
108 
109  editMenu->AppendSeparator();
110  subMenu = new wxMenu;
111  subMenu->Append(MID_SORT_IDENT, "By &Identifier");
112  subMenu->Append(MID_SORT_THREADER, "By &Score");
113  subMenu->Append(MID_FLOAT_PDBS, "Float &PDBs");
114  subMenu->Append(MID_FLOAT_HIGHLIGHTS, "Float Hi&ghlights");
115  subMenu->Append(MID_FLOAT_G_V, "Float Geometry &Violations");
116  subMenu->Append(MID_SORT_SELF_HIT, "By Self-&Hit");
117  subMenu->Append(MID_PROXIMITY_SORT, "Pro&ximity Sort", "", true);
118  subMenu->Append(MID_SORT_LOOPS, "By &Loop Length", "", true);
119  editMenu->Append(MID_SORT_ROWS, "Sort &Rows...", subMenu);
120  editMenu->Append(MID_DELETE_ROW, "De&lete Row", "", true);
121  editMenu->AppendSeparator();
122 
123  mouseModeMenu->Append(MID_MOVE_ROW, "&Move Row", "", true);
124 
125  updateMenu = new wxMenu;
126  updateMenu->Append(MID_SHOW_UPDATES, "&Show Imports");
127  updateMenu->AppendSeparator();
128  updateMenu->Append(MID_REALIGN_ROW, "Realign &Individual Rows", "", true);
129  updateMenu->Append(MID_REALIGN_ROWS, "Realign Rows from &List");
130  updateMenu->Append(MID_REALIGN_HLIT_ROWS, "Realign &Highlighted Rows");
131  updateMenu->AppendSeparator();
132  updateMenu->Append(MID_MARK_BLOCK, "Mark &Block", "", true);
133  updateMenu->Append(MID_CLEAR_MARKS, "&Clear Marks");
134  menuBar->Append(updateMenu, "&Imports");
135 
136  EnableDerivedEditorMenuItems(false);
137 
138  SetMenuBar(menuBar);
139 }
140 
142 {
143  if (taxonomyTree) delete taxonomyTree;
144 }
145 
146 void SequenceViewerWindow::OnCloseWindow(wxCloseEvent& event)
147 {
148  if (viewer) {
149  if (event.CanVeto()) {
150  Show(false); // just hide the window if we can
151  event.Veto();
152  return;
153  }
154  SaveDialog(true, false);
156  viewer->GUIDestroyed(); // make sure SequenceViewer knows the GUI is gone
157  GlobalMessenger()->UnPostRedrawSequenceViewer(viewer); // don't try to redraw after destroyed!
158  }
159  Destroy();
160 }
161 
163 {
164  SetTitle(wxString(GetWorkingTitle().c_str()) + " - Sequence/Alignment Viewer");
165 }
166 
168 {
169  if (menuBar->FindItem(MID_SHOW_HIDE_ROWS)) {
170  bool editable = (sequenceViewer->GetCurrentDisplay() &&
172  if (editable)
173  menuBar->Enable(MID_SHOW_HIDE_ROWS, !enabled); // can't show/hide when editor is on
174  else
175  menuBar->Enable(MID_SHOW_HIDE_ROWS, false); // can't show/hide in non-alignment display
176  menuBar->Enable(MID_DELETE_ROW, enabled);
177  menuBar->Enable(MID_SORT_ROWS, enabled);
178  menuBar->Enable(MID_MOVE_ROW, enabled);
179  menuBar->Enable(MID_REALIGN_ROW, enabled);
180  menuBar->Enable(MID_REALIGN_ROWS, enabled);
181  menuBar->Enable(MID_REALIGN_HLIT_ROWS, enabled);
182  menuBar->Enable(MID_MARK_BLOCK, enabled);
183  menuBar->Enable(MID_CLEAR_MARKS, enabled);
184  menuBar->Enable(MID_SELF_HIT, editable);
185  menuBar->Enable(MID_TAXONOMY, editable);
186  menuBar->Enable(MID_SCORE_THREADER, editable);
187  menuBar->Enable(MID_HIGHLIGHT_BLOCKS, editable);
188  menuBar->Enable(MID_EXPORT, editable);
189  menuBar->Enable(MID_EXPAND_HIGHLIGHTS, editable);
190  menuBar->Enable(MID_RESTRICT_HIGHLIGHTS, editable);
191  if (!enabled) CancelDerivedSpecialModesExcept(-1);
192  }
193 }
194 
195 void SequenceViewerWindow::OnDeleteRow(wxCommandEvent& event)
196 {
197  if (event.GetId() == MID_DELETE_ROW) {
199  if (DoDeleteRow())
200  SetCursor(*wxCROSS_CURSOR);
201  else
202  DeleteRowOff();
203  }
204 }
205 
206 void SequenceViewerWindow::OnMoveRow(wxCommandEvent& event)
207 {
208  OnMouseMode(event); // set checks via base class
210 }
211 
213 {
214  // turn on editor
215  if (enable) {
216  return QueryShowAllRows();
217  }
218 
219  // turn off editor
220  else {
221  return SaveDialog(true, true);
222  }
223 }
224 
225 bool SequenceViewerWindow::SaveDialog(bool prompt, bool canCancel)
226 {
227  static bool overrideCanCancel = false, prevPrompt, prevCanCancel;
228  if (overrideCanCancel) {
229  prompt = prevPrompt;
230  canCancel = prevCanCancel;
231  overrideCanCancel = false;
232  }
233 
234  // if editor is checked on, then this save command was initiated outside the menu;
235  // if so, then need to turn off editor pretending it was done from 'enable editor' menu item
236  if (menuBar->IsChecked(MID_ENABLE_EDIT)) {
237  overrideCanCancel = true;
238  prevPrompt = prompt;
239  prevCanCancel = canCancel;
240  ProcessCommand(MID_ENABLE_EDIT);
241  return true;
242  }
243 
244  // quick & dirty check for whether save is necessary, by whether Undo is enabled
245  if (!menuBar->IsEnabled(MID_UNDO)) {
246  viewer->KeepCurrent(); // remove any unnecessary copy from stack
247  return true;
248  }
249 
250  int option = wxID_YES;
251 
252  if (prompt) {
253  option = wxYES_NO | wxYES_DEFAULT | wxICON_EXCLAMATION | wxCENTRE;
254  if (canCancel) option |= wxCANCEL;
255 
256  wxMessageDialog dialog(NULL, "Do you want to keep the changes to this alignment?", "", option);
257  option = dialog.ShowModal();
258 
259  if (option == wxID_CANCEL) return false; // user cancelled this operation
260  }
261 
262  if (option == wxID_YES) {
263  sequenceViewer->SaveAlignment(); // save data
264  } else {
265  sequenceViewer->Revert(); // revert to original
267  }
268 
269  return true;
270 }
271 
272 void SequenceViewerWindow::OnShowHideRows(wxCommandEvent& event)
273 {
274  vector < const Sequence * > dependentSequences;
276  wxString *titleStrs = new wxString[dependentSequences.size()];
277  for (unsigned int i=0; i<dependentSequences.size(); ++i)
278  titleStrs[i] = dependentSequences[i]->identifier->ToString().c_str();
279 
280  vector < bool > visibilities;
282 
283  wxString title = "Show/Hide Dependents of ";
285  ShowHideDialog dialog(
286  titleStrs, &visibilities, sequenceViewer->alignmentManager, true,
287  this, -1, title, wxPoint(250, 50));
288  dialog.ShowModal();
289  //delete titleStrs; // apparently deleted by wxWindows
290 }
291 
293 {
294  vector < bool > visibilities;
296 
297  unsigned int i;
298  for (i=0; i<visibilities.size(); ++i) if (!visibilities[i]) break;
299  if (i == visibilities.size()) return true; // we're okay if all rows already visible
300 
301  // if some rows hidden, ask user whether to show all rows, or cancel
302  wxMessageDialog query(NULL,
303  "This operation requires all alignment rows to be visible. Do you wish to show all rows now?",
304  "Query", wxOK | wxCANCEL | wxCENTRE | wxICON_QUESTION);
305 
306  if (query.ShowModal() == wxID_CANCEL) return false; // user cancelled
307 
308  // show all rows
309  for (i=0; i<visibilities.size(); ++i) visibilities[i] = true;
311  return true;
312 }
313 
314 // process events from the realign menu
315 void SequenceViewerWindow::OnShowUpdates(wxCommandEvent& event)
316 {
318 }
319 
320 void SequenceViewerWindow::OnRealign(wxCommandEvent& event)
321 {
322  // setup one-at-a-time row realignment
323  if (event.GetId() == MID_REALIGN_ROW) {
325  if (DoRealignRow())
326  SetCursor(*wxCROSS_CURSOR);
327  else
328  RealignRowOff();
329  return;
330  }
331 
332  // bring up selection dialog for realigning multiple rows
333  if (sequenceViewer->GetCurrentAlignments().size() == 0) {
334  ERRORMSG("SequenceViewerWindow::OnRealign() - no alignment!");
335  return;
336  }
338 
339  // get dependent rows to realign (in display order)
341  sequenceViewer->GetCurrentDisplay()->GetSequences(alignment, &sequences);
342  vector < bool > selectedDependents(sequences.size() - 1, false);
343  unsigned int i;
344 
345  // selection dialog
346  if (event.GetId() == MID_REALIGN_ROWS) {
347  // get titles of current dependent display rows (*not* rows from the AlignmentSet!)
348  wxString *titleStrs = new wxString[sequences.size() - 1];
349  for (i=1; i<sequences.size(); ++i) // assuming master is first sequence
350  titleStrs[i - 1] = sequences[i]->identifier->ToString().c_str();
351 
352  wxString title = "Realign Dependents of ";
353  title.Append(alignment->GetMaster()->identifier->ToString().c_str());
354  ShowHideDialog dialog(
355  titleStrs, &selectedDependents,
356  NULL, // no "apply" button or callback
357  true, this, -1, title, wxPoint(200, 100));
358  dialog.ShowModal();
359  }
360 
361  // select rows w/ any highlights
362  else if (event.GetId() == MID_REALIGN_HLIT_ROWS) {
363  for (i=1; i<sequences.size(); ++i) // assuming master is first sequence
364  if (GlobalMessenger()->IsHighlightedAnywhere(sequences[i]->identifier))
365  selectedDependents[i - 1] = true;
366  }
367 
368  // make list of dependent rows to be realigned
369  vector < unsigned int > rowOrder, realignDependents;
370  sequenceViewer->GetCurrentDisplay()->GetRowOrder(alignment, &rowOrder);
371  for (i=0; i<selectedDependents.size(); ++i)
372  if (selectedDependents[i])
373  realignDependents.push_back(rowOrder[i + 1]);
374 
375  // do the realignment
376  if (realignDependents.size() > 0)
377  sequenceViewer->alignmentManager->RealignDependentSequences(alignment, realignDependents);
378 }
379 
380 #define MASTER_HAS_STRUCTURE \
381  (sequenceViewer->alignmentManager != NULL && \
382  sequenceViewer->alignmentManager->GetCurrentMultipleAlignment() != NULL && \
383  sequenceViewer->alignmentManager->GetCurrentMultipleAlignment()->GetSequenceOfRow(0)->molecule != NULL)
384 
385 void SequenceViewerWindow::OnSort(wxCommandEvent& event)
386 {
387  if (event.GetId() != MID_PROXIMITY_SORT && DoProximitySort())
389  if (event.GetId() != MID_SORT_LOOPS && DoSortLoops())
390  SortLoopsOff();
391 
392  switch (event.GetId()) {
393  case MID_SORT_IDENT:
395  break;
396  case MID_SORT_THREADER:
397  {
398  GetFloatingPointDialog fpDialog(NULL,
399  "Weighting of PSSM/Contact score? ([0..1], 1 = PSSM only)", "Enter PSSM Weight",
400  0.0, 1.0, 0.05, (prevPSSMWeight >= 0.0) ? prevPSSMWeight : 1.0);
401  if (fpDialog.ShowModal() == wxOK) {
402  double weightPSSM = prevPSSMWeight = fpDialog.GetValue();
403  SetCursor(*wxHOURGLASS_CURSOR);
405  SetCursor(wxNullCursor);
406  }
407  break;
408  }
411  break;
412  case MID_FLOAT_PDBS:
414  break;
415  case MID_FLOAT_G_V:
417  break;
418  case MID_SORT_SELF_HIT:
420  break;
421  case MID_PROXIMITY_SORT:
423  if (DoProximitySort())
424  SetCursor(*wxCROSS_CURSOR);
425  else
427  break;
428  case MID_SORT_LOOPS:
430  if (DoSortLoops())
431  SetCursor(*wxCROSS_CURSOR);
432  else
433  SortLoopsOff();
434  break;
435  }
436 }
437 
438 void SequenceViewerWindow::OnScoreThreader(wxCommandEvent& event)
439 {
440  GetFloatingPointDialog fpDialog(NULL,
441  "Weighting of PSSM/Contact score? ([0..1], 1 = PSSM only)", "Enter PSSM Weight",
442  0.0, 1.0, 0.05, (prevPSSMWeight >= 0.0) ? prevPSSMWeight : 1.0);
443  if (fpDialog.ShowModal() == wxOK) {
444  double weightPSSM = prevPSSMWeight = fpDialog.GetValue();
445  SetCursor(*wxHOURGLASS_CURSOR);
448  SetCursor(wxNullCursor);
449  }
450 }
451 
452 void SequenceViewerWindow::OnMarkBlock(wxCommandEvent& event)
453 {
454  switch (event.GetId()) {
455  case MID_MARK_BLOCK:
457  if (DoMarkBlock())
458  SetCursor(*wxCROSS_CURSOR);
459  else
460  MarkBlockOff();
461  break;
462  case MID_CLEAR_MARKS:
463  if (sequenceViewer->GetCurrentAlignments().size() > 0 &&
464  sequenceViewer->GetCurrentAlignments().front()->ClearMarks())
466  break;
467  }
468 }
469 
471 {
472  if (!menuBar->IsChecked(MID_ENABLE_EDIT))
474 }
475 
476 void SequenceViewerWindow::OnExport(wxCommandEvent& event)
477 {
479  if (event.GetId() == MID_EXPORT_FASTA) type = SequenceViewer::asFASTA;
480  else if (event.GetId() == MID_EXPORT_A2M) type = SequenceViewer::asFASTAa2m;
481  else if (event.GetId() == MID_EXPORT_TEXT) type = SequenceViewer::asText;
482  else if (event.GetId() == MID_EXPORT_HTML) type = SequenceViewer::asHTML;
483  else if (event.GetId() == MID_EXPORT_PSSM) type = SequenceViewer::asPSSM;
484  else {
485  ERRORMSG("SequenceViewerWindow::OnExport() - unrecognized export type");
486  return;
487  }
489 }
490 
491 void SequenceViewerWindow::OnSelfHit(wxCommandEvent& event)
492 {
493  if (sequenceViewer->GetCurrentAlignments().size() > 0) {
494  const BlockMultipleAlignment *multiple = sequenceViewer->GetCurrentAlignments().front();
496  }
497 }
498 
499 void SequenceViewerWindow::OnTaxonomy(wxCommandEvent& event)
500 {
501  if (!taxonomyTree) taxonomyTree = new TaxonomyTree();
502  if (sequenceViewer->GetCurrentAlignments().size() > 0)
504  (event.GetId() == MID_TAXONOMY_ABBR));
505 }
506 
507 void SequenceViewerWindow::OnHighlight(wxCommandEvent& event)
508 {
509  if (event.GetId() == MID_CLEAR_HIGHLIGHTS) {
511  return;
512  }
513 
514  if (sequenceViewer->GetCurrentAlignments().size() == 0) return;
515 
516  if (event.GetId() == MID_HIGHLIGHT_BLOCKS) {
518 
519  const BlockMultipleAlignment *multiple = sequenceViewer->GetCurrentAlignments().front();
521  multiple->GetUngappedAlignedBlocks(&blocks);
522  if (blocks.size() == 0) return;
523 
524  BlockMultipleAlignment::UngappedAlignedBlockList::const_iterator b, be = blocks.end();
525  const Sequence *seq;
526  const Block::Range *range;
527  for (unsigned int row=0; row<multiple->NRows(); ++row) {
528  seq = multiple->GetSequenceOfRow(row);
529  for (b = blocks.begin(); b!=be; ++b) {
530  range = (*b)->GetRangeOfRow(row);
531  GlobalMessenger()->AddHighlights(seq, range->from, range->to);
532  }
533  }
534  }
535 
536  else if (event.GetId() == MID_EXPAND_HIGHLIGHTS) {
537  if (!GlobalMessenger()->IsAnythingHighlighted())
538  return;
539  const BlockMultipleAlignment *multiple = sequenceViewer->GetCurrentAlignments().front();
541  multiple->GetUngappedAlignedBlocks(&blocks);
542  if (blocks.size() == 0)
543  return;
544 
545  // first find all alignment indexes (columns) that have highlights in any row
546  BlockMultipleAlignment::UngappedAlignedBlockList::const_iterator b, be = blocks.end();
547  unsigned int row, blockColumn, seqIndex=0;
548  typedef list < pair < int, int > > IntPairList; // pair is < start, len >
549  IntPairList alignmentIndexesWithHighlights;
550  bool inHighlightedRange;
551  for (b = blocks.begin(); b!=be; ++b) {
552  inHighlightedRange = false;
553  for (blockColumn=0; blockColumn<(*b)->width; ++blockColumn) {
554  for (row=0; row<multiple->NRows(); ++row) {
555  seqIndex = (*b)->GetRangeOfRow(row)->from + blockColumn;
556  if (GlobalMessenger()->IsHighlighted(multiple->GetSequenceOfRow(row), seqIndex))
557  break;
558  }
559  if (row < multiple->NRows()) { // found highlight in some row
560  if (inHighlightedRange) {
561  ++(alignmentIndexesWithHighlights.back().second);
562  } else {
563  alignmentIndexesWithHighlights.push_back(make_pair(
564  multiple->GetAlignmentIndex(row, seqIndex,
565  BlockMultipleAlignment::eLeft), // justification irrelevant since block is aligned
566  1));
567  inHighlightedRange = true;
568  }
569  } else
570  inHighlightedRange = false;
571  }
572  }
573 
574  // now highlight all contiguous columns
575  IntPairList::const_iterator h, he = alignmentIndexesWithHighlights.end();
576  for (h=alignmentIndexesWithHighlights.begin(); h!=he; ++h) {
577  TRACEMSG("highlighting from alignment index " << h->first << " to " << (h->first + h->second - 1));
578  for (row=0; row<multiple->NRows(); ++row) {
579  multiple->SelectedRange(row, h->first, h->first + h->second - 1,
580  BlockMultipleAlignment::eLeft, false); // justification irrelevant since block is aligned
581  }
582  }
583  }
584 
585  else if (event.GetId() == MID_RESTRICT_HIGHLIGHTS) {
586  if (!GlobalMessenger()->IsAnythingHighlighted())
587  return;
589  if (DoRestrictHighlights())
590  SetCursor(*wxCROSS_CURSOR);
591  else
593  }
594 }
595 
596 END_SCOPE(Cn3D)
#define static
void RealignDependentSequences(BlockMultipleAlignment *multiple, const std::vector< unsigned int > &dependentsToRealign)
void ShowHideCallbackFunction(const std::vector< bool > &itemsEnabled)
void ShowUpdateWindow(void) const
void GetAlignmentSetDependentVisibilities(std::vector< bool > *visibilities) const
const BlockMultipleAlignment * GetCurrentMultipleAlignment(void) const
void GetAlignmentSetDependentSequences(std::vector< const Sequence * > *sequences) const
void CalculateSelfHitScores(const BlockMultipleAlignment *multiple)
Definition: cn3d_blast.cpp:504
const Sequence * GetMaster(void) const
std::vector< const UngappedAlignedBlock * > UngappedAlignedBlockList
const Sequence * GetSequenceOfRow(unsigned int row) const
void GetUngappedAlignedBlocks(UngappedAlignedBlockList *blocks) const
unsigned int GetAlignmentIndex(unsigned int row, unsigned int seqIndex, eUnalignedJustification justification)
void SelectedRange(unsigned int row, unsigned int alnIndexFrom, unsigned int alnIndexTo, eUnalignedJustification justification, bool toggle) const
double GetValue(void)
Definition: wx_tools.cpp:340
void PostRedrawSequenceViewer(ViewerBase *viewer)
Definition: messenger.cpp:95
bool RemoveAllHighlights(bool postRedraws)
Definition: messenger.cpp:393
void UnPostRedrawSequenceViewer(ViewerBase *viewer)
Definition: messenger.cpp:106
void AddHighlights(const Sequence *sequence, unsigned int seqIndexFrom, unsigned int seqIndexTo)
Definition: messenger.cpp:248
std::string ToString(void) const
bool CalculateRowScoresWithThreader(double weightPSSM)
void FloatPDBRowsToTop(void)
void SortRowsByThreadingScore(double weightPSSM)
void SortRowsBySelfHit(void)
void FloatHighlightsToTop(void)
void GetSequences(const BlockMultipleAlignment *forAlignment, SequenceList *seqs) const
bool IsEditable(void) const
void GetRowOrder(const BlockMultipleAlignment *forAlignment, std::vector< unsigned int > *dependentRowOrder) const
void SortRowsByIdentifier(void)
std::vector< const Sequence * > SequenceList
void SetMouseMode(eMouseMode mode)
void OnShowHideRows(wxCommandEvent &event)
void OnMoveRow(wxCommandEvent &event)
void OnSort(wxCommandEvent &event)
bool SaveDialog(bool prompt, bool canCancel)
void EnableDerivedEditorMenuItems(bool enabled)
void OnExport(wxCommandEvent &event)
void OnSelfHit(wxCommandEvent &event)
void OnDeleteRow(wxCommandEvent &event)
void OnCloseWindow(wxCloseEvent &event)
void OnHighlight(wxCommandEvent &event)
void OnMarkBlock(wxCommandEvent &event)
void OnScoreThreader(wxCommandEvent &event)
void OnTaxonomy(wxCommandEvent &event)
bool DoRestrictHighlights(void) const
void OnShowUpdates(wxCommandEvent &event)
bool RequestEditorEnable(bool enable)
void OnRealign(wxCommandEvent &event)
void CancelDerivedSpecialModesExcept(int id)
void SaveAlignment(void)
void ExportAlignment(eExportType type)
const MoleculeIdentifier * identifier
void ShowTreeForAlignment(wxFrame *parent, const BlockMultipleAlignment *alignment, bool abbreviated)
AlignmentManager * alignmentManager
Definition: viewer_base.hpp:96
void RemoveBlockBoundaryRows(void)
void KeepCurrent(void)
SequenceDisplay * GetCurrentDisplay(void)
void Revert(void)
void GUIDestroyed(void)
Definition: viewer_base.hpp:67
const AlignmentList & GetCurrentAlignments(void) const
SequenceViewerWidget * viewerWidget
void CancelAllSpecialModesExcept(int id)
void OnMouseMode(wxCommandEvent &event)
void UpdateDisplay(SequenceDisplay *display)
#define TRACEMSG(stream)
Definition: cn3d_tools.hpp:83
const std::string & GetWorkingTitle(void)
#define ERRORMSG(stream)
Definition: cn3d_tools.hpp:86
#define option
Include a standard set of the NCBI C++ Toolkit most basic headers.
tree< TaxNode > TaxonomyTree
Definition: cuTaxTree.hpp:75
static int type
Definition: getdata.c:31
#define NULL
Definition: ncbistd.hpp:225
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
END_EVENT_TABLE()
int i
Messenger * GlobalMessenger(void)
Definition: messenger.cpp:73
range(_Ty, _Ty) -> range< _Ty >
EVT_MENU_RANGE(MID_SHOW_TITLES, MID_HIDE_TITLES, ViewerWindowBase::OnTitleView) EVT_MENU_RANGE(MID_ENABLE_EDIT
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
static double prevPSSMWeight
static DP_BlockInfo * blocks
static string query
Definition: type.c:6
static void SetTitle(CRef< CSeq_entry > entry, string title)
#define INCLUDE_VIEWER_WINDOW_BASE_EVENTS
Modified on Sun Feb 25 03:03:03 2024 by modify_doxy.py rev. 669887