wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
92: m_TopSeqEntry(seh), m_CmdProcessor(cmdProcessor), m_all_records(all_records)
97 Create(parent,
id, caption, pos,
size, style);
108 size_tnum_processed;
109vector<string> unprocessed_ids;
111 booluse_dev_server(
false);
112 boolcompare_structured_comments(
false);
118 for(
autodiff : diff_vec)
120 stringseq_id = diff->GetSequenceId();
121 stringfield = diff->GetFieldName();
122 string source= diff->GetSrcVal();
123 stringsample = diff->GetPureSampleVal();
124 stringsample_id = diff->GetBioSample();
127tie(set_source, set_sample) =
m_DiffVec[{sample_id, field}][seq_id];
131set_sample.
insert(sample);
132 m_DiffVec[{sample_id, field}][seq_id] = make_pair(set_source, set_sample);
137vector<CRef <CSeq_id> > id_list;
146id_list.push_back(ic);
154 id->GetLabel(&
label);
165SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
166wxFrame::Create( parent,
id, caption, pos,
size, style );
167wxVisualAttributes attr = wxPanel::GetClassDefaultAttributes();
168 if(attr.colBg != wxNullColour) {
169SetOwnBackgroundColour(attr.colBg);
174GetSizer()->SetSizeHints(
this);
211wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
212itemDialog1->SetSizer(itemBoxSizer2);
214 m_ScrolledWindow=
newwxScrolledWindow(itemDialog1,
wxID_ANY, wxDefaultPosition, wxSize(840, 870), wxHSCROLL| wxVSCROLL);
219wxBoxSizer* top_sizer =
newwxBoxSizer(wxVERTICAL);
227wxMessageBox(
wxT(
"No differences found for resolved Biosample IDs"),
wxT(
"Info"), wxOK);
234wxMessageBox(
wxT(
"No differences found for resolved Biosample IDs"),
wxT(
"Info"), wxOK);
239wxArrayString itemChoiceStrings, itemChoiceStringsWritable;
245 if((*it)->IsSetHeader() && (*it)->GetHeader().IsSetTitle() )
247 stringtitle = (*it)->GetHeader().GetTitle();
250itemChoiceStrings.Add(wxString(title));
252itemChoiceStringsWritable.Add(wxString(title));
259wxBoxSizer* itemBoxSizer16 =
newwxBoxSizer(wxHORIZONTAL);
260top_sizer->Add(itemBoxSizer16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
263itemBoxSizer16->Add(itemButton24, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
265itemButton24->SetToolTip(
_(
"Append to BioSource values"));
268itemBoxSizer16->Add(itemButton17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
270itemButton17->SetToolTip(
_(
"Overwrite BioSource values"));
272wxButton* itemButton18 =
newwxButton(
m_ScrolledWindow,
ID_SYNC,
_(
"sync"), wxDefaultPosition, wxDefaultSize, 0 );
273itemBoxSizer16->Add(itemButton18, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
275itemButton18->SetToolTip(
_(
"Fill the blanks in either BioSample or BioSource values"));
278itemBoxSizer16->Add(itemButton19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
280itemButton19->SetToolTip(
_(
"Overwrite BioSample values"));
283itemBoxSizer16->Add(itemButton25, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
285itemButton25->SetToolTip(
_(
"Append to BioSample values"));
287wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
288top_sizer->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
293wxBoxSizer* itemBoxSizer5 =
newwxBoxSizer(wxHORIZONTAL);
294top_sizer->Add(itemBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
299wxBoxSizer* itemBoxSizer13 =
newwxBoxSizer(wxHORIZONTAL);
300top_sizer->Add(itemBoxSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
303itemBoxSizer13->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
306itemBoxSizer13->Add(itemButton20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
309itemBoxSizer13->Add(itemButton21, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
312itemBoxSizer13->Add(
m_RefreshButton, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
316itemBoxSizer13->Add(itemButton23, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
318wxButton* itemButton15 =
newwxButton(
m_ScrolledWindow, wxID_CANCEL,
_(
"Close"), wxDefaultPosition, wxDefaultSize, 0 );
319itemBoxSizer13->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
334 m_Grid->SetTable(gridAdapter,
true);
335 m_Grid->AutoSizeColumns();
336 intl_height =
m_Grid->GetColLabelSize();
337 m_Grid->SetColLabelSize( 2 * l_height );
344 if((*it)->IsSetHeader() && (*it)->GetHeader().IsSetTitle() )
346 stringtitle = (*it)->GetHeader().GetTitle();
354 if(glyph_col >= 0 && glyph_col+1 <
m_Grid->GetNumberCols())
369expand_col->
SetHeader().SetTitle(
"");
370expand_col->
SetHeader().SetField_name(
"expand");
371expand_col->
SetData().SetString();
374name_col->
SetHeader().SetTitle(
"Field");
375name_col->
SetHeader().SetField_name(
"field");
376name_col->
SetData().SetString();
379source_col->
SetHeader().SetTitle(
"Source");
380source_col->
SetHeader().SetField_name(
"source");
381source_col->
SetData().SetString();
384sample_col->
SetHeader().SetTitle(
"Sample");
385sample_col->
SetHeader().SetField_name(
"Sample");
386sample_col->
SetData().SetString();
389sample_id_col->
SetHeader().SetTitle(
"Biosample Id");
390sample_id_col->
SetHeader().SetField_name(
"biosample_id");
391sample_id_col->
SetData().SetString();
395 table->SetColumns().push_back(expand_col);
396 table->SetColumns().push_back(name_col);
397 table->SetColumns().push_back(source_col);
398 table->SetColumns().push_back(sample_col);
399 table->SetColumns().push_back(sample_id_col);
408 stringfield, sample_id;
409tie(sample_id, field) = diff.first;
410 for(
const auto&
row: diff.second)
412 stringseq_id =
row.first;
414tie(set_source, set_sample) =
row.second;
417 stringsample =
NStr::Join(set_sample,
"|");
423 id->Assign(*
m_ids[seq_id]);
430 m_id_col->SetData().SetId().push_back(
id);
431expand_col->
SetData().SetString().push_back(
"");
432name_col->
SetData().SetString().push_back(field);
434sample_col->
SetData().SetString().push_back(sample);
435sample_id_col->
SetData().SetString().push_back(sample_id);
453 autonum_rows =
m_Grid->GetNumberRows();
454 for(
auto row= 0;
row< num_rows; ++
row)
459values[bsh][field] =
value;
471new_desc->
Assign(*src_desc_ci);
476 stringfield = fi->first;
477 string value= fi->second;
487biosource.
SetOrg().ResetTaxname();
491biosource.
SetOrg().SetOrgname().ResetName();
498biosource.
SetOrg().SetTaxId(taxid);
510 for(
const auto&v : vals)
517 mod->SetSubtype(subtype);
519biosource.
SetOrg().SetOrgname().SetMod().push_back(
mod);
527 catch(
constexception&)
537 for(
const auto&v : vals)
555 catch(
constexception&)
562wxMessageBox(
wxT(
"Unknown field name ") + wxString(field),
wxT(
"Error"), wxOK);
581 return "Invalid operation in Compare with Biosample";
624wxMessageDialog dlg(
this,
_(
"Discard modifications?"),
_(
"Attention"),wxOK|wxCANCEL|wxCENTRE);
625 if(dlg.ShowModal() == wxID_OK) {
636 if(!
m_Grid->IsSelection())
640wxArrayInt wx_selected =
m_Grid->GetSelectedRows();
641 if(wx_selected.IsEmpty())
643 if(
m_Grid->GetSelectionBlockTopLeft().size() == 1 &&
m_Grid->GetSelectionBlockTopLeft().size() ==
m_Grid->GetSelectionBlockBottomRight().size())
645 inttop_row =
m_Grid->GetSelectionBlockTopLeft()[0].GetRow();
646 intbot_row =
m_Grid->GetSelectionBlockBottomRight()[0].GetRow();
647 for(
int i= top_row;
i<= bot_row;
i++)
649selected.insert(
i);
655 for(
unsigned int i= 0;
i< wx_selected.GetCount();
i++)
657selected.insert(wx_selected.Item(
i));
668std::set<int> selected;
670 if(selected.empty())
672wxMessageBox(
wxT(
"Nothing selected"),
wxT(
"Info"), wxOK);
679 for(std::set<int>::const_iterator
i= selected.begin();
i!= selected.end(); ++
i)
680 if(
m_Grid->IsRowShown(*
i))
685 if(sample_value.IsEmpty() && !source_value.IsEmpty())
692 if(!sample_value.IsEmpty() && source_value.IsEmpty())
710std::set<int> selected;
712 if(selected.empty())
714wxMessageBox(
wxT(
"Nothing selected"),
wxT(
"Info"), wxOK);
721 for(std::set<int>::const_iterator
i= selected.begin();
i!= selected.end(); ++
i)
722 if(
m_Grid->IsRowShown(*
i))
727 if(!sample_value.IsEmpty() && source_value != sample_value)
745std::set<int> selected;
747 if(selected.empty())
749wxMessageBox(
wxT(
"Nothing selected"),
wxT(
"Info"), wxOK);
756 for(std::set<int>::const_iterator
i= selected.begin();
i!= selected.end(); ++
i)
757 if(
m_Grid->IsRowShown(*
i))
762 if(sample_value != source_value && !source_value.IsEmpty())
781std::set<int> selected;
783 if(selected.empty())
785wxMessageBox(
wxT(
"Nothing selected"),
wxT(
"Info"), wxOK);
792 for(std::set<int>::const_iterator
i= selected.begin();
i!= selected.end(); ++
i)
793 if(
m_Grid->IsRowShown(*
i))
799 if(!sample_value.IsEmpty() && source_value != sample_value && field !=
_(
"Organism Name") && field !=
_(
"Tax ID"))
801list<string> old_vals;
803list<string> new_vals;
805 set<string>vals(old_vals.begin(), old_vals.end());
806vals.
insert(new_vals.begin(), new_vals.end());
808 if(new_val != source_value)
827std::set<int> selected;
829 if(selected.empty())
831wxMessageBox(
wxT(
"Nothing selected"),
wxT(
"Info"), wxOK);
838 for(std::set<int>::const_iterator
i= selected.begin();
i!= selected.end(); ++
i)
839 if(
m_Grid->IsRowShown(*
i))
845 if(sample_value != source_value && !source_value.IsEmpty() && field !=
_(
"Organism Name") && field !=
_(
"Tax ID"))
847list<string> old_vals;
849list<string> new_vals;
851 set<string>vals(old_vals.begin(), old_vals.end());
852vals.
insert(new_vals.begin(), new_vals.end());
854 if(new_val != sample_value)
872 msg<<
"Seq-id\tField\tSource\tSample\tBiosample Id\n";
875 stringfield, sample_id;
876tie(sample_id, field) = diff.first;
877 for(
const auto&
row: diff.second)
879 stringseq_id =
row.first;
881tie(set_source, set_sample) =
row.second;
884 stringsample =
NStr::Join(set_sample,
"|");
886 msg<< seq_id <<
"\t"<<field<<
"\t"<<
source<<
"\t"<<sample<<
"\t"<<sample_id<<
"\n";
891report->SetTitle(
wxT(
"Compare with Biosample Report"));
893report->Show(
true);
897 static const char*
kRegPath=
"Dialogs.Edit.CompareWithBiosample";
929wxMessageBox(
wxT(
"Current BioSample API key is empty. Please specify a new one."),
wxT(
"Error"), wxOK);
940 autonum_rows =
m_Grid->GetNumberRows();
941 for(
auto row= 0;
row< num_rows; ++
row)
943 stringseq_id_str =
m_id_col->GetData().GetId()[
row]->GetSeqIdString();
947list<string> sample_list;
950new_values[pair<string, string>(sample_id, field)] = sample_list;
957unordered_map<string, map<string, vector<string> > > delete_value, add_value;
959unordered_map<string, string> change_organism;
962 stringfield, sample_id;
963tie(sample_id, field) = diff.first;
964list<string> new_sample;
965 if(new_values.
find(diff.first) != new_values.
end())
966new_sample = new_values[diff.first];
969tie(set_source, old_sample) = diff.second.
begin()->second;
974vector<string> deleted_values;
975set_difference(old_sample.
begin(), old_sample.
end(), new_sample.begin(), new_sample.end(), inserter(deleted_values, deleted_values.end()));
977vector<string> added_values;
978set_difference(new_sample.begin(), new_sample.end(), old_sample.
begin(), old_sample.
end(), inserter(added_values, added_values.end()));
980 if(field ==
"Organism Name")
982 if(added_values.size() == 1 && deleted_values.size() == 1)
984change_organism[sample_id] = added_values.front();
989 if(!deleted_values.empty())
991delete_value[sample_id][field] = deleted_values;
995 if(!added_values.empty())
997add_value[sample_id][field] = added_values;
1001 for(
const auto&diff : new_values)
1003 stringfield, sample_id;
1004tie(sample_id, field) = diff.first;
1005vector<string> new_sample(diff.second.begin(), diff.second.end());
1012 if(new_sample.empty())
1018add_value[sample_id][field] = new_sample;
1023 stringsUrl =
"https://api-int.ncbi.nlm.nih.gov/biosample/update/";
1024 stringsContentType =
"application/json; charset=utf-8";
1026 autosample_id_it = ids.
begin();
1027 while(sample_id_it != ids.
end())
1035 autosample_id = *sample_id_it;
1037obj1.
insert(
"samples", sample_id);
1038 if(!delete_value[sample_id].
empty())
1041 for(
const auto&kv : delete_value[sample_id])
1043 const string&field = kv.first;
1044 for(
const auto&v : kv.second)
1047obj2.
insert(
"name", field);
1048obj2.
insert(
"old_value", v);
1053 if( !change_organism[sample_id].
empty())
1057chg_org.
insert(
"new_value", change_organism[sample_id]);
1060 if(!add_value[sample_id].
empty())
1063 for(
const auto&kv : add_value[sample_id])
1065 const string&field = kv.first;
1066 for(
const auto&v : kv.second)
1069obj2.
insert(
"name", field);
1070obj2.
insert(
"new_value", v);
1089 stringerr = ss.str();
1091err =
"Unable to connect - server down?";
1092wxMessageBox(wxString(err),
wxT(
"Error"), wxOK);
1098 boolhas_error =
false;
1101wxMessageBox(
wxT(
"Current BioSample API key was not recognized. Please specify a new one."),
wxT(
"Error"), wxOK);
1111 if(!
msg.IsEmpty()) {
1113report->SetTitle(
wxT(
"Biosample Update Report"));
1115report->Show(
true);
1120wxWindow *win = FindWindowByLabel(
wxT(
"Biosample Update Report"),
this);
1139 if(dlg.ShowModal() == wxID_OK) {
1171wxMessageBox(
wxT(
"No differences found for resolved Biosample IDs"),
wxT(
"Info"), wxOK);
1178wxMessageBox(
wxT(
"No differences found for resolved Biosample IDs"),
wxT(
"Info"), wxOK);
1197wxWindow *win = FindWindowByLabel(
wxT(
"Biosample Update Report"),
this);
1229 autoerror_it = obj.
find(
"has_error");
1231 automsg_it = obj.
find(
"messages");
1232 if(msg_it != obj.
end() && msg_it->
value.
IsArray() && !msg_it->value.GetArray().empty()) {
1234 for(
const auto& resp_it : messages) {
1235 if(resp_it.IsObject()) {
1236 const auto& resp_obj = resp_it.
GetObject();
1237 autolevel_it = resp_obj.
find(
"level");
1238 automessage_it = resp_obj.find(
"message");
1239 if((level_it != resp_obj.end()) &&
1240(message_it != resp_obj.end()) &&
1241(level_it->value.GetValue().GetString() ==
"error") &&
1255unordered_map<string, vector<string> > messages;
1259 if(obj2.
find(
"level") != obj2.
end() && obj2.
find(
"message") != obj2.
end())
1263messages[level].push_back(
msg);
1268it = obj.
find(
"validation_report");
1274 stringname(it2->name);
1278 if(obj2.
find(
"message") == obj2.
end())
1283 stringvalidation_msg;
1284 if(obj2.
find(
"type") != obj2.
end())
1287 if(
type==
"attribute_error"&& obj2.
find(
"attribute_name") != obj2.
end())
1290validation_msg +=
" "+ attribute_name;
1291 if(obj2.
find(
"attribute_value") != obj2.
end())
1294 if(!attribute_value.empty())
1295validation_msg +=
":"+ attribute_value;
1301 boolis_warning =
false;
1302 if(obj2.
find(
"is_warning") != obj2.
end())
1304 if(obj2.
find(
"name") != obj2.
end())
1307 msg+=
" ("+ short_name +
")";
1308 if(short_name ==
"taxonomy_error_warning"|| short_name ==
"tax_consult_warning"|| short_name ==
"taxonomy_service_failure_warning")
1310wxMessageBox(wxString(
msg),
wxT(
"Taxonomy Consult Warning"), wxOK);
1314validation_warning[
msg][name] = validation_msg;
1316validation_error[
msg][name] = validation_msg;
1319 for(
const auto&m : validation_error)
1321messages[
"error"].push_back(m.first);
1322 for(
const auto&name : m.second)
1324 string str= name.first;
1325 if(!name.second.empty())
1326 str+=
" - "+ name.second;
1327messages[
"error"].push_back(
str);
1330 for(
const auto&m : validation_warning)
1332messages[
"warning"].push_back(m.first);
1333 for(
const auto&name : m.second)
1335 string str= name.first;
1336 if(!name.second.empty())
1337 str+=
" - "+ name.second;
1338messages[
"warning"].push_back(
str);
1343 if(messages.empty())
1346 if(!messages[
"error"].
empty())
1348report <<
"Error:\n";
1349 for(
const auto&m : messages[
"error"])
1350report << m <<
"\n";
1353 if(!messages[
"warning"].
empty())
1355report <<
"Warning:\n";
1356 for(
const auto&m : messages[
"warning"])
1357report << m <<
"\n";
1360 if(!messages[
"info"].
empty())
1362report <<
"Info:\n";
1363 for(
const auto&m : messages[
"info"])
1364report << m <<
"\n";
1395 Create(parent,
id, caption, pos,
size, style);
1401SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
1402wxDialog::Create(parent,
id, caption, pos,
size, style);
1407GetSizer()->SetSizeHints(
this);
1423wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
1424itemDialog1->SetSizer(itemBoxSizer2);
1426wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
1427itemBoxSizer2->Add(itemBoxSizer4, 0, wxEXPAND | wxALL, 0);
1430itemBoxSizer4->Add(
m_Filename, 1, wxALIGN_LEFT | wxALL, 5);
1432wxButton* itemButton5 =
newwxBitmapButton(itemDialog1,
wxID_ANY, wxArtProvider::GetBitmap(
wxT(
"menu::open")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
1433itemButton5->SetToolTip(
wxT(
"Choose a file..."));
1434itemBoxSizer4->Add(itemButton5, 0, wxALIGN_CENTER_VERTICAL | wxTOP |wxBOTTOM | wxRIGHT, 5);
1438wxBoxSizer* itemBoxSizer6 =
newwxBoxSizer(wxHORIZONTAL);
1439itemBoxSizer2->Add(itemBoxSizer6, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
1441wxButton* itemButton7 =
newwxButton(itemDialog1, wxID_OK,
_(
"OK"), wxDefaultPosition, wxDefaultSize, 0);
1442itemBoxSizer6->Add(itemButton7, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
1444wxButton* itemButton8 =
newwxButton(itemDialog1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0);
1445itemBoxSizer6->Add(itemButton8, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
1450wxFileDialog dlg(
this,
wxT(
"Select file"), wxEmptyString, wxEmptyString,
_(
"All files (*.*)|*.*"), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
1452 if(dlg.ShowModal() == wxID_OK) {
1482 returnwxNullBitmap;
vector< CRef< CBiosampleFieldDiff > > TBiosampleFieldDiffList
map< string, CRef< CSeq_descr > > TBioSamples
TBiosampleFieldDiffList GetBioseqDiffs(CBioseq_Handle bh, const string &biosample_accession, size_t &num_processed, vector< string > &unprocessed_ids, bool use_dev_server=false, bool compare_structured_comments=false, const string &expected_prefix="", TBioSamples *cache=NULL)
static bool IsStopWord(const string &value)
bool RemoveOrgMod(int subtype)
bool RemoveSubSource(int subtype)
void AddCommand(IEditCommand &command)
void SetButton(wxButton *button)
void OnAddToSample(wxCommandEvent &event)
void OnAddToSource(wxCommandEvent &event)
CRef< objects::CSeq_table > GetChoices(CRef< objects::CSeq_table > values_table)
CStringConstraintSelect * m_StringConstraintPanel
wxScrolledWindow * m_ScrolledWindow
void OnSyncButtonClick(wxCommandEvent &event)
ICommandProccessor * m_CmdProcessor
void CreateBiosampleUpdateWebService(wxCommandEvent &event)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CRef< objects::CSeq_table > GetValuesTableFromSeqEntry()
CRef< objects::CSeqTable_column > m_id_col
void OnRefresh(wxCommandEvent &event)
void OnClickCancel(wxCommandEvent &event)
void x_AddTablePanel(CRef< objects::CSeq_table > values_table)
map< pair< string, string >, unordered_map< string, pair< set< string >, set< string > > > > m_DiffVec
~CCompareWithBiosample()
Destructor.
void Init()
Initialises member variables.
CSeqTableGridPanel * m_GridPanel
void OnCopyToSourceButtonClick(wxCommandEvent &event)
void OnNewAPIKey(wxCommandEvent &event)
wxButton * m_RefreshButton
map< string, CConstRef< CSeq_id > > m_ids
wxBoxSizer * m_GridPanelSizer
wxString x_ReportBiosampleUpdate(const string &str, bool &has_error)
CSeq_entry_Handle m_TopSeqEntry
bool IsReadOnlyColumn(string column_name)
void GetSelectedRows(std::set< int > &selected)
biosample_util::TBioSamples m_Cache
void CreateControls()
Creates the controls and sizers.
void OnCopyToSampleButtonClick(wxCommandEvent &event)
void x_ReadBioSampleApiKey()
CApplyEditconvertPanel * m_AecrPanel
CCompareWithBiosample()
Constructors.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Compare with Biosample"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX|wxCAPTION|wxCLIP_CHILDREN|wxRESIZE_BORDER)
Creation.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void MakeReport(wxCommandEvent &event)
void SaveSettings() const
void OnClickOk(wxCommandEvent &event)
static bool ShowToolTips()
Should we show tooltips?
void OnOpenFile(wxCommandEvent &event)
string GetFilename() const
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CFileLocDialog()
Constructors.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
static bool ShowToolTips()
Should we show tooltips?
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
bool Create(wxWindow *parent, wxWindowID id=13000, const wxString &caption=_("Select File with BioSample API Key"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void SetText(const wxString &text)
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.
int GetInt(const string &key, int default_val=0) const
retrieve values by section and key.
CJson_Object push_back_object(void)
Add object type element to the end of the array.
Random-access iterator to access const JSON array element.
const_iterator begin(void) const
Return a random-access iterator to the first element in the array.
bool empty(void) const
Test if the array is empty.
const_iterator end(void) const
Return a random-access iterator that points just beyond the end of the array.
bool IsObject(void) const
CJson_ConstObject GetObject(void) const
Get JSON object contents of the node.
CJson_ConstArray GetArray(void) const
Get JSON array contents of the node.
std::string ToString(TJson_Write_Flags flags=fJson_Write_IndentWithSpace, unsigned int indent_char_count=4) const
Convert the contents of the node into string.
CJson_ConstValue GetValue(void) const
Get JSON value contents of the node.
Bidirectional iterator to access const JSON object element.
const CJson_ConstNode value
bool empty(void) const
Test if the object is empty.
const_iterator find(const CJson_Node::TKeyType &name) const
Return an iterator that points to the location of the element.
const_iterator begin(void) const
Return an iterator that points to the first element in the object.
const_iterator end(void) const
Return an iterator that points to the location after the last element.
bool GetBool(void) const
Get primitive value data.
TStringType GetString(void) const
bool ParseString(const TStringType &v)
Read JSON data from a UTF8 string.
bool ReadSucceeded(void) const
Test if the most recent read was successful.
CJson_Object SetObject(void)
Get JSON object contents of the node.
CJson_Array insert_array(const CJson_Node::TKeyType &name)
Insert array type element into the object.
void insert(const CJson_Node::TKeyType &name)
Insert null element into the object.
CJson_Object insert_object(const CJson_Node::TKeyType &name)
Insert object type element into the object.
@OrgMod.hpp User-defined methods of the data storage class.
static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)
class CRegistryReadView provides a nested hierarchical view at a particular key.
string GetString(const string &key, const string &default_val=kEmptyStr) const
void Set(const string &key, int val)
access a named key at this level, with no recursion
void MakeColumnReadOnly(int pos, bool val=true)
void CollapseByCol(int col)
int GetCollapseColAndExpand(void)
void InitColumnCollapse(int col)
static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
const_iterator begin() const
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator end() const
static const int chunk_size
static const char * kRegPath
static const char * kApiKeyPath
#define ID_COPY_TO_SAMPLE
#define ID_CREATE_BIOSAMPLE
#define ID_UPDATE_BIOSOURCE
#define ID_FILELOCTEXTCTRL
#define ID_REFRESH_BIOSAMPLE
#define ID_COPY_TO_SOURCE
#define ID_APIKEY_BIOSAMPLE
const char * kSequenceIdColLabel
static const char * str(char *buf, int n)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
CNcbiIstream & ContentStream(void) const
Get input stream.
int GetStatusCode(void) const
Get response status code.
void SetValue(CHeaderNameConverter name, CTempString value)
Remove all existing values with the name, set the new value.
CNcbiIstream & ErrorStream(void) const
Get input stream containing error message (e.g.
CHttpResponse g_HttpPost(const CUrl &url, CTempString data, const CHttpParam ¶m=CHttpParam())
Shortcut for POST request.
static int BestRank(const CRef< CSeq_id > &id)
@ fParse_Default
By default in ParseIDs and IsValid, allow raw parsable non-numeric accessions and plausible local acc...
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
vector< CSeq_id_Handle > TId
CScope & GetScope(void) const
Get scope this handle belongs to.
CSeq_entry_Handle GetSeq_entry_Handle(void) const
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
bool NcbiStreamCopy(CNcbiOstream &os, CNcbiIstream &is)
Copy the entire contents of stream "is" to stream "os".
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
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 bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
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 EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
@ fConvErr_NoThrow
Do not throw an exception on error.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
@ eNocase
Case insensitive compare.
C::value_type FindBestChoice(const C &container, F score_func)
Find the best choice (lowest score) for values in a container.
static const char label[]
void SetSubtype(TSubtype value)
Assign a value to Subtype data member.
const TOrg & GetOrg(void) const
Get the Org member data.
void SetOrg(TOrg &value)
Assign a value to Org data member.
void SetName(const TName &value)
Assign a value to Name data member.
TSubtype & SetSubtype(void)
Assign a value to Subtype data member.
bool IsSetOrgname(void) const
Check if a value has been assigned to Orgname data member.
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
const TOrgname & GetOrgname(void) const
Get the Orgname member data.
const TColumns & GetColumns(void) const
Get the Columns member data.
void SetHeader(THeader &value)
Assign a value to Header data member.
vector< CRef< CSeqTable_column > > TColumns
void SetData(TData &value)
Assign a value to Data data member.
TNum_rows GetNum_rows(void) const
Get the Num_rows member data.
@ eField_id_location_id
location Seq-id
bool IsGenbank(void) const
Check if variant Genbank is selected.
TSource & SetSource(void)
Select the variant.
@ e_Source
source of materials, includes Org-ref
@ eMol_na
just a nucleic acid
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
void ReportUsage(const wxString &dialog_name)
Report opening & accepting events in the editing package.
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
const CharType(& source)[N]
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
wxString GetAbsolutePath(const wxString &localpath)
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