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

Go to the SVN repository for this file.

1 /* $Id: convert_cds_to_misc_feat.cpp 45101 2020-05-29 20:53:24Z asztalos $
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>
31 #include <objmgr/bioseq_handle.hpp>
39 #include <objmgr/util/sequence.hpp>
42 
43 #include <wx/stattext.h>
44 #include <wx/textctrl.h>
45 #include <wx/choice.h>
46 #include <wx/combobox.h>
47 #include <wx/msgdlg.h>
48 #include <wx/statbox.h>
49 
50 
53 
54 /*!
55  * CConvertCdsToMiscFeat type definition
56  */
57 
58 IMPLEMENT_DYNAMIC_CLASS( CConvertCdsToMiscFeat, CBulkCmdDlg )
59 
60 
61 /*!
62  * CConvertCdsToMiscFeat event table definition
63  */
64 
65 BEGIN_EVENT_TABLE( CConvertCdsToMiscFeat, CBulkCmdDlg )
66 
67 ////@begin CConvertCdsToMiscFeat event table entries
69 ////@end CConvertCdsToMiscFeat event table entries
75 
76 
77 /*!
78  * CConvertCdsToMiscFeat constructors
79  */
80 
82 {
83  Init();
84 }
85 
86 CConvertCdsToMiscFeat::CConvertCdsToMiscFeat( wxWindow* parent, IWorkbench* wb, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
87  : CBulkCmdDlg(wb), m_Converter(NULL)
88 {
89  Init();
90  Create(parent, id, caption, pos, size, style);
91 }
92 
93 
94 /*!
95  * CConvertCdsToMiscFeat creator
96  */
97 
98 bool CConvertCdsToMiscFeat::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
99 {
100 ////@begin CConvertCdsToMiscFeat creation
101  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
102  CBulkCmdDlg::Create( parent, id, caption, pos, size, style );
103 
104  CreateControls();
105  if (GetSizer())
106  {
107  GetSizer()->SetSizeHints(this);
108  }
109  Centre();
110 ////@end CConvertCdsToMiscFeat creation
111  return true;
112 }
113 
114 
115 /*!
116  * CConvertCdsToMiscFeat destructor
117  */
118 
120 {
121 ////@begin CConvertCdsToMiscFeat destruction
122 ////@end CConvertCdsToMiscFeat destruction
123 }
124 
125 
126 /*!
127  * Member initialisation
128  */
129 
131 {
132 ////@begin CConvertCdsToMiscFeat member initialisation
135  m_Constraint = NULL;
136  m_OkCancel = NULL;
137 ////@end CConvertCdsToMiscFeat member initialisation
138 }
139 
140 
141 /*!
142  * Control creation for CConvertCdsToMiscFeat
143  */
144 
146 {
147 ////@begin CConvertCdsToMiscFeat content construction
148  CConvertCdsToMiscFeat* itemCBulkCmdDlg1 = this;
149 
150  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
151  itemCBulkCmdDlg1->SetSizer(itemBoxSizer2);
152 
153  wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxHORIZONTAL);
154  itemBoxSizer2->Add(itemBoxSizer10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
155 
156  m_RadioButton = new wxRadioButton( itemCBulkCmdDlg1, ID_CDS_TO_MISCFEAT_RADIOBUTTON, _("misc_feat"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
157  m_RadioButton->SetValue(true);
158  itemBoxSizer10->Add(m_RadioButton, 0, wxALIGN_LEFT|wxALL, 5);
159 
160  wxRadioButton* itemRadioButton9 = new wxRadioButton( itemCBulkCmdDlg1, ID_CDS_TO_MISCFEAT_RADIOBUTTON1, _("pseudogene"));
161  itemRadioButton9->SetValue(false);
162  itemBoxSizer10->Add(itemRadioButton9, 0, wxALIGN_LEFT|wxALL, 5);
163 
164  m_OptionsSizer = new wxFlexGridSizer(0, 3, 0, 0);
165  itemBoxSizer2->Add(m_OptionsSizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
166 
167 
169 
170  if (m_Converter)
171  {
173  {
174  if ((*it)->IsBool())
175  {
176  wxCheckBox* opt = new wxCheckBox( this, wxID_ANY, ToWxString((*it)->GetLabel()), wxDefaultPosition, wxDefaultSize, 0 );
177  m_OptionsSizer->Add(opt, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
178  opt->SetValue((*it)->GetBool()->GetDefaultVal());
179  }
180  }
181  }
182 
183  m_LeaveOriginal = new wxCheckBox( itemCBulkCmdDlg1, wxID_ANY, _("Keep original CDS"), wxDefaultPosition, wxDefaultSize, 0 );
184  m_LeaveOriginal->SetValue(false);
185  itemBoxSizer2->Add(m_LeaveOriginal, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
186 
187  m_AddUnverified = new wxCheckBox( itemCBulkCmdDlg1, wxID_ANY, _("Add Unverified"), wxDefaultPosition, wxDefaultSize, 0 );
188  m_AddUnverified->SetValue(false);
189  itemBoxSizer2->Add(m_AddUnverified, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
190 
191 
192 
193  wxStaticBox* itemStaticBoxSizer7Static = new wxStaticBox(itemCBulkCmdDlg1, wxID_ANY, _("Conditions"));
194  wxStaticBoxSizer* itemStaticBoxSizer7 = new wxStaticBoxSizer(itemStaticBoxSizer7Static, wxVERTICAL);
195  itemBoxSizer2->Add(itemStaticBoxSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
196 
197  wxRadioButton* itemRadioButton10 = new wxRadioButton( itemCBulkCmdDlg1, ID_CDS_TO_MISCFEAT_RADIO_ALL, _("All"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
198  itemRadioButton10->SetValue(true);
199  itemStaticBoxSizer7->Add(itemRadioButton10, 0, wxALIGN_LEFT|wxALL, 5);
200 
201  m_RadioWhere = new wxRadioButton( itemCBulkCmdDlg1, ID_CDS_TO_MISCFEAT_RADIO_WHERE, _("Where"));
202  m_RadioWhere->SetValue(false);
203  itemStaticBoxSizer7->Add(m_RadioWhere, 0, wxALIGN_LEFT|wxALL, 5);
204 
205  m_InternalStop = new wxCheckBox( itemCBulkCmdDlg1, wxID_ANY, _("CDS has internal stop codon"), wxDefaultPosition, wxDefaultSize, 0 );
206  m_InternalStop->SetValue(false);
207  itemStaticBoxSizer7->Add(m_InternalStop, 0, wxALIGN_LEFT|wxALL, 5);
208  m_InternalStop->Disable();
209 
210  m_BadStart = new wxCheckBox( itemCBulkCmdDlg1, wxID_ANY, _("CDS has bad start codon"), wxDefaultPosition, wxDefaultSize, 0 );
211  m_BadStart->SetValue(false);
212  itemStaticBoxSizer7->Add(m_BadStart, 0, wxALIGN_LEFT|wxALL, 5);
213  m_BadStart->Disable();
214 
215  m_BadStop = new wxCheckBox( itemCBulkCmdDlg1, wxID_ANY, _("CDS has bad stop codon"), wxDefaultPosition, wxDefaultSize, 0 );
216  m_BadStop->SetValue(false);
217  itemStaticBoxSizer7->Add(m_BadStop, 0, wxALIGN_LEFT|wxALL, 5);
218  m_BadStop->Disable();
219 
220  m_IsPseudo = new wxCheckBox( itemCBulkCmdDlg1, wxID_ANY, _("CDS is pseudo"), wxDefaultPosition, wxDefaultSize, 0 );
221  m_IsPseudo->SetValue(false);
222  itemStaticBoxSizer7->Add(m_IsPseudo, 0, wxALIGN_LEFT|wxALL, 5);
223  m_IsPseudo->Disable();
224 
225  wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxHORIZONTAL);
226  itemStaticBoxSizer7->Add(itemBoxSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
227 
228  m_RadioOr = new wxRadioButton( itemCBulkCmdDlg1, wxID_ANY, _("Or"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
229  m_RadioOr->SetValue(true);
230  itemBoxSizer8->Add(m_RadioOr, 0, wxALIGN_LEFT|wxALL, 5);
231  m_RadioOr->Disable();
232 
233  m_RadioAnd = new wxRadioButton( itemCBulkCmdDlg1, wxID_ANY, _("And"));
234  m_RadioAnd->SetValue(false);
235  itemBoxSizer8->Add(m_RadioAnd, 0, wxALIGN_LEFT|wxALL, 5);
236  m_RadioAnd->Disable();
237 
238  wxStaticBox* itemStaticBoxSizer8Static = new wxStaticBox(itemCBulkCmdDlg1, wxID_ANY, _("Comment Format"));
239  wxStaticBoxSizer* itemStaticBoxSizer8 = new wxStaticBoxSizer(itemStaticBoxSizer8Static, wxVERTICAL);
240  itemBoxSizer2->Add(itemStaticBoxSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
241 
242  m_RadioSimilar = new wxRadioButton( itemCBulkCmdDlg1, wxID_ANY, _("similar to X"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
243  m_RadioSimilar->SetValue(true);
244  itemStaticBoxSizer8->Add(m_RadioSimilar, 0, wxALIGN_LEFT|wxALL, 5);
245 
246  m_RadioNonfunctional = new wxRadioButton( itemCBulkCmdDlg1, wxID_ANY, _("nonfunctional X due to mutation"));
247  m_RadioNonfunctional->SetValue(false);
248  itemStaticBoxSizer8->Add(m_RadioNonfunctional, 0, wxALIGN_LEFT|wxALL, 5);
249 
251  m_Constraint = new CConstraintPanel( itemCBulkCmdDlg1, m_TopSeqEntry);
252  itemBoxSizer2->Add(m_Constraint, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
253 
256 
257  m_OkCancel = new COkCancelPanel( itemCBulkCmdDlg1, wxID_ANY, wxDefaultPosition, wxSize(100, 100), 0 );
258  itemBoxSizer2->Add(m_OkCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
259 
260 ////@end CConvertCdsToMiscFeat content construction
261 }
262 
263 void CConvertCdsToMiscFeat::OnChoiceChanged( wxCommandEvent& event )
264 {
265  if (m_RadioButton->GetValue())
267  else
269 }
270 
271 void CConvertCdsToMiscFeat::OnConditionChanged( wxCommandEvent& event )
272 {
273  if (m_RadioWhere->GetValue())
274  {
275  m_InternalStop->Enable();
276  m_BadStart->Enable();
277  m_BadStop->Enable();
278  m_IsPseudo->Enable();
279  m_RadioOr->Enable();
280  m_RadioAnd->Enable();
281  }
282  else
283  {
284  m_InternalStop->Disable();
285  m_BadStart->Disable();
286  m_BadStop->Disable();
287  m_IsPseudo->Disable();
288  m_RadioOr->Disable();
289  m_RadioAnd->Disable();
290  }
291 }
292 
293 /*!
294  * Should we show tooltips?
295  */
296 
298 {
299  return true;
300 }
301 
302 /*!
303  * Get bitmap resources
304  */
305 
306 wxBitmap CConvertCdsToMiscFeat::GetBitmapResource( const wxString& name )
307 {
308  // Bitmap retrieval
309 ////@begin CConvertCdsToMiscFeat bitmap retrieval
310  wxUnusedVar(name);
311  return wxNullBitmap;
312 ////@end CConvertCdsToMiscFeat bitmap retrieval
313 }
314 
315 /*!
316  * Get icon resources
317  */
318 
319 wxIcon CConvertCdsToMiscFeat::GetIconResource( const wxString& name )
320 {
321  // Icon retrieval
322 ////@begin CConvertCdsToMiscFeat icon retrieval
323  wxUnusedVar(name);
324  return wxNullIcon;
325 ////@end CConvertCdsToMiscFeat icon retrieval
326 }
327 
328 
330 {
332 
334  m_ErrorMessage = "You must select a supported conversion function.";
335  return cmd;
336  }
337 
338  x_SetOptions();
339 
340  string field_name = "CDS " + kPartialStart;
341  CRef<CMiscSeqTableColumn> col(new CMiscSeqTableColumn(field_name));
342 
343 
344  CFieldNamePanel* constraint_field_panel = m_Constraint->GetFieldNamePanel();
345  string constraint_field;
346  string constraint_field_type = m_Constraint->GetFieldType();
347  if (constraint_field_panel)
348  constraint_field = constraint_field_panel->GetFieldName();
349 
350  if (NStr::IsBlank(constraint_field)) {
351  constraint_field = constraint_field_type;
352  } else {
353  if (NStr::StartsWith(constraint_field_type, "RNA") && NStr::Find(constraint_field, "RNA") == NPOS ) {
354  constraint_field = "RNA " + constraint_field;
355  }
356  }
358 
359  vector<CConstRef<CObject> > objs;
360 
361  objs = col->GetObjects(m_TopSeqEntry, constraint_field, string_constraint);
362 
363  if (objs.empty())
364  {
365  m_ErrorMessage = "No features found!";
366  return cmd;
367  }
368 
369  bool any_change = false;
370  set<CSeq_entry_Handle> already_done;
371 
372  cmd.Reset(new CCmdComposite("Convert CDS to misc_feat or pseudogene"));
373  ITERATE(vector<CConstRef<CObject> >, it, objs)
374  {
375  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
376 
377  if (f->IsSetExcept_text() && NStr::Find(f->GetExcept_text(), "RNA editing") != string::npos)
378  {
379  continue;
380  }
381 
382  if ( m_RadioWhere->GetValue() )
383  {
384  bool is_pseudo = f->IsSetPseudo() && f->GetPseudo();
385  bool internal_stop, bad_start, bad_stop;
386  DetectStartStopCodons(f, internal_stop, bad_start, bad_stop);
387  bool go = false;
388  if (m_RadioOr->GetValue())
389  {
390  go = ( m_InternalStop->GetValue() && internal_stop ) ||
391  ( m_BadStart->GetValue() && bad_start ) ||
392  ( m_BadStop->GetValue() && bad_stop ) ||
393  ( m_IsPseudo->GetValue() && is_pseudo );
394  }
395  else
396  {
397  go = ( !m_InternalStop->GetValue() || internal_stop ) &&
398  ( !m_BadStart->GetValue() || bad_start ) &&
399  ( !m_BadStop->GetValue() || bad_stop ) &&
400  ( !m_IsPseudo->GetValue() || is_pseudo );
401  }
402  if (!go || ( !m_InternalStop->GetValue() && !m_BadStart->GetValue() && !m_BadStop->GetValue() && !m_IsPseudo->GetValue() ))
403  continue;
404  }
405 
406  if (m_AddUnverified->GetValue())
407  {
408  CScope &scope = m_TopSeqEntry.GetScope();
409  if (f && f->IsSetLocation())
410  {
411  CBioseq_Handle bsh = scope.GetBioseqHandle(f->GetLocation());
412  if (bsh)
413  {
415  if (seh && already_done.find(seh) == already_done.end())
416  {
417  already_done.insert(seh);
418  CRef<CUser_object> user(new CUser_object());
420  user->AddUnverifiedFeature();
421  CRef<objects::CSeqdesc> new_desc( new objects::CSeqdesc );
422  new_desc->SetUser(*user);
423  cmd->AddCommand( *CRef<CCmdCreateDesc>(new CCmdCreateDesc(seh, *new_desc)) );
424  }
425  }
426  }
427  }
428  CConvertCDSToMiscFeat *conv_miscfeat = dynamic_cast<CConvertCDSToMiscFeat *>(m_Converter.GetPointer());
429  if (conv_miscfeat)
430  {
431  conv_miscfeat->SetSimilar(m_RadioSimilar->GetValue());
432  conv_miscfeat->SetNonfunctional(m_RadioNonfunctional->GetValue());
433  CRef<CConversionOption> opt = conv_miscfeat->FindRemoveTranscriptId();
434  if (opt) {
435  opt->SetBool()->SetVal(true);
436  }
437  }
438  CRef<CCmdComposite> subcmd = m_Converter->Convert(*f, m_LeaveOriginal->GetValue(), m_TopSeqEntry.GetScope());
439  if (subcmd)
440  {
441  cmd->AddCommand(*subcmd);
442  any_change = true;
443  }
444  }
445 
446  if (!any_change)
447  {
448  m_ErrorMessage = "All conversions failed.";
449  cmd.Reset(NULL);
450  }
451  return cmd;
452 }
453 
454 void CConvertCdsToMiscFeat::DetectStartStopCodons(const CSeq_feat* f, bool &stop_codon_present, bool &bad_start_codon, bool &bad_stop_codon)
455 {
456  stop_codon_present = false;
457  bad_start_codon = false;
458  bad_stop_codon = false;
459  if (f->GetData().IsCdregion())
460  {
461  string prot_seq;
462  bool altst;
463  CSeqTranslator::Translate(*f, m_TopSeqEntry.GetScope(), prot_seq, true, false, &altst);
464  size_t pos = NStr::Find(prot_seq,"*");
465  if (pos != NPOS && pos < prot_seq.length()-1)
466  stop_codon_present = true;
467  bool partial5 = f->GetLocation().IsPartialStart(eExtreme_Biological);
468  if (!partial5 && prot_seq[0] != 'M')
469  bad_start_codon = true;
470  bool partial3 = f->GetLocation().IsPartialStop(eExtreme_Biological);
471  if (!partial3 && prot_seq[prot_seq.length()-1] != '*')
472  bad_stop_codon = true;
473  }
474 }
475 
476 
478 {
479  return m_ErrorMessage;
480 }
481 
483 {
484  UpdateChildrenFeaturePanels(this->GetSizer());
485 }
486 
488 {
489  if (!m_Converter) {
490  return;
491  }
492  size_t option_pos = 0;
494  for (size_t pos = 0; pos < m_OptionsSizer->GetItemCount() && option_pos < options.size(); pos++) {
495  wxWindow* w = m_OptionsSizer->GetItem(pos)->GetWindow();
496  wxCheckBox* checkbox = dynamic_cast<wxCheckBox*>(w);
497  if (checkbox) {
498  if (options[option_pos]->IsBool()) {
499  options[option_pos]->SetBool()->SetVal(checkbox->GetValue());
500  }
501  option_pos++;
502  } else {
503  wxTextCtrl* val = dynamic_cast<wxTextCtrl*>(w);
504  if (val) {
505  if (options[option_pos]->IsString()) {
506  options[option_pos]->SetString()->SetVal(ToStdString(val->GetValue()));
507  }
508  option_pos++;
509  } else {
510  wxComboBox* combo = dynamic_cast<wxComboBox*>(w);
511  if (combo) {
512  if (options[option_pos]->IsString()) {
513  options[option_pos]->SetString()->SetVal(ToStdString(combo->GetStringSelection()));
514  }
515  option_pos++;
516  } else {
517  wxChoice* choice = dynamic_cast<wxChoice*>(w);
518  if (choice) {
519  if (options[option_pos]->IsString()) {
520  options[option_pos]->SetString()->SetVal(ToStdString(choice->GetStringSelection()));
521  }
522  option_pos++;
523  }
524  }
525  }
526  }
527 
528  }
529 }
530 
531 
532 void CConvertCdsToMiscFeat::ApplyToAllAndDie(bool similar, bool nonfunctional, bool unverified)
533 {
535  m_RadioWhere->SetValue(true);
536  m_RadioOr->SetValue(true);
537  m_InternalStop->SetValue(true);
538  m_BadStart->SetValue(false);
539  m_BadStop->SetValue(false);
540  m_IsPseudo->SetValue(false);
541  m_RadioSimilar->SetValue(similar);
542  m_RadioNonfunctional->SetValue(nonfunctional);
543  m_AddUnverified->SetValue(unverified);
544 
547  if (cmd)
548  {
550  }
551  Destroy();
552 }
553 
554 
@ eExtreme_Biological
5' and 3'
Definition: Na_strand.hpp:62
CBioseq_Handle –.
objects::CSeq_entry_Handle m_TopSeqEntry
bool Create(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxFrameNameStr)
string m_ErrorMessage
bool GetTopLevelSeqEntryAndProcessor()
ICommandProccessor * m_CmdProccessor
void UpdateChildrenFeaturePanels(wxSizer *sizer)
void SetSelection(int page)
string GetFieldType(void) const
CFieldNamePanel * GetFieldNamePanel(void)
CStringConstraintPanel * GetStringConstraintPanel()
CRef< edit::CStringConstraint > GetStringConstraint(void)
void SetNonfunctional(bool f)
CRef< CConvertFeatureBase > m_Converter
void ApplyToAllAndDie(bool similar, bool nonfunctional, bool unverified)
virtual CRef< CCmdComposite > GetCommand()
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void ProcessUpdateFeatEvent(wxCommandEvent &event)
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
void DetectStartStopCodons(const CSeq_feat *f, bool &stop_codon_present, bool &bad_start_codon, bool &bad_stop_codon)
bool Create(wxWindow *parent, wxWindowID id=10147, const wxString &caption=_("Convert CDS to Misc Features"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnChoiceChanged(wxCommandEvent &event)
static bool ShowToolTips()
Should we show tooltips?
void OnConditionChanged(wxCommandEvent &event)
virtual CRef< CCmdComposite > Convert(const objects::CSeq_feat &orig, bool keep_orig, objects::CScope &scope)
TOptions & SetOptions()
const TOptions & GetOptions() const
virtual string GetDescription()
CRef< CConversionOption > FindRemoveTranscriptId()
vector< CRef< CConversionOption > > TOptions
virtual string GetFieldName(const bool subfield=false)=0
Returns the name of the field as selected in the panel.
vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
CScope –.
Definition: scope.hpp:92
CSeq_entry_Handle –.
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
void SetStringSelection(const wxString &str)
void SetObjectType(EObjectType obj_type)
void AddUnverifiedFeature()
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
iterator_bool insert(const value_type &val)
Definition: set.hpp:149
const_iterator find(const key_type &key) const
Definition: set.hpp:137
const_iterator end() const
Definition: set.hpp:136
USING_SCOPE(objects)
#define ID_CDS_TO_MISCFEAT_RADIOBUTTON
#define ID_CDS_TO_MISCFEAT_RADIOBUTTON1
#define ID_CDS_TO_MISCFEAT_RADIO_WHERE
#define ID_CDS_TO_MISCFEAT_RADIO_ALL
static const string kConversionNotSupported
#define _(proto)
Definition: ct_nlmzip_i.h:78
const string kPartialStart
#define EVT_UPDATE_FEATURE_LIST(id, fn)
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
static void Init(void)
Definition: cursor6.c:76
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
static void Translate(const string &seq, string &prot, const CGenetic_code *code, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=NULL, bool is_5prime_complete=true, bool is_3prime_complete=true)
Translate a string using a specified genetic code.
Definition: sequence.cpp:4095
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
#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 bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106
#define NPOS
Definition: ncbistr.hpp:133
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.
Definition: ncbistr.cpp:2891
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
Definition: ncbistr.hpp:5412
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.
Definition: ncbistr.hpp:5384
END_EVENT_TABLE()
const struct ncbi::grid::netcache::search::fields::SIZE size
double f(double x_, const double &y_)
Definition: njn_root.hpp:188
static static static wxID_ANY
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
Modified on Tue Apr 23 07:37:46 2024 by modify_doxy.py rev. 669887