wxPanel::Create( parent,
id, pos,
size, style );
108GetSizer()->SetSizeHints(
this);
140wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
141itemPanel1->SetSizer(itemBoxSizer2);
143wxStaticText* itemStaticText3 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Enter a search term , then select assembly(ies) from the list."), wxDefaultPosition, wxDefaultSize, 0 );
144itemStaticText3->SetFont(wxFont(wxNORMAL_FONT->GetPointSize(), wxNORMAL_FONT->GetFamily(), wxNORMAL_FONT->GetStyle(), wxFONTWEIGHT_BOLD, wxNORMAL_FONT->GetUnderlined(), wxNORMAL_FONT->GetFaceName()));
145itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_LEFT|wxALL, 5);
147wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
148itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_LEFT|wxALL, 5);
150wxStaticText* itemStaticText5 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Search term:"), wxDefaultPosition, wxDefaultSize, 0 );
151itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
155 m_Term->SetToolTip(
_(
" \"A valid search term can be one of the following:\n 1. Organism keyword, e.g. human, zebra fish, zebra*\n 2. Taxonomy id, e.g. 9606, 10116\n 3. Assembly name, e.g. hg19, GRCH37, NCBI*\n 4. Sequence accession, e.g. NC_000001.10, nt_077402.2\"\n "));
156itemBoxSizer4->Add(
m_Term, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
158wxButton* itemButton7 =
newwxButton( itemPanel1,
ID_BUTTON4,
_(
"Find Assemblies"), wxDefaultPosition, wxDefaultSize, 0 );
159itemButton7->SetDefault();
160itemBoxSizer4->Add(itemButton7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
162wxStaticBox* itemStaticBoxSizer8Static =
newwxStaticBox(itemPanel1,
wxID_ANY,
_(
"Found Assemblies"));
163wxStaticBoxSizer* itemStaticBoxSizer8 =
newwxStaticBoxSizer(itemStaticBoxSizer8Static, wxHORIZONTAL);
164itemBoxSizer2->Add(itemStaticBoxSizer8, 1, wxGROW|wxALL, 5);
167itemStaticBoxSizer8->Add(
m_ItemList, 1, wxGROW|wxALL, 5);
169wxStaticBox* itemStaticBoxSizer10Static =
newwxStaticBox(itemPanel1,
wxID_ANY,
_(
"Release type"));
170wxStaticBoxSizer* itemStaticBoxSizer10 =
newwxStaticBoxSizer(itemStaticBoxSizer10Static, wxHORIZONTAL);
171itemBoxSizer2->Add(itemStaticBoxSizer10, 0, wxALIGN_LEFT|wxALL, 5);
173 m_ReleaseTypeAll=
newwxRadioButton( itemPanel1,
ID_ALLBUTTON,
_(
"All"), wxDefaultPosition, wxSize(itemPanel1->ConvertDialogToPixels(wxSize(53, -1)).x, -1), wxRB_GROUP );
175itemStaticBoxSizer10->Add(
m_ReleaseTypeAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
177 m_ReleaseTypeRefSeq=
newwxRadioButton( itemPanel1,
ID_REFSEQBUTTON,
_(
"RefSeq"), wxDefaultPosition, wxSize(itemPanel1->ConvertDialogToPixels(wxSize(53, -1)).x, -1), 0 );
190 static boolautoCompleteSupported =
true;
191 if(autoCompleteSupported) {
193autoCompleteSupported =
false;
194 LOG_POST(
Error<<
"The platform doesn't support text autocomplete");
198 deletetextCompleter;
236vector<string> assms;
237vector<int> rows_selected;
239 ITERATE(vector<int>, r_iter, rows_selected) {
240assms.push_back(
m_Assms[*r_iter]);
248 string& description)
const 267other_names +=
"; ";
269 size_tpos = name_iter->find_first_of(
":");
270 if(pos != string::npos) {
274 if( !other_names.empty() ) {
275name +=
" ("+ other_names +
")";
290wxMessageBox(
wxT(
"Genome List is empty!"),
291 wxT(
"Assembly selection - no selection"),
292wxOK | wxICON_ERROR,
this);
297wxMessageBox(
wxT(
"Please select one or more assemblies!"),
298 wxT(
"Assembly selection - no selection"),
299wxOK | wxICON_ERROR,
this);
302wxMessageBox(
wxT(
"Please select one assembly!"),
303 wxT(
"Assembly selection - no selection"),
304wxOK | wxICON_ERROR,
this);
394 stringrelease_str =
"refseq";
396release_str =
"genbank";
398CDL_AssmInfo::TAssemblies::iterator iter = items.begin();
399 while(iter != items.end()) {
400 if( !(*iter)->IsSetRelease_type() ||
401(*iter)->GetRelease_type() != release_str) {
402iter = items.erase(iter);
411 m_Assms.push_back((*iter)->GetAccession());
430 stringname = assm.
GetName();
438other_names +=
"; ";
440 size_tpos = name_iter->find_first_of(
":");
441 if(pos != string::npos) {
445 if( !other_names.empty() ) {
446name +=
" ("+ other_names +
")";
480 if(items.size() == 1) {
536 if(
m_Term->GetValue().IsEmpty()) {
537wxMessageBox(
wxT(
"Please fill in the search term!"),
538 wxT(
"Assembly query input - invalid input"),
539wxOK | wxICON_ERROR,
this);
557std::exception_ptr excp;
560 LOG_POST(
Info<<
"Retrieve assembly information for: "<< term);
567excp = std::current_exception();
591excp = std::current_exception();
595std::rethrow_exception(excp);
609 catch(
constexception&) {
620errMsg =
"Can't find any assembly related to \""+
m_SearchingFor+
"\"";
624,
"Search Assemblies"));
User-defined methods of the data storage class.
User-defined methods of the data storage class.
static CStringHistory s_History(50, "Dialogs.AssemblyListPanel")
static const char * kReleaseTypeTag
static CRef< objects::CDL_AssmInfo > GetAssms_Term(const string &term, const string &release_type=NcbiEmptyString, ICanceled *cancel=0)
static CRef< objects::CDL_AssmInfo > GetAssms_Gi(TGi gi, const string &release_type=NcbiEmptyString)
void SaveSettings() const
wxRadioButton * m_ReleaseTypeRefSeq
wxRadioButton * m_ReleaseTypeAll
void SetSearchTerm(const string &term)
bool Create(wxWindow *parent, wxWindowID id=ID_CASSEMBLYLISTPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(266, 184), long style=wxWANTS_CHARS|wxTAB_TRAVERSAL)
void OnGenbankbuttonSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_GENBANKBUTTON
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void x_SetTextCompleter(wxTextCompleter *textCompleter)
void SetMultiSelection(bool flag)
objects::CDL_AssmInfo::TAssemblies m_OrigItems
void OnAllbuttonSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ALLBUTTON
void OnFindGenomes(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON4
void SetRegistryPath(const string &path)
vector< string > GetSelectedAssemblies() const
Get accessions of all selected assemblies.
void GetAssmNameAndDesc(const string &accession, string &name, string &description) const
Get the name and (if available) description for an accession.
string GetSearchTerm() const
std::unique_ptr< async_job > m_Future
void x_UpdateSearchTerm()
void x_LoadTableSettings()
void SetDescr(const wxString &descr)
CAutoCompleteTextCtrl * m_Term
void x_ShowStatus(const string &status)
wxRadioButton * m_ReleaseTypeGenBank
void SetMainTitle(const wxString &title)
static bool ShowToolTips()
CwxTableListCtrl * m_ItemList
void OnFindEnter(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_ENTER event handler for ID_TEXTCTRL7
void OnRefseqbuttonSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_REFSEQBUTTON
bool m_MultiSelection
indicates if multiple selections are allowed.
bool AutoComplete(wxTextCompleter *completer)
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
class CRegistryReadView provides a nested hierarchical view at a particular key.
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
void Set(const string &key, int val)
access a named key at this level, with no recursion
void AddString(const wxString &str)
wxTextCompleter * CreateCompleter()
CwxTextTableModel - very simple model for storing SMALL numbers fo strings.
virtual void Init(int n_cols, int n_rows)
virtual void SetStringValueAt(int row, int col, const wxString &value)
CwxTableListCtrl - generic wxListCtrl-based Table Control.
IwxTableModel * GetModel() const
void LoadTableSettings(const CRegistryReadView &view, bool byName=false)
wxArrayInt GetDataRowsSelected() const
void SaveTableSettings(CRegistryWriteView &view, bool saveSorting=true) const
void SetModel(IwxTableModel *data_model, bool own=false)
Interface for testing cancellation request in a long lasting operation.
virtual int GetNumColumns() const =0
Returns the number of columns in the model.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static const column_t columns[]
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
void Info(CExceptionArgs_Base &args)
CSeq_id & Set(const CTempString &the_id, TParseFlags flags=fParse_AnyRaw)
Reassign based on flat specifications; arguments interpreted as with constructors.
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_ForceGi
return only a gi-based seq-id
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
const CSeq_id_Handle & GetSeq_id_Handle(void) const
Get handle of id used to obtain this bioseq handle.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
virtual bool IsCanceled(void) const =0
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
bool CanGetOrganism(void) const
Check if it is safe to call GetOrganism method.
list< string > TOther_names
const TRelease_date & GetRelease_date(void) const
Get the Release_date member data.
bool CanGetRelease_type(void) const
Check if it is safe to call GetRelease_type method.
const TClass & GetClass(void) const
Get the Class member data.
const TOther_names & GetOther_names(void) const
Get the Other_names member data.
const TDescr & GetDescr(void) const
Get the Descr member data.
bool CanGetOther_names(void) const
Check if it is safe to call GetOther_names method.
const TAccession & GetAccession(void) const
Get the Accession member data.
const TName & GetName(void) const
Get the Name member data.
bool CanGetClass(void) const
Check if it is safe to call GetClass method.
list< CRef< CDL_Assembly > > TAssemblies
const TRelease_type & GetRelease_type(void) const
Get the Release_type member data.
const TOrganism & GetOrganism(void) const
Get the Organism member data.
const TAssemblies & GetAssemblies(void) const
Get the variant data.
bool CanGetDescr(void) const
Check if it is safe to call GetDescr method.
bool CanGetRelease_date(void) const
Check if it is safe to call GetRelease_date method.
job_function_traits< _Fty >::future job_async(const _Fty &_Fnarg, const string &descr)
static void text(MDB_val *v)
const struct ncbi::grid::netcache::search::fields::SIZE size
#define row(bind, expected)
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)
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