50 #include <wx/button.h>
52 #include <wx/statbox.h>
53 #include <wx/stattext.h>
54 #include <wx/checkbox.h>
55 #include <wx/combobox.h>
56 #include <wx/choice.h>
57 #include <wx/msgdlg.h>
105 wxPanel::Create( parent,
id, pos,
size, style );
112 GetSizer()->SetSizeHints(
this);
156 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
157 itemCAlgoToolManagerParamsPanel1->SetSizer(itemBoxSizer2);
159 wxStaticText* itemStaticText3 =
new wxStaticText( itemCAlgoToolManagerParamsPanel1, wxID_STATIC,
_(
"Selected options:"), wxDefaultPosition, wxDefaultSize, 0 );
160 itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_LEFT|wxALL, 5);
162 wxBoxSizer* itemBoxSizer4 =
new wxBoxSizer(wxHORIZONTAL);
163 itemBoxSizer2->Add(itemBoxSizer4, 0, wxGROW|wxALL, 5);
165 wxStaticBox* itemStaticBoxSizer5Static =
new wxStaticBox(itemCAlgoToolManagerParamsPanel1,
wxID_ANY,
_(
"General Parameters"));
166 wxStaticBoxSizer* itemStaticBoxSizer5 =
new wxStaticBoxSizer(itemStaticBoxSizer5Static, wxVERTICAL);
167 itemBoxSizer4->Add(itemStaticBoxSizer5, 1, wxGROW|wxALL, 5);
172 wxStaticText* itemStaticText7 =
new wxStaticText( itemCAlgoToolManagerParamsPanel1, wxID_STATIC,
_(
"Word size:"), wxDefaultPosition, wxDefaultSize, 0 );
173 m_GeneralSizer->Add(itemStaticText7, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
175 wxTextCtrl* itemTextCtrl8 =
new wxTextCtrl( itemCAlgoToolManagerParamsPanel1,
ID_WORDSIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
176 m_GeneralSizer->Add(itemTextCtrl8, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxALL, 5);
178 wxStaticText* itemStaticText9 =
new wxStaticText( itemCAlgoToolManagerParamsPanel1, wxID_STATIC,
_(
"e-value:"), wxDefaultPosition, wxDefaultSize, 0 );
179 m_GeneralSizer->Add(itemStaticText9, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
181 wxTextCtrl* itemTextCtrl10 =
new wxTextCtrl( itemCAlgoToolManagerParamsPanel1,
ID_E_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
182 m_GeneralSizer->Add(itemTextCtrl10, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxALL, 5);
184 m_ThreshLabel =
new wxStaticText( itemCAlgoToolManagerParamsPanel1, wxID_STATIC,
_(
"Threshold:"), wxDefaultPosition, wxDefaultSize, 0 );
187 m_ThreshInput =
new wxTextCtrl( itemCAlgoToolManagerParamsPanel1,
ID_THRESHOLD, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
190 m_QueryGenCodeLabel =
new wxStaticText( itemCAlgoToolManagerParamsPanel1,
wxID_ANY,
_(
"Query genetic code:"), wxDefaultPosition, wxDefaultSize, 0 );
193 wxArrayString m_QueryGenCodeComboStrings;
194 m_QueryGenCodeCombo =
new wxComboBox( itemCAlgoToolManagerParamsPanel1,
ID_GEN_CODE, wxEmptyString, wxDefaultPosition, wxSize(itemCAlgoToolManagerParamsPanel1->ConvertDialogToPixels(wxSize(100, -1)).x, -1), m_QueryGenCodeComboStrings, wxCB_READONLY );
197 m_DbGenCodeLabel =
new wxStaticText( itemCAlgoToolManagerParamsPanel1,
wxID_ANY,
_(
"DB genetic code:"), wxDefaultPosition, wxDefaultSize, 0 );
200 wxArrayString m_DbGenCodeComboStrings;
201 m_DbGenCodeCombo =
new wxComboBox( itemCAlgoToolManagerParamsPanel1,
ID_COMBOBOX, wxEmptyString, wxDefaultPosition, wxSize(itemCAlgoToolManagerParamsPanel1->ConvertDialogToPixels(wxSize(100, -1)).x, -1), m_DbGenCodeComboStrings, wxCB_READONLY );
206 wxBoxSizer* itemBoxSizer17 =
new wxBoxSizer(wxVERTICAL);
207 itemBoxSizer4->Add(itemBoxSizer17, 1, wxALIGN_TOP, 5);
209 wxStaticBox* itemStaticBoxSizer18Static =
new wxStaticBox(itemCAlgoToolManagerParamsPanel1,
wxID_ANY,
_(
"Filtering Parameters"));
210 wxStaticBoxSizer* itemStaticBoxSizer18 =
new wxStaticBoxSizer(itemStaticBoxSizer18Static, wxVERTICAL);
211 itemBoxSizer17->Add(itemStaticBoxSizer18, 0, wxGROW|wxALL, 5);
213 wxBoxSizer* itemBoxSizer19 =
new wxBoxSizer(wxVERTICAL);
214 itemStaticBoxSizer18->Add(itemBoxSizer19, 1, wxGROW, 5);
216 wxCheckBox* itemCheckBox20 =
new wxCheckBox( itemCAlgoToolManagerParamsPanel1,
ID_LOW_COMPLEXITY,
_(
"Filter low complexity regions"), wxDefaultPosition, wxDefaultSize, 0 );
217 itemCheckBox20->SetValue(
false);
218 itemBoxSizer19->Add(itemCheckBox20, 0, wxALIGN_LEFT|wxALL, 5);
220 wxStaticText* itemStaticText21 =
new wxStaticText( itemCAlgoToolManagerParamsPanel1,
ID_STATIC_REPEAT_TYPE,
_(
"Species specific repeats for:"), wxDefaultPosition, wxDefaultSize, 0 );
221 itemBoxSizer19->Add(itemStaticText21, 0, wxALIGN_LEFT|wxALL, 5);
223 wxArrayString m_RepeatTypeStrings;
224 m_RepeatType =
new wxChoice( itemCAlgoToolManagerParamsPanel1,
ID_REPEAT_TYPE, wxDefaultPosition, wxDefaultSize, m_RepeatTypeStrings, 0 );
225 itemBoxSizer19->Add(
m_RepeatType, 0, wxALIGN_LEFT|wxALL, 5);
235 wxBoxSizer* itemBoxSizer25 =
new wxBoxSizer(wxVERTICAL);
236 itemBoxSizer2->Add(itemBoxSizer25, 0, wxGROW|wxALL, 5);
238 wxStaticText* itemStaticText26 =
new wxStaticText( itemCAlgoToolManagerParamsPanel1, wxID_STATIC,
_(
"BLAST algorithm requires at most one filtering database. It may be either "), wxDefaultPosition, wxDefaultSize, 0 );
239 itemStaticText26->Wrap(500);
240 itemBoxSizer25->Add(itemStaticText26, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT, 5);
242 wxStaticText* itemStaticText27 =
new wxStaticText( itemCAlgoToolManagerParamsPanel1, wxID_STATIC,
_(
"Species Specific Repeats database above or Windowmasker Filtering below."), wxDefaultPosition, wxDefaultSize, 0 );
243 itemBoxSizer25->Add(itemStaticText27, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT, 5);
245 wxStaticBox* itemStaticBoxSizer28Static =
new wxStaticBox(itemCAlgoToolManagerParamsPanel1,
wxID_ANY,
_(
"Windowmasker filtering"));
249 m_WMStatic =
new wxStaticText( itemCAlgoToolManagerParamsPanel1, wxID_STATIC,
_(
"Windowmasker tax ID:"), wxDefaultPosition, wxDefaultSize, 0 );
252 wxArrayString m_WMTaxIdsStrings;
253 m_WMTaxIds =
new wxChoice( itemCAlgoToolManagerParamsPanel1,
ID_WMTI_CHOICE, wxDefaultPosition, wxDefaultSize, m_WMTaxIdsStrings, 0 );
258 m_WMDownload =
new wxButton( itemCAlgoToolManagerParamsPanel1,
ID_BUTTON,
_(
"Configure..."), wxDefaultPosition, wxDefaultSize, 0 );
261 wxStaticBox* itemStaticBoxSizer33Static =
new wxStaticBox(itemCAlgoToolManagerParamsPanel1,
wxID_ANY,
_(
"Advanced Parameters"));
262 wxStaticBoxSizer* itemStaticBoxSizer33 =
new wxStaticBoxSizer(itemStaticBoxSizer33Static, wxHORIZONTAL);
263 itemBoxSizer2->Add(itemStaticBoxSizer33, 0, wxGROW|wxALL, 5);
265 wxTextCtrl* itemTextCtrl34 =
new wxTextCtrl( itemCAlgoToolManagerParamsPanel1,
ID_ADV_TEXT, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
266 itemStaticBoxSizer33->Add(itemTextCtrl34, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
268 m_CompartCheck =
new wxCheckBox( itemCAlgoToolManagerParamsPanel1,
ID_COMPARTMENTS,
_(
"Link related hits together"), wxDefaultPosition, wxDefaultSize, 0 );
271 m_CompartCheck->SetToolTip(
_(
"BLAST returns separate alignments for each query, and these separate alignments \ncan further be ordered into sets offering consistent non-overlapping query and subject \ncoverage. The sequence viewer offers the ability to evaluate the original BLAST hits \non-the-fly and link together alignments that meet a strict definition of non-overlapping \nquery and subject coverage.\n"));
272 itemBoxSizer2->Add(
m_CompartCheck, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxBOTTOM, 15);
274 wxBoxSizer* itemBoxSizer36 =
new wxBoxSizer(wxHORIZONTAL);
275 itemBoxSizer2->Add(itemBoxSizer36, 0, wxGROW|wxALL, 5);
277 wxStaticText* itemStaticText37 =
new wxStaticText( itemCAlgoToolManagerParamsPanel1, wxID_STATIC,
_(
"Job Title:"), wxDefaultPosition, wxDefaultSize, 0 );
278 itemBoxSizer36->Add(itemStaticText37, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
280 wxTextCtrl* itemTextCtrl38 =
new wxTextCtrl( itemCAlgoToolManagerParamsPanel1,
ID_TITLE_TEXT, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
281 itemBoxSizer36->Add(itemTextCtrl38, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
283 itemBoxSizer2->Add(7, 8, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
285 m_chbStandalone =
new wxCheckBox( itemCAlgoToolManagerParamsPanel1,
ID_STANDALONE,
_(
"Run tool as standalone"), wxDefaultPosition, wxDefaultSize, 0 );
298 itemTextCtrl34->SetValidator( wxGenericValidator(&
m_AdvParams) );
299 itemTextCtrl38->SetValidator( wxGenericValidator(&
m_JobTitle) );
304 wxStaticText* loadingText =
new wxStaticText(
this,
ID_LOADING_TEXT,
wxT(
"Windomasker tax ID: none. Loading..."), wxDefaultPosition, wxDefaultSize, 0);
305 wxFont bold(wxNORMAL_FONT->GetPointSize(), wxNORMAL_FONT->GetFamily(), wxNORMAL_FONT->GetStyle(), wxFONTWEIGHT_BOLD, wxNORMAL_FONT->GetUnderlined(), wxNORMAL_FONT->GetFaceName());
306 loadingText->SetFont(bold);
307 loadingText->SetForegroundColour(*wxBLACK);
327 vector<string> labels;
451 if (pos == wxNOT_FOUND) {
454 if (pos != wxNOT_FOUND) {
471 return wxPanel::TransferDataToWindow();
518 GetSizer()->Layout();
523 if(wxPanel::TransferDataFromWindow()) {
560 int taxId = 0, index =
m_WMTaxIds->GetSelection();
561 if (wxNOT_FOUND != index)
578 if (!
m_Local && event.GetSelection() != 0)
584 if (!
m_Local && event.GetSelection() != 0)
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
Declares the CBlastServices class.
EProgram
This enumeration is to evolve into a task/program specific list that specifies sets of default parame...
CBLASTParams - save user-specified parameters and preferences.
bool FillControl(ICallback *callback, wxControlWithItems &ctrl, bool local, int selectTaxId)
static CTaxIdHelper & GetInstance()
static CWinMaskerFileStorage & GetInstance()
access the application-wide singleton
static vector< string > arr
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
wxFlexGridSizer * m_GeneralSizer
CBLASTSearchParamsPanel()
static bool NeedsThreshold(blast::EProgram program)
~CBLASTSearchParamsPanel()
wxCheckBox * m_LCRegionsCheck
wxComboBox * m_QueryGenCodeCombo
wxStaticBoxSizer * m_WMStaticBoxSizer
static void GetGeneticCodeLabels(vector< string > &labels)
bool TransferDataToWindow()
void StandaloneRequested(bool req)
wxCheckBox * m_chbStandalone
bool Create(wxWindow *parent, wxWindowID id=ID_CBLASTSEARCHPARAMSPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(), long style=wxTAB_TRAVERSAL)
void FindCompartments(bool req)
static bool ShowToolTips()
wxStaticText * m_DbGenCodeLabel
wxStaticText * m_WMStatic
static string GetGeneticCodeLabel(int code_id)
wxBitmap GetBitmapResource(const wxString &name)
void OnRepeatTypeSelected(wxCommandEvent &event)
wxStaticText * m_QueryGenCodeLabel
static bool NeedsQueryGeneticCode(blast::EProgram program)
static TRepeatLibs GetAllRepeatLibs()
SProgParams & GetCurrParams()
returns params for the current program
void SetParams(CBLASTParams *params)
int m_WM_TaxId
winmask tax id
wxCheckBox * m_RepeatsCheck
bool IsCompartmentsRequested() const
void OnStandaloneClick(wxCommandEvent &event)
bool m_MaskLowercase
mask Lowercase features
static int GetGeneticCodeByLabel(const string &label)
wxString m_QueryGeneticCode
wxIcon GetIconResource(const wxString &name)
blast::EProgram & GetCurrProgram()
returns the current program for the currently selected input type
wxCheckBox * m_CompartCheck
bool TransferDataFromWindow()
bool m_MaskRepeats
mask Repeat features
wxTextCtrl * m_ThreshInput
virtual void TaxonsLoaded(bool local)
static bool NeedsDbGeneticCode(blast::EProgram program)
void OnWMDownload(wxCommandEvent &event)
void x_InitGeneticCodesCombo()
ESubjectType GetSubjectType() const
void SetWM_Dir(const string &wm_dir_path)
void RestoreDefaults()
override in derived classes
bool IsStandaloneRequested() const
string & GetAdvancedParams()
wxStaticText * m_ThreshLabel
void OnWindowmaskerTaxIdSelected(wxCommandEvent &event)
wxComboBox * m_DbGenCodeCombo
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int
A callback function used to compare two keys in a database.
const struct ncbi::grid::netcache::search::fields::SIZE size
describes parameters for a BLAST program
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)
void ToArrayString(const vector< string > &out, wxArrayString &in)