wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle)
84: m_Seh(seh), m_FtblIDs(ftblids)
87 Create(parent,
id, caption, pos,
size, style);
98SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
99wxDialog::Create( parent,
id, caption, pos,
size, style );
104GetSizer()->SetSizeHints(
this);
148wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
149itemDialog1->SetSizer(itemBoxSizer2);
151wxStaticText* itemStaticText3 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Feature Table IDs not found in record"), wxDefaultPosition, wxDefaultSize, 0 );
152itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
154wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
155itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 1);
157wxBoxSizer* itemBoxSizer5 =
newwxBoxSizer(wxVERTICAL);
158itemBoxSizer4->Add(itemBoxSizer5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);
166wxBoxSizer* itemBoxSizer8 =
newwxBoxSizer(wxVERTICAL);
167itemBoxSizer4->Add(itemBoxSizer8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);
175 m_Map=
newwxButton( itemDialog1,
ID_FEATTBLID_BTN,
_(
"Map Selected"), wxDefaultPosition, wxDefaultSize, 0 );
176itemBoxSizer2->Add(
m_Map, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);
178wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
179itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
181wxButton* itemButton13 =
newwxButton( itemDialog1,
ID_AUTOMATCH_TABLE_ID,
_(
"AutoMatch where table ID"), wxDefaultPosition, wxDefaultSize, 0 );
182itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
184wxArrayString m_AutoMatchTypeStrings;
185m_AutoMatchTypeStrings.Add(
_(
"Matches"));
186m_AutoMatchTypeStrings.Add(
_(
"Is contained in"));
187m_AutoMatchTypeStrings.Add(
_(
"Is start of"));
188m_AutoMatchTypeStrings.Add(
_(
"Is end of"));
190itemBoxSizer12->Add(
m_AutoMatchType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
192wxStaticText* itemStaticText15 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"record ID"), wxDefaultPosition, wxDefaultSize, 0 );
193itemBoxSizer12->Add(itemStaticText15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
195wxStaticText* itemStaticText16 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Selected matches"), wxDefaultPosition, wxDefaultSize, 0 );
196itemBoxSizer2->Add(itemStaticText16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);
198wxArrayString m_MappedIDsStrings;
200itemBoxSizer2->Add(
m_MappedIDs, 1, wxEXPAND| wxALL, 5);
202wxBoxSizer* itemBoxSizer18 =
newwxBoxSizer(wxHORIZONTAL);
203itemBoxSizer2->Add(itemBoxSizer18, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2);
205wxButton* itemButton19 =
newwxButton( itemDialog1, wxID_OK,
_(
"OK"), wxDefaultPosition, wxDefaultSize, 0 );
206itemBoxSizer18->Add(itemButton19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
208wxButton* itemButton20 =
newwxButton( itemDialog1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
209itemBoxSizer18->Add(itemButton20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
220 if((*id_it)->IsGeneral() && (*id_it)->GetGeneral().IsSetDb() &&
221((*id_it)->GetGeneral().GetDb() ==
"TMSMART"|| (*id_it)->GetGeneral().GetDb() ==
"BankIt"|| (*id_it)->GetGeneral().GetDb() ==
"NCBIFILE"))
223 stringid_label = (*id_it)->AsFastaString();
224 if(!
label.empty()) {
239 id->GetLabel(&
label);
254 returnwxDialog::TransferDataToWindow();
261ftbl_seqid_map.
clear();
262wxArrayInt checked_items;
266 for(
unsigned int n= 0;
n< checked_items.size(); ++
n) {
269 stringftbl_label =
text.substr(0, pos);
335 if(item_ftbl == -1 || item_seqid == -1) {
351 switch(match_type) {
357 if(
NStr::Find(ft_id,
".") == string::npos) {
359 if(ver != string::npos &&
NStr::Equal(ft_id, rec_id.substr(0, ver))) {
401wxArrayString matched_ids;
414 for(
size_t i= 0;
i< matched_ids.size(); ++
i) {
424item_ftbl =
m_FeatTableIDList->GetNextItem(item_ftbl, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE);
425 if(item_ftbl == -1)
break;
428ftcheck = ftcheck.substr(4);
430 longitem_seqid = -1;
431 boolfound_match =
false;
432 while(!found_match) {
433item_seqid =
m_SequenceIDList->GetNextItem(item_seqid, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE);
434 if(item_seqid == -1)
break;
436vector<CTempString> tokens;
438 ITERATE(vector<CTempString>,
t, tokens) {
456item_ftbl =
m_FeatTableIDList->GetNextItem(item_ftbl, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE);
457 if(item_ftbl == -1)
break;
460ftcheck = ftcheck.substr(4);
464label_to_item[ftcheck] = item_ftbl;
469 stringgnl = ftcheck.substr(pos + 1,
NPOS);
471label_to_item[gnl] = item_ftbl;
476 longitem_seqid = -1;
479item_seqid =
m_SequenceIDList->GetNextItem(item_seqid, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE);
480 if(item_seqid == -1)
break;
482vector<CTempString> tokens;
484 ITERATE(vector<CTempString>,
t, tokens) {
485 autop = label_to_item.
find(*
t);
486 if(p == label_to_item.
end()) {
488 if(ver != string::npos) {
489p = label_to_item.
find(
t->substr(0, ver));
492 if(p != label_to_item.
end()) {
494to_delete.
insert(p->second);
499 for(
autop = to_delete.rbegin(); p != to_delete.rend(); ++p) {
wxCheckListBox * m_MappedIDs
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void x_AddMatch(long item_ftbl, long item_seqid)
void OnMapSelectedBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FEATTBLID_BTN
objects::CSeq_entry_Handle m_Seh
void QuadraticAutomatch(wxArrayString &matched_ids)
wxChoice * m_AutoMatchType
void LinearAutomatch(wxArrayString &matched_ids)
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=ID_CMATCHFEATURETABLEDLG, const wxString &caption=_("Match Feature Table IDs"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
wxListView * m_SequenceIDList
const set< objects::CSeq_id_Handle > m_FtblIDs
CMatchFeatureTableDlg()
Constructors.
void GetFtableIDToSeqIDMap(TFeatSeqIDMap &ftbl_seqid_map)
void OnAutomatchTableIdClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_AUTOMATCH_TABLE_ID
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
~CMatchFeatureTableDlg()
Destructor.
bool TransferDataToWindow()
bool x_TokenMatch(const string &ft, const string &rec)
static bool ShowToolTips()
Should we show tooltips?
wxListView * m_FeatTableIDList
void Init()
Initialises member variables.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
container_type::const_iterator const_iterator
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
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_Seq_id_BestRank
use CSeq_id::BestRank() as the scoring function
TBioseqCore GetBioseqCore(void) const
Get bioseq core structure.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_NS_STD::string::size_type SIZE_TYPE
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
@ eNocase
Case insensitive compare.
static const char label[]
const TId & GetId(void) const
Get the Id member data.
list< CRef< CSeq_id > > TId
@ eMol_na
just a nucleic acid
static const char * sToSign
string s_GetDisplayLabel(CBioseq_Handle bh)
static void text(MDB_val *v)
const struct ncbi::grid::netcache::search::fields::SIZE size
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