NCBI C++ ToolKit
remove_sequences.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: remove_sequences.cpp 47479 2023-05-02 13:24:02Z ucko $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Igor Filippov
27  */
28 
29 
30 #include <ncbi_pch.hpp>
32 
33 #include <objmgr/seq_entry_ci.hpp>
34 #include <objmgr/bioseq_ci.hpp>
35 #include <objmgr/feat_ci.hpp>
36 #include <objmgr/util/sequence.hpp>
39 
46 
47 #include <objects/seq/MolInfo.hpp>
48 
49 #include <wx/listctrl.h>
50 #include <wx/hyperlink.h>
51 
54 
55 IMPLEMENT_DYNAMIC_CLASS( CRemoveSequencesDlg, wxDialog )
56 
57 BEGIN_EVENT_TABLE( CRemoveSequencesDlg, wxDialog )
64 
65 CRemoveSequencesDlg::CRemoveSequencesDlg( wxWindow* parent, objects::CSeq_entry_Handle seh, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style)
66 {
67  if (seh)
68  {
69  objects::CBioseq_CI b_iter(seh, objects::CSeq_inst::eMol_na);
70  for ( ; b_iter ; ++b_iter ) {
71  m_Seqs.push_back(*b_iter);
72  }
73  }
74  Init();
75  Create(parent, id, caption, pos, size, style);
76 }
77 
79 {
80  CRemoveSequencesDlg* itemPanel1 = this;
81 
82  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
83  itemPanel1->SetSizer(itemBoxSizer2);
84 
85  wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
86  itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
87 
88  m_ListCtrl1 = new wxListCtrl( itemPanel1, wxID_ANY, wxDefaultPosition, wxSize(400, 320), wxLC_REPORT|wxLC_NO_HEADER );
89  itemBoxSizer3->Add(m_ListCtrl1, 1, wxGROW|wxALL, 5);
90  m_ListCtrl1->InsertColumn(0,wxEmptyString);
91 
92  m_ListCtrl2 = new wxListCtrl( itemPanel1, wxID_ANY, wxDefaultPosition, wxSize(400, 320), wxLC_REPORT|wxLC_NO_HEADER );
93  itemBoxSizer3->Add(m_ListCtrl2, 1, wxGROW|wxALL, 5);
94  m_ListCtrl2->InsertColumn(0,wxEmptyString);
95  wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
96  itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
97 
98  wxButton* itemButton1 = new wxButton( itemPanel1, ID_REMOVE_SEQ_LEFT, _("<<<"), wxDefaultPosition, wxDefaultSize, 0 );
99  itemBoxSizer4->Add(itemButton1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
100 
101  wxButton* itemButton2 = new wxButton( itemPanel1, ID_REMOVE_SEQ_RIGHT, _(">>>"), wxDefaultPosition, wxDefaultSize, 0 );
102  itemBoxSizer4->Add(itemButton2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
103 
104  wxBoxSizer* itemBoxSizer17 = new wxBoxSizer(wxHORIZONTAL);
105  itemBoxSizer2->Add(itemBoxSizer17, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
106 
107  wxStaticText* itemStaticText4 = new wxStaticText( itemPanel1, wxID_STATIC, _("Seq-id"), wxDefaultPosition, wxDefaultSize, 0 );
108  itemBoxSizer17->Add(itemStaticText4, 0, wxALIGN_TOP|wxALL, 5);
109 
110  m_StringConstraintPanel = new CStringConstraintPanel( itemPanel1, false, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
111  itemBoxSizer17->Add(m_StringConstraintPanel, 0, wxALIGN_TOP|wxALL|wxFIXED_MINSIZE, 0);
113 
114  wxFlexGridSizer* itemFlexGridSizer5 = new wxFlexGridSizer(0, 2, 0, 0);
115  itemBoxSizer2->Add(itemFlexGridSizer5, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
116 
117  wxStaticText* itemStaticText5 = new wxStaticText( itemPanel1, wxID_STATIC, _("Select sequences longer than"), wxDefaultPosition, wxDefaultSize, 0 );
118  itemFlexGridSizer5->Add(itemStaticText5, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
119 
120  m_Min = new wxTextCtrl(itemPanel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0);
121  itemFlexGridSizer5->Add(m_Min, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP|wxBOTTOM, 5);
122 
123  wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("Select sequences less than"), wxDefaultPosition, wxDefaultSize, 0 );
124  itemFlexGridSizer5->Add(itemStaticText6, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL |wxALL, 5);
125 
126  m_Max = new wxTextCtrl( itemPanel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0 );
127  itemFlexGridSizer5->Add(m_Max, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, 5);
128 
129  wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
130  itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);
131 
132  wxButton* itemButton13 = new wxButton(itemPanel1, ID_REMOVE_SEQ_SELECT, _("Select"), wxDefaultPosition, wxDefaultSize, 0);
133  itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
134 
135  wxButton* itemButton14 = new wxButton(itemPanel1, ID_REMOVE_SEQ_SELECT_ALL, _("Select All"), wxDefaultPosition, wxDefaultSize, 0);
136  itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
137 
138  wxButton* itemButton15 = new wxButton(itemPanel1, ID_REMOVE_SEQ_UNSELECT_ALL, _("Unselect All"), wxDefaultPosition, wxDefaultSize, 0);
139  itemBoxSizer12->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
140 
141  wxBoxSizer* itemBoxSizer16 = new wxBoxSizer(wxHORIZONTAL);
142  itemBoxSizer2->Add(itemBoxSizer16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
143 
144  wxButton* itemButton16 = new wxButton( itemPanel1, wxID_OK, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
145  itemBoxSizer16->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
146 
147  wxButton* itemButton17 = new wxButton( itemPanel1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
148  itemBoxSizer16->Add(itemButton17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
149 
150  wxHyperlinkCtrl* itemHyperlinkCtrl = new wxHyperlinkCtrl( itemPanel1, wxID_HELP, _("Help"), wxT("https://www.ncbi.nlm.nih.gov/tools/gbench/manual9/#remove-sequences"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
151  itemHyperlinkCtrl->SetForegroundColour(wxColour(192, 192, 192));
152  itemBoxSizer16->Add(itemHyperlinkCtrl, 0, wxALIGN_CENTER_VERTICAL, 5);
153 
154  UpdateList();
155 }
156 
157 void CRemoveSequencesDlg::CombineLabels(const CSeq_id &id, vector<string> &labels)
158 {
159  if (id.IsGenbank() && id.GetGenbank().IsSetAccession())
160  labels[0] = id.GetGenbank().GetAccession();
161  if (id.IsGeneral() && id.GetGeneral().IsSetTag() && id.GetGeneral().GetTag().IsStr())
162  labels[1] = id.GetGeneral().GetTag().GetStr();
163  if (id.IsGeneral() && id.GetGeneral().IsSetTag() && id.GetGeneral().GetTag().IsId())
164  labels[2] = NStr::IntToString(id.GetGeneral().GetTag().GetId());
165  if (id.IsLocal() && id.GetLocal().IsStr())
166  labels[3] = id.GetLocal().GetStr();
167  string label;
168  id.GetLabel(&label, CSeq_id::eContent);
169  if (labels[0].empty() && labels[1].empty() && labels[2].empty() && labels[3].empty())
170  labels.push_back(label);
171 }
172 
174 {
175  vector<string> labels(5);
176  if (seh.IsSeq())
177  {
178  if (seh.GetSeq().IsSetId())
179  for (CBioseq_Handle::TId::const_iterator it = seh.GetSeq().GetId().begin(); it != seh.GetSeq().GetId().end(); ++it)
180  CombineLabels(*(it->GetSeqId()),labels);
181 
182  }
183  else if (seh.IsSet() && seh.GetSet().IsSetClass() && seh.GetSet().GetClass() == CBioseq_set::eClass_nuc_prot
185  {
186  for (CBioseq::TId::const_iterator it = seh.GetSet().GetCompleteBioseq_set()->GetNucFromNucProtSet().GetId().begin(); it != seh.GetSet().GetCompleteBioseq_set()->GetNucFromNucProtSet().GetId().end(); ++it)
187  CombineLabels(**it,labels);
188  }
189 
190  for (int i=0; i<labels.size(); i++)
191  if (!labels[i].empty())
192  strs.push_back(labels[i]);
193 }
194 
196 {
197  list<string> strs;
198  CollectLabels(seh,strs);
199  TSeqPos length = seh.GetSeq().GetBioseqLength();
200  strs.push_back("("+NStr::IntToString(length)+")");
201  string label = NStr::Join(strs," ");
202  return label;
203 }
204 
206 {
207  if (id.IsGenbank() && id.GetGenbank().IsSetAccession())
208  labels.insert(id.GetGenbank().GetAccession());
209  if (id.IsGeneral() && id.GetGeneral().IsSetDb() && id.GetGeneral().GetDb() == "BankIt" && id.GetGeneral().IsSetTag() && id.GetGeneral().GetTag().IsStr())
210  {
211  labels.insert(id.GetGeneral().GetTag().GetStr());
212  labels.insert("BankIt" + id.GetGeneral().GetTag().GetStr());
213  string first, second;
214  NStr::SplitInTwo(id.GetGeneral().GetTag().GetStr(), "/", first, second);
215  labels.insert(first);
216  labels.insert("BankIt" + first);
217  }
218  if (id.IsGeneral() && id.GetGeneral().IsSetDb() && id.GetGeneral().GetDb() == "NCBIFILE" && id.GetGeneral().IsSetTag() && id.GetGeneral().GetTag().IsStr())
219  {
220  labels.insert(id.GetGeneral().GetTag().GetStr());
221  labels.insert("NCBIFILE" + id.GetGeneral().GetTag().GetStr());
222  }
223  if (id.IsGeneral() && id.GetGeneral().IsSetTag() && id.GetGeneral().GetTag().IsStr())
224  labels.insert(id.GetGeneral().GetTag().GetStr());
225  if (id.IsGeneral() && id.GetGeneral().IsSetTag() && id.GetGeneral().GetTag().IsId())
226  labels.insert(NStr::IntToString(id.GetGeneral().GetTag().GetId()));
227  if (id.IsLocal() && id.GetLocal().IsStr())
228  labels.insert(id.GetLocal().GetStr());
229  string label;
230  id.GetLabel(&label, CSeq_id::eContent);
231  labels.insert(label);
232 }
233 
235 {
236  if (seh.IsSeq())
237  {
238  if (seh.GetSeq().IsSetId())
239  for (CBioseq_Handle::TId::const_iterator it = seh.GetSeq().GetId().begin(); it != seh.GetSeq().GetId().end(); ++it)
240  CombineLabelsAll(*(it->GetSeqId()), strs);
241 
242  }
243  else if (seh.IsSet() && seh.GetSet().IsSetClass() && seh.GetSet().GetClass() == CBioseq_set::eClass_nuc_prot
245  {
246  for (CBioseq::TId::const_iterator it = seh.GetSet().GetCompleteBioseq_set()->GetNucFromNucProtSet().GetId().begin(); it != seh.GetSet().GetCompleteBioseq_set()->GetNucFromNucProtSet().GetId().end(); ++it)
247  CombineLabelsAll(**it,strs);
248  }
249 }
250 
252 {
253  set<string> strs;
254  CollectLabelsAll(seh,strs);
255  vector<string> vec(strs.begin(), strs.end());
256  return constraint->DoesListMatch(vec);
257 }
258 
259 
261 {
262  m_ListCtrl1->DeleteAllItems();
263  m_ListCtrl2->DeleteAllItems();
264  for (set<int>::const_iterator k = m_Selected.begin(); k != m_Selected.end(); ++k)
265  {
266  int i = *k;
268  string label = GetLabel(seh);
269  long item = m_ListCtrl2->GetItemCount();
270  item = m_ListCtrl2->InsertItem(item,ToWxString(label));
271  m_ListCtrl2->SetItemData(item,i);
272  }
273  m_Available.clear();
274  size_t set_size = GetSetSize();
275  for (unsigned int i=0; i<set_size; ++i)
276  if (m_Selected.find(i) == m_Selected.end())
277  {
278  m_Available.push_back(i);
280  string label = GetLabel(seh);
281  long item = m_ListCtrl1->GetItemCount();
282  item = m_ListCtrl1->InsertItem(item,ToWxString(label));
283  m_ListCtrl1->SetItemData(item,i);
284  }
285  m_ListCtrl1->SetColumnWidth(0, wxLIST_AUTOSIZE);
286  m_ListCtrl2->SetColumnWidth(0, wxLIST_AUTOSIZE);
287 }
288 
289 void CRemoveSequencesDlg::OnButtonMoveRight( wxCommandEvent& event )
290 {
291  long item = -1;
292  for ( ;; )
293  {
294  item = m_ListCtrl1->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
295  if ( item == -1 ) break;
296  int i = static_cast<int>(m_ListCtrl1->GetItemData(item));
298  }
299  UpdateList();
300 }
301 
302 void CRemoveSequencesDlg::OnButtonMoveLeft( wxCommandEvent& event )
303 {
304  long item = -1;
305  for ( ;; )
306  {
307  item = m_ListCtrl2->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
308  if ( item == -1 ) break;
309  int i = static_cast<int>(m_ListCtrl2->GetItemData(item));
310  m_Selected.erase(i);
311  }
312 
313  UpdateList();
314 }
315 
316 
317 void CRemoveSequencesDlg::OnSelectAll( wxCommandEvent& event )
318 {
319  size_t set_size = GetSetSize();
320  for (unsigned int i=0; i<set_size; ++i)
321  {
323  }
324  UpdateList();
325 }
326 
327 void CRemoveSequencesDlg::OnUnselectAll( wxCommandEvent& event )
328 {
329  m_Selected.clear();
330  UpdateList();
331 }
332 
333 void CRemoveSequencesDlg::OnSelect( wxCommandEvent& event )
334 {
335  long min_length = -1;
336  long max_length = LONG_MAX;
337  bool min_num = m_Min->GetValue().ToLong(&min_length);
338  bool max_num = m_Max->GetValue().ToLong(&max_length);
340 
341  if ( !min_num && !max_num && !constraint)
342  return;
343 
344  for(vector<int>::iterator j = m_Available.begin(); j != m_Available.end(); ++j)
345  {
346  int i = *j;
348 
349  TSignedSeqPos length = -1;
350  if (seh.IsSeq())
351  length = seh.GetSeq().GetBioseqLength();
352  else if (seh.IsSet() && seh.GetSet().IsSetClass() && seh.GetSet().GetClass() == CBioseq_set::eClass_nuc_prot
354  {
356  }
357  if (length == -1)
358  continue;
359 
360  if (constraint)
361  {
362  if (MatchConstraint(constraint,seh))
364  }
365  else if (min_num || max_num)
366  {
367  if (length > min_length && length < max_length)
369  }
370  }
371 
372  UpdateList();
373 }
374 
376 {
377  m_ListCtrl1 = NULL;
378  m_ListCtrl2 = NULL;
379 }
380 
381 
382 bool CRemoveSequencesDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style)
383 {
384  wxDialog::Create( parent, id, caption, pos, size, style );
385  CreateControls();
386  if (GetSizer())
387  {
388  GetSizer()->SetSizeHints(this);
389  }
390  Centre();
391  return true;
392 }
393 
395 {
396  CRef<CCmdComposite> cmd( new CCmdComposite("Remove Sequences") );
397  string msg;
398  try {
399  for (set<int>::iterator j = m_Selected.begin(); j != m_Selected.end(); ++j)
400  {
401  CBioseq_Handle bsh = m_Seqs[*j];
402  cmd->AddCommand(*GetDeleteSequenceCommand(bsh));
404  string name;
405  best_idh.GetSeqId()->GetLabel(&name, CSeq_id::eContent);
406  msg += name + "\n";
407  }
408  }
409  catch (const CException& e) {
410  NcbiMessageBox(e.GetMsg());
411  return CRef<CCmdComposite>();
412  }
413 
414  if (!msg.empty())
415  {
416  CGenericReportDlg* report = new CGenericReportDlg(GetParent());
417  report->SetTitle(wxT("Bioseqs Removed"));
418  report->SetText(wxString(msg));
419  report->Show(true);
420  }
421 
422  return cmd;
423 }
424 
425 
427 {
428  for (int i = 0; i < m_Seqs.size(); i++) {
429  if (m_Seqs[i] == bsh) {
430  if (m_Selected.find(i) == m_Selected.end()) {
432  }
433  break;
434  }
435  }
436  UpdateList();
437 }
438 
439 
441 {
442  CRef<CCmdComposite> cmd( new CCmdComposite("Remove Proteins and renormalize nuc-prot sets") );
443  if (seh)
444  {
445  objects::CBioseq_CI b_iter(seh, objects::CSeq_inst::eMol_aa);
446  for ( ; b_iter ; ++b_iter ) {
447  CBioseq_Handle bsh = *b_iter;
448  cmd->AddCommand(*CRef<CCmdDelBioseqInst>(new CCmdDelBioseqInst(bsh)));
449  }
450  }
451  return cmd;
452 }
453 
455 {
456  CRef<CCmdComposite> cmd( new CCmdComposite("Just Remove Proteins") );
457  if (seh)
458  {
459  objects::CBioseq_CI b_iter(seh, objects::CSeq_inst::eMol_aa);
460  for ( ; b_iter ; ++b_iter )
461  {
462  CBioseq_Handle bsh = *b_iter;
463  cmd->AddCommand(*CRef<CCmdDelBioseq>(new CCmdDelBioseq(bsh)));
464  }
465  }
466  return cmd;
467 }
468 
470 {
471  CRef<CCmdComposite> cmd( new CCmdComposite("Remove Orphaned Proteins") );
472  if (seh)
473  {
474  set<CBioseq_Handle> proteins;
476  {
477  if (!fi->IsSetProduct())
478  continue;
479  CBioseq_Handle prot_bsh = fi->GetScope().GetBioseqHandle(fi->GetProduct());
480  if (prot_bsh.IsProtein())
481  {
482  proteins.insert(prot_bsh);
483  }
484  }
485  objects::CBioseq_CI b_iter(seh, objects::CSeq_inst::eMol_aa);
486  for ( ; b_iter ; ++b_iter )
487  {
488  CBioseq_Handle bsh = *b_iter;
489  if (proteins.find(bsh) == proteins.end())
490  {
491  cmd->AddCommand(*CRef<CCmdDelBioseq>(new CCmdDelBioseq(bsh)));
492  }
493  }
494  }
495  return cmd;
496 }
497 
498 
CBioseq_Handle –.
const CBioseq & GetNucFromNucProtSet(void) const
Definition: Bioseq_set.cpp:227
TSeqPos GetLength(void) const
Definition: Bioseq.cpp:360
bool IsSetLength(void) const
Definition: Bioseq.cpp:355
CFeat_CI –.
Definition: feat_ci.hpp:64
void SetText(const wxString &text)
static CRef< CCmdComposite > JustRemoveProteins(objects::CSeq_entry_Handle seh)
static CRef< CCmdComposite > OrphanedProteins(objects::CSeq_entry_Handle seh)
static CRef< CCmdComposite > AndRenormalizeNucProtSets(objects::CSeq_entry_Handle seh)
vector< CBioseq_Handle > m_Seqs
CRef< CCmdComposite > GetCommand()
void OnSelectAll(wxCommandEvent &event)
CSeq_entry_Handle GetSeqEntry(unsigned int i)
void ChooseSequence(CBioseq_Handle bsh)
void OnButtonMoveRight(wxCommandEvent &event)
bool MatchConstraint(CRef< objects::edit::CStringConstraint > constraint, CSeq_entry_Handle seh)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Remove Sequences"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
void CollectLabelsAll(CSeq_entry_Handle seh, set< string > &strs)
void OnUnselectAll(wxCommandEvent &event)
void OnSelect(wxCommandEvent &event)
void CombineLabels(const CSeq_id &id, vector< string > &labels)
string GetLabel(CSeq_entry_Handle seh)
void OnButtonMoveLeft(wxCommandEvent &event)
vector< int > m_Available
void CollectLabels(CSeq_entry_Handle seh, list< string > &strs)
CStringConstraintPanel * m_StringConstraintPanel
void CombineLabelsAll(const CSeq_id &id, set< string > &labels)
CSeq_entry_Handle –.
void SetStringSelection(const wxString &str)
CRef< edit::CStringConstraint > GetStringConstraint()
iterator_bool insert(const value_type &val)
Definition: set.hpp:149
const_iterator begin() const
Definition: set.hpp:135
void clear()
Definition: set.hpp:153
const_iterator find(const key_type &key) const
Definition: set.hpp:137
void erase(iterator pos)
Definition: set.hpp:151
const_iterator end() const
Definition: set.hpp:136
#define _(proto)
Definition: ct_nlmzip_i.h:78
#define wxFIXED_MINSIZE
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:46
static void Init(void)
Definition: cursor6.c:76
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
int TSignedSeqPos
Type for signed sequence position.
Definition: ncbimisc.hpp:887
#define NULL
Definition: ncbistd.hpp:225
const string & GetMsg(void) const
Get message string.
Definition: ncbiexpt.cpp:461
EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)
Definition: message_box.cpp:48
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
Definition: Seq_id.cpp:2040
CConstRef< CSeq_id > GetSeqId(void) const
@ eContent
Untagged human-readable accession or the like.
Definition: Seq_id.hpp:605
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_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
Definition: sequence.hpp:101
TClass GetClass(void) const
TSeqPos GetBioseqLength(void) const
TSet GetSet(void) const
CConstRef< CBioseq_set > GetCompleteBioseq_set(void) const
Return the complete bioseq-set object.
TSeq GetSeq(void) const
bool IsProtein(void) const
bool IsSetClass(void) const
bool IsSet(void) const
bool IsSetId(void) const
const TId & GetId(void) const
bool IsSeq(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Definition: ncbistr.hpp:5084
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
Definition: ncbistr.hpp:2697
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
Definition: ncbistr.cpp:3554
static const char label[]
@ eClass_nuc_prot
nuc acid and coded proteins
Definition: Bioseq_set_.hpp:99
const TId & GetId(void) const
Get the Id member data.
Definition: Bioseq_.hpp:290
bool IsSetId(void) const
equivalent identifiers Check if a value has been assigned to Id data member.
Definition: Bioseq_.hpp:278
END_EVENT_TABLE()
int i
#define wxT(x)
Definition: muParser.cpp:41
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
const CConstRef< CSeq_id > GetAccession(const CSeq_id_Handle &id_handle)
#define fi
USING_SCOPE(objects)
#define ID_REMOVE_SEQ_SELECT_ALL
#define ID_REMOVE_SEQ_RIGHT
#define ID_REMOVE_SEQ_UNSELECT_ALL
#define ID_REMOVE_SEQ_LEFT
#define ID_REMOVE_SEQ_SELECT
static static static wxID_ANY
CRef< CCmdComposite > GetDeleteSequenceCommand(objects::CBioseq_Handle bsh)
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
#define const
Definition: zconf.h:232
Modified on Sat Apr 13 11:49:23 2024 by modify_doxy.py rev. 669887