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

Go to the SVN repository for this file.

1 /* $Id: bulk_edit_feat_dlg_std.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: Colleen Bollin
27  */
28 
29 
30 #include <ncbi_pch.hpp>
32 #include <objmgr/util/feature.hpp>
38 
43 
44 #include <wx/stattext.h>
45 #include <wx/msgdlg.h>
46 #include <wx/display.h>
47 
50 
51 /*!
52  * CBulkEditFeatDlg type definition
53  */
54 
55 IMPLEMENT_DYNAMIC_CLASS( CBulkEditFeatDlg, CBulkCmdDlg )
56 
57 
58 /*!
59  * CBulkEditFeatDlg event table definition
60  */
61 
62 BEGIN_EVENT_TABLE( CBulkEditFeatDlg, CBulkCmdDlg )
63 
64 ////@begin CBulkEditFeatDlg event table entries
65 
67 
68 ////@end CBulkEditFeatDlg event table entries
69 
71 
72 
73 /*!
74  * CBulkEditFeatDlg constructors
75  */
76 
78 {
79  Init();
80 }
81 
82 CBulkEditFeatDlg::CBulkEditFeatDlg( wxWindow* parent, IWorkbench* wb, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
83 {
84  Init();
85  Create(parent, wb, id, caption, pos, size, style);
86  SetRegistryPath("Dialogs.Edit.BulkEditFeature");
87  LoadSettings();
88 }
89 
90 
91 /*!
92  * CBulkEditFeatDlg creator
93  */
94 
95 bool CBulkEditFeatDlg::Create( wxWindow* parent, IWorkbench* wb, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
96 {
97 ////@begin CBulkEditFeatDlg creation
98  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
99  CBulkCmdDlg::Create( parent, wb, id, caption, pos, size, style );
100 
101  CreateControls();
102  if (GetSizer())
103  {
104  GetSizer()->SetSizeHints(this);
105  }
106  Centre();
107 ////@end CBulkEditFeatDlg creation
108  return true;
109 }
110 
111 
112 /*!
113  * CBulkEditFeatDlg destructor
114  */
115 
117 {
118 ////@begin CBulkEditFeatDlg destruction
119  SaveSettings();
120 ////@end CBulkEditFeatDlg destruction
121 }
122 
123 static const char* kFrameWidth = "Frame Width";
124 static const char* kFrameHeight = "Frame Height";
125 static const char* kFramePosX = "Frame Position X";
126 static const char* kFramePosY = "Frame Position Y";
127 
128 void CBulkEditFeatDlg::SetRegistryPath(const string& reg_path)
129 {
130  m_RegPath = reg_path;
131 }
132 
134 {
135  if (m_RegPath.empty())
136  return;
137 
139  CRegistryWriteView view = gui_reg.GetWriteView(m_RegPath);
140 
141  view.Set(kFrameWidth,GetScreenRect().GetWidth());
142  view.Set(kFrameHeight,GetScreenRect().GetHeight());
143  view.Set(kFramePosX,GetScreenPosition().x);
144  view.Set(kFramePosY,GetScreenPosition().y);
145 }
146 
147 
149 {
150  if (m_RegPath.empty())
151  return;
152 
154  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
155 
156  int width = view.GetInt(kFrameWidth, -1);
157  int height = view.GetInt(kFrameHeight, -1);
158  if (width >= 0 && height >= 0)
159  SetSize(wxSize(width,height));
160 
161  int pos_x = view.GetInt(kFramePosX, -1);
162  int pos_y = view.GetInt(kFramePosY, -1);
163 
164  if (pos_x >= 0 && pos_y >= 0)
165  {
166  int max_x = 0;
167  for (auto i = 0; i < wxDisplay::GetCount(); i++) // also see gui/widgets/wx/wx_utils.cpp:CorrectWindowRect() for alternative window position validation
168  {
169  wxDisplay display(i);
170  max_x += display.GetGeometry().GetWidth();
171  }
172  if (pos_x + width > max_x) pos_x = wxGetDisplaySize().GetWidth()-width-5;
173  if (pos_y + height > wxGetDisplaySize().GetHeight()) pos_y = wxGetDisplaySize().GetHeight()-height-5;
174 
175  SetPosition(wxPoint(pos_x,pos_y));
176  }
177 }
178 
179 /*!
180  * Member initialisation
181  */
182 
184 {
185 ////@begin CBulkEditFeatDlg member initialisation
187  m_Constraint = NULL;
188  m_OkCancel = NULL;
189 ////@end CBulkEditFeatDlg member initialisation
190  m_ErrorMessage = "";
191 }
192 
193 
194 /*!
195  * Control creation for CBulkEditFeatDlg
196  */
197 
199 {
200 ////@begin CBulkEditFeatDlg content construction
201  wxBoxSizer* itemBoxSizer1 = new wxBoxSizer(wxVERTICAL);
202  SetSizer(itemBoxSizer1);
203 
204  wxPanel* itemCBulkCmdDlg1 = new wxPanel(this, wxID_ANY);
205  itemBoxSizer1->Add(itemCBulkCmdDlg1, 1, wxGROW, 0);
206 
207  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
208  itemCBulkCmdDlg1->SetSizer(itemBoxSizer2);
209 
210  m_FeatureType = new CFeatureTypePanel( itemCBulkCmdDlg1, ID_EFL_FEATURETYPE, wxDefaultPosition, wxSize(100, 100), wxSIMPLE_BORDER );
211  itemBoxSizer2->Add(m_FeatureType, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
213  if (!m_TopSeqEntry)
214  {
215  NCBI_THROW( CException, eUnknown, "No Top Seq-entry found" );
216  }
219 
220  m_Notebook = new wxNotebook(itemCBulkCmdDlg1, wxID_ANY,wxDefaultPosition,wxDefaultSize);
221  itemBoxSizer2->Add(m_Notebook, 1, wxGROW|wxALL, 5);
222 
223  CEvidencePanel *panel1 = new CEvidencePanel(m_Notebook);
224  m_Notebook->AddPage(panel1,_("Evidence"));
225 
227  m_Notebook->AddPage(panel2,_("Location"));
228 
229  CStrandPanel *panel3 = new CStrandPanel( m_Notebook);
230  m_Notebook->AddPage(panel3,_("Strand"));
231 
232  CRevIntPanel *panel4 = new CRevIntPanel( m_Notebook);
233  m_Notebook->AddPage(panel4,_("Reverse Location Interval Order"));
234 
235  CResyncPanel *panel5 = new CResyncPanel( m_Notebook);
236  m_Notebook->AddPage(panel5,_("Resynchronize Partials"));
237 
238  CPseudoPanel *panel6 = new CPseudoPanel( m_Notebook);
239  m_Notebook->AddPage(panel6,_("Pseudo"));
240 
242  m_Notebook->AddPage(panel7,_("Exceptions"));
243 
245  m_Notebook->AddPage(panel8,_("Experiment"));
246 
248  m_Notebook->AddPage(panel9,_("Inference"));
249 
250  m_Constraint = new CConstraintPanel( itemCBulkCmdDlg1, m_TopSeqEntry);
251  itemBoxSizer2->Add(m_Constraint, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
252 
253  m_OkCancel = new COkCancelPanel( itemCBulkCmdDlg1, ID_EFL_OKCANCEL, wxDefaultPosition, wxSize(100, 100), 0 );
254  itemBoxSizer2->Add(m_OkCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
255 
256 ////@end CBulkEditFeatDlg content construction
257 }
258 
260 {
261  for (CBioseq_CI bioseq_ci(m_TopSeqEntry, CSeq_inst::eMol_na); bioseq_ci; ++bioseq_ci)
262  {
263  CBioseq_Handle bsh = *bioseq_ci;
264  if (bsh && bsh.IsSetId())
265  {
266  for (CBioseq_Handle::TId::const_iterator idh = bsh.GetId().begin(); idh != bsh.GetId().end(); ++idh)
267  {
268  CConstRef<CSeq_id> id = idh->GetSeqId();
269  if (id->IsOther())
270  {
271  return true;
272  }
273  }
274  }
275  break;
276  }
277  return false;
278 }
279 
280 /*!
281  * Should we show tooltips?
282  */
283 
285 {
286  return true;
287 }
288 
289 /*!
290  * Get bitmap resources
291  */
292 
293 wxBitmap CBulkEditFeatDlg::GetBitmapResource( const wxString& name )
294 {
295  // Bitmap retrieval
296 ////@begin CBulkEditFeatDlg bitmap retrieval
297  wxUnusedVar(name);
298  return wxNullBitmap;
299 ////@end CBulkEditFeatDlg bitmap retrieval
300 }
301 
302 /*!
303  * Get icon resources
304  */
305 
306 wxIcon CBulkEditFeatDlg::GetIconResource( const wxString& name )
307 {
308  // Icon retrieval
309 ////@begin CBulkEditFeatDlg icon retrieval
310  wxUnusedVar(name);
311  return wxNullIcon;
312 ////@end CBulkEditFeatDlg icon retrieval
313 }
314 
315 
316 
317 void CBulkEditFeatDlg::ProcessUpdateFeatEvent( wxCommandEvent& event )
318 {
321 }
322 
324 {
325  wxWindowList &slist = win->GetChildren();
326  for (wxWindowList::iterator iter = slist.begin(); iter != slist.end(); ++iter)
327  {
328  wxWindow* child = *iter;
329  CFeatureTypePanel* panel = dynamic_cast<CFeatureTypePanel*>(child);
330  if (panel)
331  {
334  }
335  else
336  {
338  }
339  }
340 }
341 
342 
344 {
345  int sel = editing_type;
346  m_Notebook->SetSelection(sel);
347 }
348 
349 
350 
352 {
353  return m_ErrorMessage;
354 }
355 
357 {
358  CRef<CCmdComposite> cmd(new CCmdComposite("Bulk Feature Edit"));
359 
360  string field_name = m_FeatureType->GetFieldName();
362  string ncRNA_class;
363  subtype = (CSeqFeatData::ESubtype)CorrectForncRNASubtypes(subtype, ncRNA_class);
364 
366  vector<CConstRef<CObject> > objs;
367  for (CFeat_CI feat_ci(m_TopSeqEntry, subtype); feat_ci; ++feat_ci)
368  {
369  CSeq_feat_Handle fh = feat_ci->GetSeq_feat_Handle();
370 
371  bool match = false;
372  CBioseq_Handle bsh;
373  CScope &scope = fh.GetScope();
374 
375  for (CSeq_loc_CI subloc(fh.GetLocation(), objects::CSeq_loc_CI::eEmpty_Skip); subloc; ++subloc)
376  {
377  bsh = scope.GetBioseqHandle(subloc.GetSeq_id());
378  if (bsh)
379  match |= constraint->Match(bsh);
380  }
381  if (match && constraint->Match(fh))
382  {
383  CConstRef<CObject> object;
384  object.Reset(fh.GetOriginalSeq_feat());
385  objs.push_back(object);
386  }
387  }
388 
389 
390  if (objs.size() == 0) {
391  wxMessageBox(wxT("No features found!"), wxT("Error"),
392  wxOK | wxICON_ERROR, NULL);
393  return cmd;
394  }
395 
396  bool any_change(false);
397  int sel = m_Notebook->GetSelection();
398  CBulkFeatEditCmdPanel *win = dynamic_cast<CBulkFeatEditCmdPanel*>(m_Notebook->GetPage(sel));
399  if (win) {
400  any_change = win->AddCommand(objs, cmd, m_TopSeqEntry.GetScope());
401  }
402 
403  if (!any_change) {
404  wxMessageBox(wxT("No effect!"), wxT("Error"),
405  wxOK | wxICON_ERROR, NULL);
406  cmd.Reset(NULL);
407  }
408 
409  return cmd;
410 }
411 
412 
413 
414 // Evidence Panel
415 IMPLEMENT_DYNAMIC_CLASS( CEvidencePanel, wxPanel )
416 
417 
418 /*!
419  * CEvidencePanel event table definition
420  */
421 
422 BEGIN_EVENT_TABLE( CEvidencePanel, wxPanel )
423 
424 ////@begin CEvidencePanel event table entries
425 ////@end CEvidencePanel event table entries
426 
428 
429 
430 /*!
431  * CEvidencePanel constructors
432  */
433 
435 {
436  Init();
437 }
438 
439 CEvidencePanel::CEvidencePanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
440 {
441  Init();
442  Create(parent, id, pos, size, style);
443 }
444 
445 
446 /*!
447  * CEvidencePanel creator
448  */
449 
450 bool CEvidencePanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
451 {
452 ////@begin CEvidencePanel creation
453  wxPanel::Create( parent, id, pos, size, style );
454 
455  CreateControls();
456  if (GetSizer())
457  {
458  GetSizer()->SetSizeHints(this);
459  }
460  Centre();
461 ////@end CEvidencePanel creation
462  return true;
463 }
464 
465 
466 /*!
467  * CEvidencePanel destructor
468  */
469 
471 {
472 ////@begin CEvidencePanel destruction
473 ////@end CEvidencePanel destruction
474 }
475 
476 
477 /*!
478  * Member initialisation
479  */
480 
482 {
483 ////@begin CEvidencePanel member initialisation
484 ////@end CEvidencePanel member initialisation
485 }
486 
487 
488 /*!
489  * Control creation for CEvidencePanel
490  */
491 
493 {
494 ////@begin CEvidencePanel content construction
495  CEvidencePanel* itemPanel1 = this;
496 
497  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
498  itemPanel1->SetSizer(itemBoxSizer2);
499 
500  wxStaticText* text1 = new wxStaticText( itemPanel1, wxID_STATIC, _("Click OK to clear feature evidence"), wxDefaultPosition, wxDefaultSize, 0 );
501  itemBoxSizer2->Add(text1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
502 
503 ////@end CEvidencePanel content construction
504 }
505 
506 
507 /*!
508  * Should we show tooltips?
509  */
510 
512 {
513  return true;
514 }
515 
516 /*!
517  * Get bitmap resources
518  */
519 
520 wxBitmap CEvidencePanel::GetBitmapResource( const wxString& name )
521 {
522  // Bitmap retrieval
523 ////@begin CEvidencePanel bitmap retrieval
524  wxUnusedVar(name);
525  return wxNullBitmap;
526 ////@end CEvidencePanel bitmap retrieval
527 }
528 
529 /*!
530  * Get icon resources
531  */
532 
533 wxIcon CEvidencePanel::GetIconResource( const wxString& name )
534 {
535  // Icon retrieval
536 ////@begin CEvidencePanel icon retrieval
537  wxUnusedVar(name);
538  return wxNullIcon;
539 ////@end CEvidencePanel icon retrieval
540 }
541 
543 {
544  bool any_change(false);
545  ITERATE(vector<CConstRef<CObject> >, it, objs) {
546  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
547  if (f && f->IsSetExp_ev()) {
548  CRef<CObject> new_obj = GetNewObject(*it);
549  CSeq_feat* new_feat = dynamic_cast<CSeq_feat* >(new_obj.GetPointer());
550  new_feat->ResetExp_ev();
551  CRef<CCmdComposite> ecmd = GetReplacementCommand(*it, new_obj, scope, "Clear Evidence");
552  if (ecmd) {
553  cmd->AddCommand(*ecmd);
554  any_change = true;
555  }
556  }
557  }
558  return any_change;
559 }
560 
561 
562 // Location Panel
563 IMPLEMENT_DYNAMIC_CLASS( CBlkEdtFeatLocationPanel, wxPanel )
564 
565 
566 /*!
567  * CBlkEdtFeatLocationPanel event table definition
568  */
569 
570 BEGIN_EVENT_TABLE( CBlkEdtFeatLocationPanel, wxPanel )
571 
572 ////@begin CBlkEdtFeatLocationPanel event table entries
573 ////@end CBlkEdtFeatLocationPanel event table entries
574 
576 
577 
578 /*!
579  * CBlkEdtFeatLocationPanel constructors
580  */
581 
583 {
584  Init();
585 }
586 
587 CBlkEdtFeatLocationPanel::CBlkEdtFeatLocationPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
588 {
589  Init();
590  Create(parent, id, pos, size, style);
591 }
592 
593 
594 /*!
595  * CBlkEdtFeatLocationPanel creator
596  */
597 
598 bool CBlkEdtFeatLocationPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
599 {
600 ////@begin CBlkEdtFeatLocationPanel creation
601  wxPanel::Create( parent, id, pos, size, style );
602 
603  CreateControls();
604  if (GetSizer())
605  {
606  GetSizer()->SetSizeHints(this);
607  }
608  Centre();
609 ////@end CBlkEdtFeatLocationPanel creation
610  return true;
611 }
612 
613 
614 /*!
615  * CBlkEdtFeatLocationPanel destructor
616  */
617 
619 {
620 ////@begin CBlkEdtFeatLocationPanel destruction
621 ////@end CBlkEdtFeatLocationPanel destruction
622 }
623 
624 
625 /*!
626  * Member initialisation
627  */
628 
630 {
631 ////@begin CBlkEdtFeatLocationPanel member initialisation
632 ////@end CBlkEdtFeatLocationPanel member initialisation
633 }
634 
635 
636 /*!
637  * Control creation for CBlkEdtFeatLocationPanel
638  */
639 
641 {
642 ////@begin CBlkEdtFeatLocationPanel content construction
643  CBlkEdtFeatLocationPanel* itemPanel1 = this;
644 
645  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
646  itemPanel1->SetSizer(itemBoxSizer2);
647 
648  m_EditLoc = new CEditFeatLocPanel(itemPanel1);
649  itemBoxSizer2->Add(m_EditLoc, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
650 
651 ////@end CBlkEdtFeatLocationPanel content construction
652 }
653 
654 
655 /*!
656  * Should we show tooltips?
657  */
658 
660 {
661  return true;
662 }
663 
664 /*!
665  * Get bitmap resources
666  */
667 
668 wxBitmap CBlkEdtFeatLocationPanel::GetBitmapResource( const wxString& name )
669 {
670  // Bitmap retrieval
671 ////@begin CBlkEdtFeatLocationPanel bitmap retrieval
672  wxUnusedVar(name);
673  return wxNullBitmap;
674 ////@end CBlkEdtFeatLocationPanel bitmap retrieval
675 }
676 
677 /*!
678  * Get icon resources
679  */
680 
681 wxIcon CBlkEdtFeatLocationPanel::GetIconResource( const wxString& name )
682 {
683  // Icon retrieval
684 ////@begin CBlkEdtFeatLocationPanel icon retrieval
685  wxUnusedVar(name);
686  return wxNullIcon;
687 ////@end CBlkEdtFeatLocationPanel icon retrieval
688 }
689 
691 {
692  bool any_change(false);
694  if (policy) {
695  int offset = 1;
696  bool create_general_only = false;
697  CScope::TTSE_Handles vec_tse;
698  scope.GetAllTSEs(vec_tse, CScope::eAllTSEs);
699  if (!vec_tse.empty())
700  create_general_only = objects::edit::IsGeneralIdProtPresent(vec_tse.front());
701  ITERATE(vector<CConstRef<CObject> >, it, objs) {
702  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
703  if (f)
704  {
705  if (f->IsSetData() && f->GetData().IsCdregion() &&
706  f->IsSetExcept_text() && NStr::Find(f->GetExcept_text(), "RNA editing") != string::npos)
707  {
708  continue;
709  }
713  *f, scope, offset, create_general_only);
714  if (ecmd) {
715  cmd->AddCommand(*ecmd);
716  any_change = true;
717  }
718  }
719  }
720  }
721  return any_change;
722 }
723 
724 
725 // Strand Panel
726 IMPLEMENT_DYNAMIC_CLASS( CStrandPanel, wxPanel )
727 
728 
729 /*!
730  * CStrandPanel event table definition
731  */
732 
733 BEGIN_EVENT_TABLE( CStrandPanel, wxPanel )
734 
735 ////@begin CStrandPanel event table entries
736 ////@end CStrandPanel event table entries
737 
739 
740 
741 /*!
742  * CStrandPanel constructors
743  */
744 
746 {
747  Init();
748 }
749 
750 CStrandPanel::CStrandPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
751 {
752  Init();
753  Create(parent, id, pos, size, style);
754 }
755 
756 
757 /*!
758  * CStrandPanel creator
759  */
760 
761 bool CStrandPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
762 {
763 ////@begin CStrandPanel creation
764  wxPanel::Create( parent, id, pos, size, style );
765 
766  CreateControls();
767  if (GetSizer())
768  {
769  GetSizer()->SetSizeHints(this);
770  }
771  Centre();
772 ////@end CStrandPanel creation
773  return true;
774 }
775 
776 
777 /*!
778  * CStrandPanel destructor
779  */
780 
782 {
783 ////@begin CStrandPanel destruction
784 ////@end CStrandPanel destruction
785 }
786 
787 
788 /*!
789  * Member initialisation
790  */
791 
793 {
794 ////@begin CStrandPanel member initialisation
795  m_StrandFrom = NULL;
796  m_StrandTo = NULL;
797 ////@end CStrandPanel member initialisation
798 }
799 
800 
801 /*!
802  * Control creation for CStrandPanel
803  */
804 
806 {
807 ////@begin CStrandPanel content construction
808  CStrandPanel* itemPanel1 = this;
809 
810  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
811  itemPanel1->SetSizer(itemBoxSizer2);
812 
813 
814  wxStaticText* stattext = new wxStaticText( itemPanel1, wxID_STATIC, _("Convert location strand from"), wxDefaultPosition, wxDefaultSize, 0 );
815  itemBoxSizer2->Add(stattext, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
816 
817  wxArrayString strand_strings;
818  strand_strings.Add(_("Any"));
819  strand_strings.Add(_("Unknown"));
820  strand_strings.Add(_("Plus"));
821  strand_strings.Add(_("Minus"));
822  strand_strings.Add(_("Both"));
823  m_StrandFrom = new wxChoice( itemPanel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, strand_strings, 0 );
824  m_StrandFrom->SetStringSelection(_("Plus"));
825  itemBoxSizer2->Add(m_StrandFrom, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
826 
827  wxStaticText* stattext2 = new wxStaticText( itemPanel1, wxID_STATIC, _("To"), wxDefaultPosition, wxDefaultSize, 0 );
828  itemBoxSizer2->Add(stattext2, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
829 
830  strand_strings[0] = _("Reverse");
831  m_StrandTo = new wxChoice( itemPanel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, strand_strings, 0 );
832  m_StrandTo->SetStringSelection(_("Minus"));
833  itemBoxSizer2->Add(m_StrandTo, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
834 
835 ////@end CStrandPanel content construction
836 }
837 
838 
839 /*!
840  * Should we show tooltips?
841  */
842 
844 {
845  return true;
846 }
847 
848 /*!
849  * Get bitmap resources
850  */
851 
852 wxBitmap CStrandPanel::GetBitmapResource( const wxString& name )
853 {
854  // Bitmap retrieval
855 ////@begin CStrandPanel bitmap retrieval
856  wxUnusedVar(name);
857  return wxNullBitmap;
858 ////@end CStrandPanel bitmap retrieval
859 }
860 
861 /*!
862  * Get icon resources
863  */
864 
865 wxIcon CStrandPanel::GetIconResource( const wxString& name )
866 {
867  // Icon retrieval
868 ////@begin CStrandPanel icon retrieval
869  wxUnusedVar(name);
870  return wxNullIcon;
871 ////@end CStrandPanel icon retrieval
872 }
873 
875 {
876  bool any_change(false);
877 
878  string strand_from = ToStdString(m_StrandFrom->GetStringSelection());
879  string strand_to = ToStdString(m_StrandTo->GetStringSelection());
880  ITERATE(vector<CConstRef<CObject> >, it, objs) {
881  const CSeq_feat* feat = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
882  if (feat) {
883  CSeq_feat_Handle fh = scope.GetSeq_featHandle(*feat);
884  if (fh)
885  {
886  CBioseq_Handle bsh;
887  try
888  {
889  bsh = scope.GetBioseqHandle(fh.GetLocation());
890  }
891  catch (const CObjMgrException&) {}
892  if (!bsh || !bsh.IsAa())
893  {
894  CRef<CObject> new_obj = GetNewObject(*it);
895  CSeq_feat* new_feat = dynamic_cast<CSeq_feat* >(new_obj.GetPointer());
896  bool this_change = macro::CMacroFunction_ConvertLocStrand::s_ConvertLocationStrand(*new_feat, scope, strand_from, strand_to);
897  if (this_change) {
898  CRef<CCmdComposite> ecmd = GetReplacementCommand(*it, new_obj, scope, "Change strand");
899  if (ecmd) {
900  cmd->AddCommand(*ecmd);
901  any_change = true;
902  }
903  }
904  }
905  }
906  }
907  }
908  return any_change;
909 }
910 
911 
912 // RevInt Panel
913 IMPLEMENT_DYNAMIC_CLASS( CRevIntPanel, wxPanel )
914 
915 
916 /*!
917  * CRevIntPanel event table definition
918  */
919 
920 BEGIN_EVENT_TABLE( CRevIntPanel, wxPanel )
921 
922 ////@begin CRevIntPanel event table entries
923 ////@end CRevIntPanel event table entries
924 
926 
927 
928 /*!
929  * CRevIntPanel constructors
930  */
931 
933 {
934  Init();
935 }
936 
937 CRevIntPanel::CRevIntPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
938 {
939  Init();
940  Create(parent, id, pos, size, style);
941 }
942 
943 
944 /*!
945  * CRevIntPanel creator
946  */
947 
948 bool CRevIntPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
949 {
950 ////@begin CRevIntPanel creation
951  wxPanel::Create( parent, id, pos, size, style );
952 
953  CreateControls();
954  if (GetSizer())
955  {
956  GetSizer()->SetSizeHints(this);
957  }
958  Centre();
959 ////@end CRevIntPanel creation
960  return true;
961 }
962 
963 
964 /*!
965  * CRevIntPanel destructor
966  */
967 
969 {
970 ////@begin CRevIntPanel destruction
971 ////@end CRevIntPanel destruction
972 }
973 
974 
975 /*!
976  * Member initialisation
977  */
978 
980 {
981 ////@begin CRevIntPanel member initialisation
982 ////@end CRevIntPanel member initialisation
983 }
984 
985 
986 /*!
987  * Control creation for CRevIntPanel
988  */
989 
991 {
992 ////@begin CRevIntPanel content construction
993  CRevIntPanel* itemPanel1 = this;
994 
995  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
996  itemPanel1->SetSizer(itemBoxSizer2);
997 
998  wxStaticText* text1 = new wxStaticText( itemPanel1, wxID_STATIC, _("Click OK to reverse location interval order"), wxDefaultPosition, wxDefaultSize, 0 );
999  itemBoxSizer2->Add(text1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1000 
1001 ////@end CRevIntPanel content construction
1002 }
1003 
1004 
1005 /*!
1006  * Should we show tooltips?
1007  */
1008 
1010 {
1011  return true;
1012 }
1013 
1014 /*!
1015  * Get bitmap resources
1016  */
1017 
1018 wxBitmap CRevIntPanel::GetBitmapResource( const wxString& name )
1019 {
1020  // Bitmap retrieval
1021 ////@begin CRevIntPanel bitmap retrieval
1022  wxUnusedVar(name);
1023  return wxNullBitmap;
1024 ////@end CRevIntPanel bitmap retrieval
1025 }
1026 
1027 /*!
1028  * Get icon resources
1029  */
1030 
1031 wxIcon CRevIntPanel::GetIconResource( const wxString& name )
1032 {
1033  // Icon retrieval
1034 ////@begin CRevIntPanel icon retrieval
1035  wxUnusedVar(name);
1036  return wxNullIcon;
1037 ////@end CRevIntPanel icon retrieval
1038 }
1039 
1041 {
1042  bool any_change(false);
1043  ITERATE(vector<CConstRef<CObject> >, it, objs) {
1044  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
1045  if (f && f->IsSetLocation()) {
1046  CRef<CObject> new_obj = GetNewObject(*it);
1047  CSeq_feat* new_feat = dynamic_cast<CSeq_feat* >(new_obj.GetPointer());
1048  CSeq_loc* rc = sequence::SeqLocRevCmpl(new_feat->GetLocation(), &(scope));
1049  if (rc) {
1050  rc->FlipStrand();
1051  new_feat->SetLocation().Assign(*rc);
1052  delete rc;
1053  CRef<CCmdComposite> ecmd = GetReplacementCommand(*it, new_obj, scope, "Reverse Interval Order");
1054  if (ecmd) {
1055  cmd->AddCommand(*ecmd);
1056  any_change = true;
1057  }
1058  }
1059  }
1060  }
1061 
1062 
1063  return any_change;
1064 }
1065 
1066 // Resync Panel
1067 IMPLEMENT_DYNAMIC_CLASS( CResyncPanel, wxPanel )
1068 
1069 
1070 /*!
1071  * CResyncPanel event table definition
1072  */
1073 
1074 BEGIN_EVENT_TABLE( CResyncPanel, wxPanel )
1075 
1076 ////@begin CResyncPanel event table entries
1077 ////@end CResyncPanel event table entries
1078 
1080 
1081 
1082 /*!
1083  * CResyncPanel constructors
1084  */
1085 
1087 {
1088  Init();
1089 }
1090 
1091 CResyncPanel::CResyncPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1092 {
1093  Init();
1094  Create(parent, id, pos, size, style);
1095 }
1096 
1097 
1098 /*!
1099  * CResyncPanel creator
1100  */
1101 
1102 bool CResyncPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1103 {
1104 ////@begin CResyncPanel creation
1105  wxPanel::Create( parent, id, pos, size, style );
1106 
1107  CreateControls();
1108  if (GetSizer())
1109  {
1110  GetSizer()->SetSizeHints(this);
1111  }
1112  Centre();
1113 ////@end CResyncPanel creation
1114  return true;
1115 }
1116 
1117 
1118 /*!
1119  * CResyncPanel destructor
1120  */
1121 
1123 {
1124 ////@begin CResyncPanel destruction
1125 ////@end CResyncPanel destruction
1126 }
1127 
1128 
1129 /*!
1130  * Member initialisation
1131  */
1132 
1134 {
1135 ////@begin CResyncPanel member initialisation
1136 ////@end CResyncPanel member initialisation
1137 }
1138 
1139 
1140 /*!
1141  * Control creation for CResyncPanel
1142  */
1143 
1145 {
1146 ////@begin CResyncPanel content construction
1147  CResyncPanel* itemPanel1 = this;
1148 
1149  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
1150  itemPanel1->SetSizer(itemBoxSizer2);
1151 
1152  wxStaticText* text1 = new wxStaticText( itemPanel1, wxID_STATIC, _("Click OK to resynch partials"), wxDefaultPosition, wxDefaultSize, 0 );
1153  itemBoxSizer2->Add(text1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1154 
1155 ////@end CResyncPanel content construction
1156 }
1157 
1158 
1159 /*!
1160  * Should we show tooltips?
1161  */
1162 
1164 {
1165  return true;
1166 }
1167 
1168 /*!
1169  * Get bitmap resources
1170  */
1171 
1172 wxBitmap CResyncPanel::GetBitmapResource( const wxString& name )
1173 {
1174  // Bitmap retrieval
1175 ////@begin CResyncPanel bitmap retrieval
1176  wxUnusedVar(name);
1177  return wxNullBitmap;
1178 ////@end CResyncPanel bitmap retrieval
1179 }
1180 
1181 /*!
1182  * Get icon resources
1183  */
1184 
1185 wxIcon CResyncPanel::GetIconResource( const wxString& name )
1186 {
1187  // Icon retrieval
1188 ////@begin CResyncPanel icon retrieval
1189  wxUnusedVar(name);
1190  return wxNullIcon;
1191 ////@end CResyncPanel icon retrieval
1192 }
1193 
1195 {
1196  bool any_change(false);
1197 
1198  ITERATE(vector<CConstRef<CObject> >, it, objs) {
1199  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
1200  CRef<CSeq_feat> new_feat(new CSeq_feat());
1201  new_feat->Assign(*f);
1203  CSeq_feat_Handle fh = scope.GetSeq_featHandle(*f);
1204  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(fh, *new_feat)));
1205  any_change = true;
1206  }
1207 
1209  if (synch) {
1210  cmd->AddCommand(*synch);
1211  any_change = true;
1212  }
1213  }
1214 
1215  return any_change;
1216 }
1217 
1218 // Pseudo Panel
1219 IMPLEMENT_DYNAMIC_CLASS( CPseudoPanel, wxPanel )
1220 
1221 
1222 /*!
1223  * CPseudoPanel event table definition
1224  */
1225 
1226 BEGIN_EVENT_TABLE( CPseudoPanel, wxPanel )
1227 
1228 ////@begin CPseudoPanel event table entries
1229 ////@end CPseudoPanel event table entries
1230 
1232 
1233 
1234 /*!
1235  * CPseudoPanel constructors
1236  */
1237 
1239 {
1240  Init();
1241 }
1242 
1243 CPseudoPanel::CPseudoPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1244 {
1245  Init();
1246  Create(parent, id, pos, size, style);
1247 }
1248 
1249 
1250 /*!
1251  * CPseudoPanel creator
1252  */
1253 
1254 bool CPseudoPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1255 {
1256 ////@begin CPseudoPanel creation
1257  wxPanel::Create( parent, id, pos, size, style );
1258 
1259  CreateControls();
1260  if (GetSizer())
1261  {
1262  GetSizer()->SetSizeHints(this);
1263  }
1264  Centre();
1265 ////@end CPseudoPanel creation
1266  return true;
1267 }
1268 
1269 
1270 /*!
1271  * CPseudoPanel destructor
1272  */
1273 
1275 {
1276 ////@begin CPseudoPanel destruction
1277 ////@end CPseudoPanel destruction
1278 }
1279 
1280 
1281 /*!
1282  * Member initialisation
1283  */
1284 
1286 {
1287 ////@begin CPseudoPanel member initialisation
1288 ////@end CPseudoPanel member initialisation
1289 }
1290 
1291 
1292 /*!
1293  * Control creation for CPseudoPanel
1294  */
1295 
1297 {
1298 ////@begin CPseudoPanel content construction
1299  CPseudoPanel* itemPanel1 = this;
1300 
1301  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
1302  itemPanel1->SetSizer(itemBoxSizer2);
1303 
1304  wxArrayString pseudogeneChoiceStrings;
1305  pseudogeneChoiceStrings.Add(wxEmptyString);
1306  pseudogeneChoiceStrings.Add(_("Processed"));
1307  pseudogeneChoiceStrings.Add(_("Unprocessed"));
1308  pseudogeneChoiceStrings.Add(_("Unitary"));
1309  pseudogeneChoiceStrings.Add(_("Allelic"));
1310  pseudogeneChoiceStrings.Add(_("Unknown"));
1311  pseudogeneChoiceStrings.Add(_("Unqualified"));
1312  m_PseudogeneChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, pseudogeneChoiceStrings, 0 );
1313  itemBoxSizer2->Add(m_PseudogeneChoice, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
1314 
1315 ////@end CPseudoPanel content construction
1316 }
1317 
1318 
1319 /*!
1320  * Should we show tooltips?
1321  */
1322 
1324 {
1325  return true;
1326 }
1327 
1328 /*!
1329  * Get bitmap resources
1330  */
1331 
1332 wxBitmap CPseudoPanel::GetBitmapResource( const wxString& name )
1333 {
1334  // Bitmap retrieval
1335 ////@begin CPseudoPanel bitmap retrieval
1336  wxUnusedVar(name);
1337  return wxNullBitmap;
1338 ////@end CPseudoPanel bitmap retrieval
1339 }
1340 
1341 /*!
1342  * Get icon resources
1343  */
1344 
1345 wxIcon CPseudoPanel::GetIconResource( const wxString& name )
1346 {
1347  // Icon retrieval
1348 ////@begin CPseudoPanel icon retrieval
1349  wxUnusedVar(name);
1350  return wxNullIcon;
1351 ////@end CPseudoPanel icon retrieval
1352 }
1353 
1354 static const char* kPseudogene = "pseudogene";
1355 
1357 {
1358  bool any_change(false);
1359 
1360  ITERATE(vector<CConstRef<CObject> >, it, objs) {
1361  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
1362  CRef<CSeq_feat> new_feat(new CSeq_feat());
1363  new_feat->Assign(*f);
1364  CSeq_feat_Handle fh = scope.GetSeq_featHandle(*f);
1365 
1366  string pseudo_choice = ToStdString(m_PseudogeneChoice->GetStringSelection());
1367  NStr::ToLower(pseudo_choice);
1368  if (new_feat->IsSetQual()) {
1369  CSeq_feat::TQual::iterator it = new_feat->SetQual().begin();
1370  while (it != new_feat->SetQual().end()) {
1371  if ((*it)->IsSetQual() && NStr::EqualNocase((*it)->GetQual(), kPseudogene)) {
1372  it = new_feat->SetQual().erase(it);
1373  } else {
1374  ++it;
1375  }
1376  }
1377  if (new_feat->SetQual().empty()) {
1378  new_feat->ResetQual();
1379  }
1380  }
1381  if (!NStr::IsBlank(pseudo_choice)) {
1382  if (pseudo_choice != "unqualified")
1383  {
1384  CRef<CGb_qual> qual(new CGb_qual(kPseudogene, pseudo_choice));
1385  new_feat->SetQual().push_back(qual);
1386  }
1387  new_feat->SetPseudo(true);
1388  } else {
1389  new_feat->ResetPseudo();
1390  }
1391 
1392  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(fh, *new_feat)));
1393  any_change = true;
1394  }
1395 
1396 
1397 
1398  return any_change;
1399 }
1400 
1401 
1402 
1403 // Exception Panel
1404 IMPLEMENT_DYNAMIC_CLASS( CExceptionPanel, wxPanel )
1405 
1406 
1407 /*!
1408  * CExceptionPanel event table definition
1409  */
1410 
1411 BEGIN_EVENT_TABLE( CExceptionPanel, wxPanel )
1412 
1413 ////@begin CExceptionPanel event table entries
1414 ////@end CExceptionPanel event table entries
1415 
1417 
1418 
1419 /*!
1420  * CExceptionPanel constructors
1421  */
1422 
1424 : m_is_refseq(false)
1425 {
1426  Init();
1427 }
1428 
1429 CExceptionPanel::CExceptionPanel( wxWindow* parent, bool is_refseq, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1430  : m_is_refseq(is_refseq)
1431 {
1432  Init();
1433  Create(parent, id, pos, size, style);
1434 }
1435 
1436 
1437 /*!
1438  * CExceptionPanel creator
1439  */
1440 
1441 bool CExceptionPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1442 {
1443 ////@begin CExceptionPanel creation
1444  wxPanel::Create( parent, id, pos, size, style );
1445 
1446  CreateControls();
1447  if (GetSizer())
1448  {
1449  GetSizer()->SetSizeHints(this);
1450  }
1451  Centre();
1452 ////@end CExceptionPanel creation
1453  return true;
1454 }
1455 
1456 
1457 /*!
1458  * CExceptionPanel destructor
1459  */
1460 
1462 {
1463 ////@begin CExceptionPanel destruction
1464 ////@end CExceptionPanel destruction
1465 }
1466 
1467 
1468 /*!
1469  * Member initialisation
1470  */
1471 
1473 {
1474 ////@begin CExceptionPanel member initialisation
1475 ////@end CExceptionPanel member initialisation
1476 }
1477 
1478 
1479 /*!
1480  * Control creation for CExceptionPanel
1481  */
1482 
1484 {
1485 ////@begin CExceptionPanel content construction
1486  CExceptionPanel* itemPanel1 = this;
1487 
1488  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
1489  itemPanel1->SetSizer(itemBoxSizer2);
1490 
1491  wxStaticText* text1 = new wxStaticText( itemPanel1, wxID_STATIC, _("Set Explanation to"), wxDefaultPosition, wxDefaultSize, 0 );
1492  itemBoxSizer2->Add(text1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1493 
1494  wxArrayString exceptionStrings;
1495  /* exceptionStrings.Add(wxEmptyString);
1496  exceptionStrings.Add(_("RNA Editing"));
1497  exceptionStrings.Add(_("reasons given in citation"));
1498  exceptionStrings.Add(_("ribosomal slippage"));
1499  exceptionStrings.Add(_("trans splicing"));
1500  exceptionStrings.Add(_("artificial frameshift"));
1501  exceptionStrings.Add(_("nonconsensus splice site"));
1502  exceptionStrings.Add(_("rearrangement required"));
1503  */
1504  vector<string> explanation_strings = CSeq_feat::GetListOfLegalExceptions(m_is_refseq);
1505  for (vector<string>::const_iterator s = explanation_strings.begin(); s != explanation_strings.end(); ++s)
1506  exceptionStrings.Add(wxString(*s));
1507 
1508  m_Exception = new wxComboBox( itemPanel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, exceptionStrings, wxCB_DROPDOWN);
1509  itemBoxSizer2->Add(m_Exception, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
1510 
1511  wxArrayString featureProductStrings;
1512  featureProductStrings.Add(_("Present"));
1513  featureProductStrings.Add(_("Absent"));
1514  featureProductStrings.Add(_("Either"));
1515  m_FeatureProduct = new wxRadioBox( itemPanel1, wxID_ANY, _("Where feature product is"), wxDefaultPosition, wxDefaultSize, featureProductStrings, 0, wxRA_SPECIFY_COLS );
1516  m_FeatureProduct->SetSelection(2);
1517  itemBoxSizer2->Add(m_FeatureProduct, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2);
1518 
1519  m_MoveToComment = new wxCheckBox( itemPanel1, wxID_ANY, _("Move explanation to comment"), wxDefaultPosition, wxDefaultSize, 0 );
1520  m_MoveToComment->SetValue(false);
1521  itemBoxSizer2->Add(m_MoveToComment, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2);
1522 
1523 ////@end CExceptionPanel content construction
1524 }
1525 
1526 
1527 /*!
1528  * Should we show tooltips?
1529  */
1530 
1532 {
1533  return true;
1534 }
1535 
1536 /*!
1537  * Get bitmap resources
1538  */
1539 
1540 wxBitmap CExceptionPanel::GetBitmapResource( const wxString& name )
1541 {
1542  // Bitmap retrieval
1543 ////@begin CExceptionPanel bitmap retrieval
1544  wxUnusedVar(name);
1545  return wxNullBitmap;
1546 ////@end CExceptionPanel bitmap retrieval
1547 }
1548 
1549 /*!
1550  * Get icon resources
1551  */
1552 
1553 wxIcon CExceptionPanel::GetIconResource( const wxString& name )
1554 {
1555  // Icon retrieval
1556 ////@begin CExceptionPanel icon retrieval
1557  wxUnusedVar(name);
1558  return wxNullIcon;
1559 ////@end CExceptionPanel icon retrieval
1560 }
1561 
1562 
1564 {
1565  bool any_change(false);
1566  string value = m_Exception->GetValue().ToStdString();
1567  bool move_to_comment = m_MoveToComment->GetValue();
1568  int feat_product_present = m_FeatureProduct->GetSelection();
1569 
1570  ITERATE(vector<CConstRef<CObject> >, it, objs) {
1571  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
1572  CRef<CSeq_feat> new_feat(new CSeq_feat());
1573  new_feat->Assign(*f);
1574  CSeq_feat_Handle fh = scope.GetSeq_featHandle(*f);
1575  if (feat_product_present == 2 || (new_feat->IsSetProduct() && feat_product_present == 0) || (!new_feat->IsSetProduct() && feat_product_present == 1))
1576  {
1577  string old_value;
1578  if (new_feat->IsSetExcept_text())
1579  {
1580  old_value = new_feat->GetExcept_text();
1581  }
1582 
1583  string comment;
1584  if (new_feat->IsSetComment())
1585  {
1586  comment = new_feat->GetComment();
1587  }
1588 
1589  if (!old_value.empty() && move_to_comment)
1590  {
1591  if (!NStr::IsBlank(comment))
1592  comment += "; " + old_value;
1593  else
1594  comment = old_value;
1595  new_feat->SetComment(comment);
1596  }
1597 
1598  if (!NStr::IsBlank(value))
1599  {
1600  new_feat->SetExcept(true);
1601  new_feat->SetExcept_text(value);
1602  }
1603  else
1604  {
1605  new_feat->SetExcept(false);
1606  new_feat->ResetExcept_text();
1607  }
1608 
1609 
1610  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(fh, *new_feat)));
1611  any_change = true;
1612  }
1613  }
1614 
1615  return any_change;
1616 }
1617 
1618 
1619 
1620 
1621 // Experiment Panel
1622 IMPLEMENT_DYNAMIC_CLASS( CExperimentPanel, wxPanel )
1623 
1624 
1625 /*!
1626  * CExperimentPanel event table definition
1627  */
1628 
1629 BEGIN_EVENT_TABLE( CExperimentPanel, wxPanel )
1630 
1631 ////@begin CExperimentPanel event table entries
1632 ////@end CExperimentPanel event table entries
1633 
1635 
1636 
1637 /*!
1638  * CExperimentPanel constructors
1639  */
1640 
1642 {
1643  Init();
1644 }
1645 
1646 CExperimentPanel::CExperimentPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1647 {
1648  Init();
1649  Create(parent, id, pos, size, style);
1650 }
1651 
1652 
1653 /*!
1654  * CExperimentPanel creator
1655  */
1656 
1657 bool CExperimentPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1658 {
1659 ////@begin CExperimentPanel creation
1660  wxPanel::Create( parent, id, pos, size, style );
1661 
1662  CreateControls();
1663  if (GetSizer())
1664  {
1665  GetSizer()->SetSizeHints(this);
1666  }
1667  Centre();
1668 ////@end CExperimentPanel creation
1669  return true;
1670 }
1671 
1672 
1673 /*!
1674  * CExperimentPanel destructor
1675  */
1676 
1678 {
1679 ////@begin CExperimentPanel destruction
1680 ////@end CExperimentPanel destruction
1681 }
1682 
1683 
1684 /*!
1685  * Member initialisation
1686  */
1687 
1689 {
1690 ////@begin CExperimentPanel member initialisation
1691 ////@end CExperimentPanel member initialisation
1692 }
1693 
1694 
1695 /*!
1696  * Control creation for CExperimentPanel
1697  */
1698 
1700 {
1701 ////@begin CExperimentPanel content construction
1702  CExperimentPanel* itemPanel1 = this;
1703 
1704  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
1705  itemPanel1->SetSizer(itemBoxSizer2);
1706 
1707  wxArrayString create_or_delete;
1708  create_or_delete.Add(_("Set Experiment"));
1709  create_or_delete.Add(_("Remove Experiments"));
1710  m_CreateOrDelete = new wxRadioBox( itemPanel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, create_or_delete, 0, wxRA_SPECIFY_ROWS );
1711  m_CreateOrDelete->SetSelection(0);
1712  itemBoxSizer2->Add(m_CreateOrDelete, 0, wxALIGN_TOP, 0);
1713 
1714  m_SingleExperiment = new CSingleExperimentPanel(itemPanel1);
1716  itemBoxSizer2->Add(m_SingleExperiment, 0, wxALIGN_TOP|wxALL, 5);
1717 
1718  m_CreateOrDelete->Bind(wxEVT_RADIOBOX, &CExperimentPanel::OnCreateOrDelete, this);
1719 
1720 ////@end CExperimentPanel content construction
1721 }
1722 
1723 
1724 /*!
1725  * Should we show tooltips?
1726  */
1727 
1729 {
1730  return true;
1731 }
1732 
1733 /*!
1734  * Get bitmap resources
1735  */
1736 
1737 wxBitmap CExperimentPanel::GetBitmapResource( const wxString& name )
1738 {
1739  // Bitmap retrieval
1740 ////@begin CExperimentPanel bitmap retrieval
1741  wxUnusedVar(name);
1742  return wxNullBitmap;
1743 ////@end CExperimentPanel bitmap retrieval
1744 }
1745 
1746 /*!
1747  * Get icon resources
1748  */
1749 
1750 wxIcon CExperimentPanel::GetIconResource( const wxString& name )
1751 {
1752  // Icon retrieval
1753 ////@begin CExperimentPanel icon retrieval
1754  wxUnusedVar(name);
1755  return wxNullIcon;
1756 ////@end CExperimentPanel icon retrieval
1757 }
1758 
1759 
1761 {
1762  bool any_change(false);
1763 
1764  int create_or_delete = m_CreateOrDelete->GetSelection();
1765 
1766  string value;
1767  if (create_or_delete == 0)
1769 
1770 
1771 
1772  ITERATE(vector<CConstRef<CObject> >, it, objs)
1773  {
1774  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
1775  CRef<CSeq_feat> new_feat(new CSeq_feat());
1776  new_feat->Assign(*f);
1777  CSeq_feat_Handle fh = scope.GetSeq_featHandle(*f);
1778 
1779  if (create_or_delete == 0 && !value.empty())
1780  {
1781  CRef<CGb_qual> edited_qual (new CGb_qual("experiment", value));
1782  new_feat->SetQual().push_back(edited_qual);
1783  any_change = true;
1784  }
1785  if (create_or_delete == 1)
1786  {
1787  CSingleExperimentPanel::RemoveRepresentedQuals(*new_feat, "experiment");
1788  any_change = true;
1789  }
1790 
1791  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(fh, *new_feat)));
1792  }
1793 
1794  return any_change;
1795 }
1796 
1797 void CExperimentPanel::OnCreateOrDelete(wxCommandEvent& event)
1798 {
1799  if (m_CreateOrDelete->GetSelection() == 0)
1800  m_SingleExperiment->Enable();
1801  else
1802  m_SingleExperiment->Disable();
1803 }
1804 
1805 
1806 
1807 
1808 
1809 
1810 
1811 // Inference Panel
1812 IMPLEMENT_DYNAMIC_CLASS( CEditInferencePanel, wxPanel )
1813 
1814 
1815 /*!
1816  * CEditInferencePanel event table definition
1817  */
1818 
1819 BEGIN_EVENT_TABLE( CEditInferencePanel, wxPanel )
1820 
1821 ////@begin CEditInferencePanel event table entries
1822 ////@end CEditInferencePanel event table entries
1823 
1825 
1826 
1827 /*!
1828  * CEditInferencePanel constructors
1829  */
1830 
1832 {
1833  Init();
1834 }
1835 
1836 CEditInferencePanel::CEditInferencePanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1837 {
1838  Init();
1839  Create(parent, id, pos, size, style);
1840 }
1841 
1842 
1843 /*!
1844  * CEditInferencePanel creator
1845  */
1846 
1847 bool CEditInferencePanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
1848 {
1849 ////@begin CEditInferencePanel creation
1850  wxPanel::Create( parent, id, pos, size, style );
1851 
1852  CreateControls();
1853  if (GetSizer())
1854  {
1855  GetSizer()->SetSizeHints(this);
1856  }
1857  Centre();
1858 ////@end CEditInferencePanel creation
1859  return true;
1860 }
1861 
1862 
1863 /*!
1864  * CEditInferencePanel destructor
1865  */
1866 
1868 {
1869 ////@begin CEditInferencePanel destruction
1870 ////@end CEditInferencePanel destruction
1871 }
1872 
1873 
1874 /*!
1875  * Member initialisation
1876  */
1877 
1879 {
1880 ////@begin CEditInferencePanel member initialisation
1881 ////@end CEditInferencePanel member initialisation
1882 }
1883 
1884 
1885 /*!
1886  * Control creation for CEditInferencePanel
1887  */
1888 
1890 {
1891 ////@begin CEditInferencePanel content construction
1892  CEditInferencePanel* itemPanel1 = this;
1893 
1894  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
1895  itemPanel1->SetSizer(itemBoxSizer2);
1896 
1897  wxArrayString create_or_delete;
1898  create_or_delete.Add(_("Set Inference"));
1899  create_or_delete.Add(_("Remove Inferences"));
1900  m_CreateOrDelete = new wxRadioBox( itemPanel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, create_or_delete, 0, wxRA_SPECIFY_ROWS );
1901  m_CreateOrDelete->SetSelection(0);
1902  itemBoxSizer2->Add(m_CreateOrDelete, 0, wxALIGN_TOP, 0);
1903 
1904  m_SingleInference = new CInferencePanel(itemPanel1);
1906  itemBoxSizer2->Add(m_SingleInference, 0, wxALIGN_TOP|wxALL, 5);
1907 
1908  m_CreateOrDelete->Bind(wxEVT_RADIOBOX, &CEditInferencePanel::OnCreateOrDelete, this);
1909 
1910 ////@end CEditInferencePanel content construction
1911 }
1912 
1913 
1914 /*!
1915  * Should we show tooltips?
1916  */
1917 
1919 {
1920  return true;
1921 }
1922 
1923 /*!
1924  * Get bitmap resources
1925  */
1926 
1927 wxBitmap CEditInferencePanel::GetBitmapResource( const wxString& name )
1928 {
1929  // Bitmap retrieval
1930 ////@begin CEditInferencePanel bitmap retrieval
1931  wxUnusedVar(name);
1932  return wxNullBitmap;
1933 ////@end CEditInferencePanel bitmap retrieval
1934 }
1935 
1936 /*!
1937  * Get icon resources
1938  */
1939 
1940 wxIcon CEditInferencePanel::GetIconResource( const wxString& name )
1941 {
1942  // Icon retrieval
1943 ////@begin CEditInferencePanel icon retrieval
1944  wxUnusedVar(name);
1945  return wxNullIcon;
1946 ////@end CEditInferencePanel icon retrieval
1947 }
1948 
1949 
1951 {
1952  bool any_change(false);
1953 
1954  int create_or_delete = m_CreateOrDelete->GetSelection();
1955 
1956  string value;
1957  if (create_or_delete == 0)
1959 
1960 
1961 
1962  ITERATE(vector<CConstRef<CObject> >, it, objs)
1963  {
1964  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
1965  CRef<CSeq_feat> new_feat(new CSeq_feat());
1966  new_feat->Assign(*f);
1967  CSeq_feat_Handle fh = scope.GetSeq_featHandle(*f);
1968 
1969  if (create_or_delete == 0 && !value.empty())
1970  {
1971  CRef<CGb_qual> edited_qual (new CGb_qual("inference", value));
1972  new_feat->SetQual().push_back(edited_qual);
1973  any_change = true;
1974  }
1975  if (create_or_delete == 1)
1976  {
1977  CInferencePanel::RemoveRepresentedQuals(*new_feat, "inference");
1978  any_change = true;
1979  }
1980 
1981  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(fh, *new_feat)));
1982  }
1983 
1984  return any_change;
1985 }
1986 
1987 void CEditInferencePanel::OnCreateOrDelete(wxCommandEvent& event)
1988 {
1989  if (m_CreateOrDelete->GetSelection() == 0)
1990  m_SingleInference->Enable();
1991  else
1992  m_SingleInference->Disable();
1993 }
1994 
1996 
USING_SCOPE(objects)
static const char * kFramePosX
static const char * kFrameHeight
static const char * kFramePosY
static const char * kFrameWidth
static const char * kPseudogene
#define ID_EFL_OKCANCEL
#define ID_EFL_FEATURETYPE
bool IsGeneralIdProtPresent(objects::CSeq_entry_Handle tse)
CBioseq_CI –.
Definition: bioseq_ci.hpp:69
CBioseq_Handle –.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxIcon GetIconResource(const wxString &name)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
wxBitmap GetBitmapResource(const wxString &name)
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)
bool GetTopLevelSeqEntryAndProcessor()
CBulkEditFeatDlg()
Constructors.
virtual string GetErrorMessage()
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CFeatureTypePanel * m_FeatureType
virtual void SetRegistryPath(const string &reg_path)
virtual CRef< CCmdComposite > GetCommand()
void SetEditingType(EEditingType editing_type)
COkCancelPanel * m_OkCancel
void Init()
Initialises member variables.
void UpdateChildrenFeaturePanels(wxWindow *win)
void ProcessUpdateFeatEvent(wxCommandEvent &event)
bool Create(wxWindow *parent, IWorkbench *wb, wxWindowID id=10268, const wxString &caption=_("BulkEditFeatDlg"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(800, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
virtual void SaveSettings() const
static bool ShowToolTips()
Should we show tooltips?
void CreateControls()
Creates the controls and sizers.
CConstraintPanel * m_Constraint
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
virtual CRef< CEditingActionConstraint > GetConstraint(const string &field, CFieldNamePanel::EFieldType field_type, int subtype, const string &ncRNA_class)
CRef< objects::edit::CLocationEditPolicy > GetPolicy()
void OnCreateOrDelete(wxCommandEvent &event)
CInferencePanel * m_SingleInference
wxBitmap GetBitmapResource(const wxString &name)
wxIcon GetIconResource(const wxString &name)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
virtual bool Match(const string &value)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
wxIcon GetIconResource(const wxString &name)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxBitmap GetBitmapResource(const wxString &name)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
wxIcon GetIconResource(const wxString &name)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxBitmap GetBitmapResource(const wxString &name)
void OnCreateOrDelete(wxCommandEvent &event)
wxIcon GetIconResource(const wxString &name)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxBitmap GetBitmapResource(const wxString &name)
CSingleExperimentPanel * m_SingleExperiment
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
CFeat_CI –.
Definition: feat_ci.hpp:64
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
void ListPresentFeaturesFirst(const objects::CSeq_entry_Handle &entry, vector< const objects::CFeatListItem * > *featlist=nullptr)
@Gb_qual.hpp User-defined methods of the data storage class.
Definition: Gb_qual.hpp:61
CRegistryWriteView GetWriteView(const string &section)
get a read-write view at a particular level.
Definition: registry.cpp:462
static CGuiRegistry & GetInstance()
access the application-wide singleton
Definition: registry.cpp:400
CRegistryReadView GetReadView(const string &section) const
get a read-only view at a particular level.
Definition: registry.cpp:428
virtual void SetValue(string val)
virtual string GetValue()
Base class for all object manager exceptions.
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
static bool ShowToolTips()
wxBitmap GetBitmapResource(const wxString &name)
wxIcon GetIconResource(const wxString &name)
static void RemoveRepresentedQuals(objects::CSeq_feat &feat, const string &qual_name)
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
Definition: reg_view.cpp:230
void Set(const string &key, int val)
access a named key at this level, with no recursion
Definition: reg_view.cpp:533
wxIcon GetIconResource(const wxString &name)
wxBitmap GetBitmapResource(const wxString &name)
static bool ShowToolTips()
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
static bool ShowToolTips()
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
wxIcon GetIconResource(const wxString &name)
wxBitmap GetBitmapResource(const wxString &name)
CScope –.
Definition: scope.hpp:92
static ESubtype SubtypeNameToValue(CTempString sName)
Turn a string into its ESubtype which is NOT necessarily related to the identifier of the enum.
CSeq_feat_Handle –.
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
static vector< string > GetListOfLegalExceptions(bool include_refseq)
Produces the list of legal exceptions.
Definition: Seq_feat.cpp:526
Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.
Definition: Seq_loc.hpp:453
virtual void SetValue(string val)
wxIcon GetIconResource(const wxString &name)
virtual bool AddCommand(vector< CConstRef< CObject > > &objs, CRef< CCmdComposite > cmd, CScope &scope)
wxBitmap GetBitmapResource(const wxString &name)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
static bool ShowToolTips()
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
#define _(proto)
Definition: ct_nlmzip_i.h:78
int CorrectForncRNASubtypes(CSeqFeatData::ESubtype subtype, string &ncRNA_class)
CRef< CCmdComposite > GetReplacementCommand(CConstRef< CObject > oldobj, CRef< CObject > newobj, CScope &scope, const string &cmd_name)
CRef< CObject > GetNewObject(CConstRef< CObject > object)
#define EVT_UPDATE_FEATURE_LIST(id, fn)
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
#define false
Definition: bool.h:36
static void Init(void)
Definition: cursor6.c:76
int offset
Definition: replacements.h:160
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void FlipStrand(void)
Flip the strand (e.g. plus to minus)
Definition: Seq_loc.cpp:3969
bool AdjustFeaturePartialFlagForLocation(CSeq_feat &new_feat)
AdjustFeaturePartialFlagForLocation A function to ensure that Seq-feat.partial is set if either end o...
Definition: feature.cpp:3983
CSeq_loc * SeqLocRevCmpl(const CSeq_loc &loc, CScope *scope)
Get reverse complement of the seq-loc (?)
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
void GetAllTSEs(TTSE_Handles &tses, enum ETSEKind kind=eManualTSEs)
Definition: scope.cpp:295
CSeq_feat_Handle GetSeq_featHandle(const CSeq_feat &feat, EMissing action=eMissing_Default)
Definition: scope.cpp:200
vector< CSeq_entry_Handle > TTSE_Handles
Definition: scope.hpp:645
@ eAllTSEs
Definition: scope.hpp:643
bool IsAa(void) const
virtual const CSeq_loc & GetLocation(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
CConstRef< CSeq_feat > GetOriginalSeq_feat(void) const
bool IsSetId(void) const
const TId & GetId(void) const
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:1439
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define kEmptyStr
Definition: ncbistr.hpp:123
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106
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 EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5353
static string & ToLower(string &str)
Convert string to lower case – string& version.
Definition: ncbistr.cpp:405
bool IsSetComment(void) const
Check if a value has been assigned to Comment data member.
Definition: Seq_feat_.hpp:1037
bool IsSetQual(void) const
qualifiers Check if a value has been assigned to Qual data member.
Definition: Seq_feat_.hpp:1135
void SetLocation(TLocation &value)
Assign a value to Location data member.
Definition: Seq_feat_.cpp:131
void SetComment(const TComment &value)
Assign a value to Comment data member.
Definition: Seq_feat_.hpp:1058
void ResetExp_ev(void)
Reset Exp_ev data member.
Definition: Seq_feat_.hpp:1261
void ResetExcept_text(void)
Reset Except_text data member.
Definition: Seq_feat_.cpp:194
const TLocation & GetLocation(void) const
Get the Location member data.
Definition: Seq_feat_.hpp:1117
void SetExcept(TExcept value)
Assign a value to Except data member.
Definition: Seq_feat_.hpp:1018
void ResetPseudo(void)
Reset Pseudo data member.
Definition: Seq_feat_.hpp:1358
const TExcept_text & GetExcept_text(void) const
Get the Except_text member data.
Definition: Seq_feat_.hpp:1405
bool IsSetExcept_text(void) const
explain if except=TRUE Check if a value has been assigned to Except_text data member.
Definition: Seq_feat_.hpp:1393
const TComment & GetComment(void) const
Get the Comment member data.
Definition: Seq_feat_.hpp:1049
void SetPseudo(TPseudo value)
Assign a value to Pseudo data member.
Definition: Seq_feat_.hpp:1374
void SetExcept_text(const TExcept_text &value)
Assign a value to Except_text data member.
Definition: Seq_feat_.hpp:1414
TQual & SetQual(void)
Assign a value to Qual data member.
Definition: Seq_feat_.hpp:1153
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
Definition: Seq_feat_.hpp:1084
void ResetQual(void)
Reset Qual data member.
Definition: Seq_feat_.cpp:136
bool IsOther(void) const
Check if variant Other is selected.
Definition: Seq_id_.hpp:871
@ eMol_na
just a nucleic acid
Definition: Seq_inst_.hpp:113
END_EVENT_TABLE()
int i
#define wxT(x)
Definition: muParser.cpp:41
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
double f(double x_, const double &y_)
Definition: njn_root.hpp:188
static int match(register const pcre_uchar *eptr, register const pcre_uchar *ecode, const pcre_uchar *mstart, int offset_top, match_data *md, eptrblock *eptrb, unsigned int rdepth)
Definition: pcre_exec.c:513
static static static wxID_ANY
CRef< CCmdComposite > GetSynchronizeProteinPartialsCommand(objects::CScope &scope, const objects::CSeq_feat &cds)
CRef< CCmdComposite > GetEditLocationCommand(const objects::edit::CLocationEditPolicy &policy, bool retranslate, bool adjust_gene, const objects::CSeq_feat &orig_feat, objects::CScope &scope, int &offset, bool create_general_only)
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
wxRect GetScreenRect(const wxWindow &win)
Definition: wx_utils.cpp:783
Modified on Thu Apr 25 08:17:39 2024 by modify_doxy.py rev. 669887