NCBI C++ ToolKit
edit_object_feature_propagate.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___EDIT_OBJECT_FEATURE_PROPAGATE__HPP
2 #define GUI_WIDGETS_EDIT___EDIT_OBJECT_FEATURE_PROPAGATE__HPP
3 
4 /* $Id: edit_object_feature_propagate.hpp 42666 2019-04-01 14:27:25Z filippov $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Colleen Bollin
30  */
31 
32 #include <corelib/ncbistd.hpp>
33 
35 #include <objmgr/scope.hpp>
37 #include <objmgr/bioseq_handle.hpp>
40 
41 #include <wx/arrstr.h>
42 
43 class wxPanel;
44 class wxSizer;
45 class wxComboBox;
46 class wxCheckBox;
47 class wxRadioBox;
48 class wxCommandEvent;
49 
51 
52 
54 {
55 public:
56  CEditObjectFeaturePropagate(objects::CBioseq_Handle bsh, const vector<CConstRef<objects::CSeq_feat>>& propagatedFeats);
57 
58  virtual wxWindow* CreateWindow(wxWindow* parent);
59  virtual IEditCommand* GetEditCommand();
60 
61 private:
62  void xInit();
63 
64  void xGetEditCommandAllSequences(const string& alignName, bool create_general_only);
65  void xGetEditCommandSingleSequence(objects::CBioseq_Handle bsh, bool create_general_only);
66  void xPropagateFeatures(objects::CBioseq_Handle target_bsh, CRef<CCmdComposite>& composite, bool create_general_only);
67  void xReportErrors();
68 
69  wxSizer* xAlignSizer();
70  wxSizer* xFeatureSelectSizer();
71  wxSizer* xGapHandlingSizer();
72  wxSizer* xCdsHandlingSizer();
73 
74  void OnAlignmentSelected(wxCommandEvent& event);
75  void x_FillTargetComboList();
76 
77  bool xStopCdsAtStopCodon() const;
78  bool xMergeAbuttingIntervals() const;
79  bool xExtendOverGaps() const;
80  bool xCdsCleanupPartials() const;
81 
82  // sequence from where we are going to propagate features
83  objects::CBioseq_Handle m_Bsh;
84 
87  vector<CConstRef<objects::CSeq_feat>> m_PropagatedFeats;
88 
91 
95 
96  wxPanel* m_Window;
97  wxComboBox* m_pTargetCtrl;
98  wxComboBox* m_pAlignCtrl;
99  wxRadioBox* m_pFeatureSelectCtrl;
100  wxRadioBox* m_pGapHandlingCtrl;
105 
106  enum {
107  ID_ALIGNCTRL = 10500,
109  };
110 
112  objects::CObject_id::TId m_MaxFeatId{ 0 };
113 };
114 
116 
117 #endif
118  // GUI_WIDGETS_EDIT___EDIT_OBJECT_FEATURE_PROPAGATE__HPP
119 
map< string, CConstRef< objects::CSeq_align > > TAnnotNameToAlignMap
CEditObjectFeaturePropagate(objects::CBioseq_Handle bsh, const vector< CConstRef< objects::CSeq_feat >> &propagatedFeats)
CConstRef< objects::CSeq_align > m_pAlign
map< string, objects::CBioseq_Handle > TIdToBSeqMap
void xPropagateFeatures(objects::CBioseq_Handle target_bsh, CRef< CCmdComposite > &composite, bool create_general_only)
void xGetEditCommandSingleSequence(objects::CBioseq_Handle bsh, bool create_general_only)
void xGetEditCommandAllSequences(const string &alignName, bool create_general_only)
map< string, TIdToBSeqMap > TAnnotNameToSequencesMap
virtual wxWindow * CreateWindow(wxWindow *parent)
creates a child (not top level) windows that can contain whatever controls/subwindows etc.
virtual IEditCommand * GetEditCommand()
After placing the window in the Edit Object Dialog ShowModal() method of the dialog is called.
vector< CConstRef< objects::CSeq_feat > > m_PropagatedFeats
void OnAlignmentSelected(wxCommandEvent &event)
Default implementation of IMessageListener: collects all messages posted.
CObject –.
Definition: ncbiobj.hpp:180
Interface (functor) for object editing.
GUI editing interface.
Definition: edit_object.hpp:63
Definition: map.hpp:338
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
Modified on Sat Dec 09 04:45:52 2023 by modify_doxy.py rev. 669887