updateViewer(thisUpdateViewer)
84editMenu->AppendSeparator();
85wxMenu *subMenu =
newwxMenu;
86subMenu->Append(MID_SORT_UPDATES_IDENTIFIER,
"By &Identifier");
87subMenu->Append(MID_SORT_UPDATES_PSSM,
"By &PSSM Score");
88editMenu->Append(MID_SORT_UPDATES,
"So&rt Imports...", subMenu);
89editMenu->AppendSeparator();
90editMenu->Append(MID_IMPORT_SEQUENCES,
"&Import Sequences");
91editMenu->Append(MID_IMPORT_STRUCTURE,
"Import S&tructure");
93editMenu->Insert(8, MID_DELETE_ALL_BLOCKS,
"Delete A&ll Blocks",
"",
true);
94editMenu->Insert(9, MID_DELETE_BLOCKS_ALL_ROWS,
"Delete All Blocks in All Ali&gnments");
97menuBar->Enable(MID_SELECT_COLS,
false);
98menuBar->Enable(MID_SELECT_BLOCKS,
false);
101wxMenu *menu =
newwxMenu;
102menu->Append(MID_BLOCKALIGN_ONE,
"B&lock Align Single",
"",
true);
103menu->Append(MID_BLOCKALIGN_ALL,
"Bloc&k Align N");
104menu->AppendSeparator();
105menu->Append(MID_BLAST_ONE,
"&BLAST Single",
"",
true);
106menu->Append(MID_BLAST_PSSM_ONE,
"BLAST/&PSSM Single",
"",
true);
107menu->Append(MID_BLAST_NEIGHBOR,
"BLAST &Neighbor",
"",
true);
108menu->AppendSeparator();
109menu->Append(MID_THREAD_ONE,
"Thread &Single",
"",
true);
110menu->Append(MID_THREAD_ALL,
"Thread &All");
111menu->AppendSeparator();
112menu->Append(MID_EXTEND_ONE,
"&Extend Single",
"",
true);
113menu->Append(MID_EXTEND_ALL,
"E&xtend All");
114menu->AppendSeparator();
115menu->Append(MID_SET_REGION,
"Set &Region",
"",
true);
116menu->Append(MID_RESET_REGIONS,
"Reset All Re&gions");
117menuBar->Append(menu,
"Al&gorithms");
121menu->Append(MID_MERGE_ONE,
"&Merge Single",
"",
true);
122menu->Append(MID_MERGE_NEIGHBOR,
"Merge to &Neighbor",
"",
true);
123menu->Append(MID_MERGE_ALL,
"Merge &All");
124menu->AppendSeparator();
125menu->Append(MID_DELETE_ONE,
"&Delete Single",
"",
true);
126menu->Append(MID_DELETE_ALL,
"Delete A&ll");
127menuBar->Append(menu,
"&Alignments");
130EnableBaseEditorMenuItems(
true);
131menuBar->Check(MID_ENABLE_EDIT,
true);
132menuBar->Enable(MID_ENABLE_EDIT,
false);
136menuBar->Check(MID_DRAG_HORIZ,
true);
137menuBar->Check(MID_SELECT_RECT,
false);
149 if(event.CanVeto()) {
172 switch(event.GetId()) {
176SetCursor(*wxCROSS_CURSOR);
182 ERRORMSG(
"Can't run threader without existing core alignment");
192 if(optDialog.ShowModal() == wxCANCEL)
return;
195 ERRORMSG(
"Error retrieving options values from dialog");
200SetCursor(*wxHOURGLASS_CURSOR);
202SetCursor(wxNullCursor);
210 switch(event.GetId()) {
214SetCursor(*wxCROSS_CURSOR);
221SetCursor(*wxCROSS_CURSOR);
229 if(currentUpdates.size() > 0) {
230ViewerBase::AlignmentList::const_iterator u, ue = currentUpdates.end();
231 for(u=currentUpdates.begin(); u!=ue; ++u)
all[*u] =
true;
241 switch(event.GetId()) {
245SetCursor(*wxCROSS_CURSOR);
251 if(currentUpdates.size() > 0) {
253ViewerBase::AlignmentList::const_iterator u, ue = currentUpdates.end();
254 for(u=currentUpdates.begin(); u!=ue; ++u) {
257newAlignments.push_back(newAlignment);
266SetCursor(*wxCROSS_CURSOR);
286 option= wxYES_NO | wxYES_DEFAULT | wxICON_EXCLAMATION | wxCENTRE;
287 if(canCancel)
option|= wxCANCEL;
289wxMessageDialog dialog(
NULL,
"Do you want to keep the changes to these updates?",
"",
option);
290 option= dialog.ShowModal();
292 if(
option== wxID_CANCEL)
return false;
313 switch(event.GetId()) {
317SetCursor(*wxCROSS_CURSOR);
324SetCursor(*wxCROSS_CURSOR);
331SetCursor(*wxCROSS_CURSOR);
351SetCursor(*wxCROSS_CURSOR);
359(*a)->alignDependentFrom = -1;
360(*a)->alignDependentTo = -1;
370SetCursor(*wxCROSS_CURSOR);
385SetCursor(*wxCROSS_CURSOR);
406wxDialog(parent, -1, "Set
ThreaderOptions", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
409wxPanel *panel =
newwxPanel(
this, -1);
410wxBoxSizer *item0 =
newwxBoxSizer(wxVERTICAL);
411wxBoxSizer *item1 =
newwxBoxSizer(wxVERTICAL);
412wxStaticBox *item3 =
newwxStaticBox(panel, -1,
"Threader Options");
413wxStaticBoxSizer *item2 =
newwxStaticBoxSizer(item3, wxHORIZONTAL);
414wxFlexGridSizer *
grid=
newwxFlexGridSizer(2, 5, 0);
417wxStaticText *item5 =
newwxStaticText(panel, -1,
"Weighting of PSSM/Contact score? [0 .. 1], 1 = PSSM only", wxDefaultPosition, wxDefaultSize, 0);
418 grid->Add(item5, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
4200.0, 1.0, 0.05, initialOptions.weightPSSM,
421wxDefaultPosition, wxSize(80, SPIN_CTRL_HEIGHT), 0,
422wxDefaultPosition, wxSize(-1, SPIN_CTRL_HEIGHT));
423 grid->Add(fpWeight->GetTextCtrl(), 0, wxALIGN_CENTRE|wxLEFT|wxTOP|wxBOTTOM, 5);
427wxStaticText *item8 =
newwxStaticText(panel, -1,
"Loop length multiplier? [0.1 .. 10]", wxDefaultPosition, wxDefaultSize, 0);
428 grid->Add(item8, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
4300.1, 10.0, 0.25, initialOptions.loopLengthMultiplier,
431wxDefaultPosition, wxSize(80, SPIN_CTRL_HEIGHT), 0,
432wxDefaultPosition, wxSize(-1, SPIN_CTRL_HEIGHT));
433 grid->Add(fpLoops->GetTextCtrl(), 0, wxALIGN_CENTRE|wxLEFT|wxTOP|wxBOTTOM, 5);
437wxStaticText *item11 =
newwxStaticText(panel, -1,
"Number of random starts? [1 .. 1000]", wxDefaultPosition, wxDefaultSize, 0);
438 grid->Add(item11, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
4401, 1000, 5, initialOptions.nRandomStarts,
441wxDefaultPosition, wxSize(80, SPIN_CTRL_HEIGHT), 0,
442wxDefaultPosition, wxSize(-1, SPIN_CTRL_HEIGHT));
443 grid->Add(iStarts->GetTextCtrl(), 0, wxALIGN_CENTRE|wxLEFT|wxTOP|wxBOTTOM, 5);
447wxStaticText *item14 =
newwxStaticText(panel, -1,
"Number of result alignments per row? [1 .. 20]", wxDefaultPosition, wxDefaultSize, 0);
448 grid->Add(item14, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
4501, 20, 1, initialOptions.nResultAlignments,
451wxDefaultPosition, wxSize(80, SPIN_CTRL_HEIGHT), 0,
452wxDefaultPosition, wxSize(-1, SPIN_CTRL_HEIGHT));
453 grid->Add(iResults->GetTextCtrl(), 0, wxALIGN_CENTRE|wxLEFT|wxTOP|wxBOTTOM, 5);
457wxStaticText *item16 =
newwxStaticText(panel, -1,
"Terminal residue cutoff? [-1..N], -1 = unrestricted", wxDefaultPosition, wxDefaultSize, 0);
458 grid->Add(item16, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
460-1, 100000, 1, initialOptions.terminalResidueCutoff,
461wxDefaultPosition, wxSize(80, SPIN_CTRL_HEIGHT), 0,
462wxDefaultPosition, wxSize(-1, SPIN_CTRL_HEIGHT));
463 grid->Add(iCutoff->GetTextCtrl(), 0, wxALIGN_CENTRE|wxLEFT|wxTOP|wxBOTTOM, 5);
467wxStaticText *item17 =
newwxStaticText(panel, -1,
"Merge results after each row is threaded?", wxDefaultPosition, wxDefaultSize, 0);
468 grid->Add(item17, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
469bMerge =
newwxCheckBox(panel, -1,
"", wxDefaultPosition, wxDefaultSize, 0);
470bMerge->SetValue(initialOptions.mergeAfterEachSequence);
471 grid->Add(bMerge, 0, wxALIGN_CENTRE|wxALL, 5);
472 grid->Add(20, SPIN_CTRL_HEIGHT, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5);
475wxStaticText *item19 =
newwxStaticText(panel, -1,
"Freeze isolated blocks?", wxDefaultPosition, wxDefaultSize, 0);
476 grid->Add(item19, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
477bFreeze =
newwxCheckBox(panel, -1,
"", wxDefaultPosition, wxDefaultSize, 0);
478bFreeze->SetValue(initialOptions.freezeIsolatedBlocks);
479 grid->Add(bFreeze, 0, wxALIGN_CENTRE|wxALL, 5);
480 grid->Add(20, SPIN_CTRL_HEIGHT, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5);
482item2->Add(
grid, 0, wxALIGN_CENTRE|wxALL, 5);
483item1->Add(item2, 0, wxALIGN_CENTRE|wxALL, 5);
484wxBoxSizer *item21 =
newwxBoxSizer(wxHORIZONTAL);
486bOK =
newwxButton(panel, -1,
"OK", wxDefaultPosition, wxDefaultSize, 0);
488item21->Add(bOK, 0, wxALIGN_CENTRE|wxALL, 5);
490bCancel =
newwxButton(panel, -1,
"Cancel", wxDefaultPosition, wxDefaultSize, 0);
491item21->Add(bCancel, 0, wxALIGN_CENTRE|wxALL, 5);
493item1->Add(item21, 0, wxALIGN_CENTRE|wxALL, 5);
494item0->Add(item1, 0, wxALIGN_CENTRE|wxALL, 5);
495panel->SetAutoLayout(
true);
496panel->SetSizer(item0);
499item0->SetSizeHints(
this);
531 if(event.GetEventObject() ==
bOK) {
537}
else if(event.GetEventObject() ==
bCancel) {
547 #define ID_TEXT 10000 548 #define ID_T_TITLE 10001 549 #define ID_TEXTCTRL 10002 550 #define ID_SPINBUTTON 10003 551 #define ID_B_OK 10004 552 #define ID_B_CANCEL 10005 561wxDialog(parentFrame, -1, "Set Alignment Region", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
563wxPanel *parent =
newwxPanel(
this, -1);
564wxBoxSizer *item0 =
newwxBoxSizer( wxVERTICAL );
566wxStaticBox *item2 =
newwxStaticBox( parent, -1,
"Region");
567wxStaticBoxSizer *item1 =
newwxStaticBoxSizer( item2, wxVERTICAL );
569wxFlexGridSizer *item3 =
newwxFlexGridSizer( 1, 0, 0, 0 );
570item3->AddGrowableCol( 1 );
572wxStaticText *item4 =
newwxStaticText( parent,
ID_TEXT,
"Sequence:", wxDefaultPosition, wxDefaultSize, 0 );
573item3->Add( item4, 0, wxALIGN_CENTRE|wxALL, 5 );
576title.Printf(
"%s, length %i", sequence->identifier->ToString().c_str(), sequence->Length());
577wxStaticText *item5 =
newwxStaticText( parent,
ID_T_TITLE, title, wxDefaultPosition, wxDefaultSize, 0 );
578item3->Add( item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
580item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
582wxFlexGridSizer *item6 =
newwxFlexGridSizer( 1, 0, 0, 0 );
583item6->AddGrowableCol( 1 );
584item6->AddGrowableRow( 4 );
586wxStaticText *item7 =
newwxStaticText( parent,
ID_TEXT,
"From:", wxDefaultPosition, wxDefaultSize, 0 );
587item6->Add( item7, 0, wxALIGN_CENTRE|wxALL, 5 );
589iFrom =
new IntegerSpinCtrl(parent, 0, sequence->Length(), 1, initialFrom,
590wxDefaultPosition, wxSize(80, SPIN_CTRL_HEIGHT), 0,
591wxDefaultPosition, wxSize(-1, SPIN_CTRL_HEIGHT));
592item6->Add( iFrom->GetTextCtrl(), 0, wxALIGN_CENTRE|wxLEFT|wxTOP|wxBOTTOM, 5 );
595wxStaticText *item10 =
newwxStaticText( parent,
ID_TEXT,
"To:", wxDefaultPosition, wxDefaultSize, 0 );
596item6->Add( item10, 0, wxALIGN_CENTRE|wxALL, 5 );
598iTo =
new IntegerSpinCtrl(parent, 0, sequence->Length(), 1, initialTo,
599wxDefaultPosition, wxSize(80, SPIN_CTRL_HEIGHT), 0,
600wxDefaultPosition, wxSize(-1, SPIN_CTRL_HEIGHT));
601item6->Add( iTo->GetTextCtrl(), 0, wxALIGN_CENTRE|wxLEFT|wxTOP|wxBOTTOM, 5 );
604item1->Add( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
606item0->Add( item1, 0, wxALIGN_CENTRE|wxALL, 5 );
608wxBoxSizer *item13 =
newwxBoxSizer( wxHORIZONTAL );
610wxButton *item14 =
newwxButton( parent,
ID_B_OK,
"OK", wxDefaultPosition, wxDefaultSize, 0 );
611item14->SetDefault();
612item13->Add( item14, 0, wxALIGN_CENTRE|wxALL, 5 );
614wxButton *item15 =
newwxButton( parent,
ID_B_CANCEL,
"Cancel", wxDefaultPosition, wxDefaultSize, 0 );
615item13->Add( item15, 0, wxALIGN_CENTRE|wxALL, 5 );
617item0->Add( item13, 0, wxALIGN_CENTRE|wxALL, 5 );
619parent->SetAutoLayout(
TRUE);
620parent->SetSizer( item0 );
622item0->Fit( parent );
623item0->SetSizeHints(
this);
639 if(event.GetId() ==
ID_B_OK) {
654 return(
iFrom->GetInteger(from) &&
iTo->GetInteger(to));
void ExtendAllUpdates(void)
void BlockAlignAllUpdates(void)
std::map< BlockMultipleAlignment *, bool > UpdateMap
const BlockMultipleAlignment * GetCurrentMultipleAlignment(void) const
void MergeUpdates(const UpdateMap &updates, bool mergeToNeighbor)
void ThreadAllUpdates(const ThreaderOptions &options)
BlockMultipleAlignment * Clone(void) const
bool DeleteAllBlocks(void)
void UnPostRedrawSequenceViewer(ViewerBase *viewer)
void OnButton(wxCommandEvent &event)
bool GetValues(int *from, int *to)
ncbi::IntegerSpinCtrl * iFrom
ncbi::IntegerSpinCtrl * iTo
void OnCloseWindow(wxCloseEvent &event)
bool GetValues(ThreaderOptions *options)
void OnCloseWindow(wxCloseEvent &event)
ncbi::IntegerSpinCtrl * iStarts
~ThreaderOptionsDialog(void)
ncbi::FloatingPointSpinCtrl * fpWeight
void OnButton(wxCommandEvent &event)
ncbi::FloatingPointSpinCtrl * fpLoops
ncbi::IntegerSpinCtrl * iResults
ncbi::IntegerSpinCtrl * iCutoff
bool mergeAfterEachSequence
int terminalResidueCutoff
bool freezeIsolatedBlocks
double loopLengthMultiplier
static unsigned int EstimateNRandomStarts(const BlockMultipleAlignment *coreAlignment, const BlockMultipleAlignment *toBeThreaded)
void OnImport(wxCommandEvent &event)
void OnRunThreader(wxCommandEvent &event)
void EnableDerivedEditorMenuItems(bool enabled)
bool DoThreadSingle(void) const
bool DoBlastSingle(void) const
void OnDelete(wxCommandEvent &event)
void OnExtend(wxCommandEvent &event)
bool DoBlastPSSMSingle(void) const
void OnBlockAlign(wxCommandEvent &event)
void BlastPSSMSingleOff(void)
bool SaveDialog(bool prompt, bool canCancel)
void MergeSingleOff(void)
bool DoMergeSingle(void) const
bool DoDeleteSingle(void) const
void OnSortUpdates(wxCommandEvent &event)
void BlockAlignSingleOff(void)
void DeleteAllBlocksOff(void)
void OnCloseWindow(wxCloseEvent &event)
bool DoExtendSingle(void) const
void BlastSingleOff(void)
bool DoBlockAlignSingle(void) const
UpdateViewer * updateViewer
void OnMerge(wxCommandEvent &event)
void OnRunBlast(wxCommandEvent &event)
bool DoSetRegion(void) const
bool DoBlastNeighborSingle(void) const
bool DoDeleteAllBlocks(void) const
bool DoMergeNeighbor(void) const
~UpdateViewerWindow(void)
void BlastNeighborSingleOff(void)
void ThreadSingleOff(void)
@ MID_DELETE_BLOCKS_ALL_ROWS
@ MID_SORT_UPDATES_IDENTIFIER
void MergeNeighborOff(void)
void ExtendSingleOff(void)
void SetWindowTitle(void)
void DeleteSingleOff(void)
void OnSetRegion(wxCommandEvent &event)
void ReplaceAlignments(const AlignmentList &alignmentList)
void ImportStructure(void)
void SaveAlignments(void)
std::list< BlockMultipleAlignment * > AlignmentList
void ImportSequences(void)
void SortByIdentifier(void)
std::list< BlockMultipleAlignment * > AlignmentList
AlignmentManager * alignmentManager
const AlignmentList & GetCurrentAlignments(void) const
void CancelAllSpecialModesExcept(int id)
void RaiseLogWindow(void)
ThreaderOptions globalThreaderOptions
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
Messenger * GlobalMessenger(void)
constexpr bool empty(list< Ts... >) noexcept
#define TRUE
bool replacment for C indicating true.
static void SetTitle(CRef< CSeq_entry > entry, string title)
EVT_MENU_RANGE(MID_SHOW_TITLES, MID_HIDE_TITLES, ViewerWindowBase::OnTitleView) EVT_MENU_RANGE(MID_ENABLE_EDIT
#define INCLUDE_VIEWER_WINDOW_BASE_EVENTS
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4