File: TSilmutDialog.h

package info (click to toggle)
gentle 1.9+cvs20100605+dfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: squeeze
  • size: 12,264 kB
  • ctags: 5,235
  • sloc: cpp: 41,571; ansic: 3,978; sh: 1,420; makefile: 291
file content (76 lines) | stat: -rw-r--r-- 2,597 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/** \file
	\brief Contains the TSilmutDialog class, and its helper class TSilmutItem
*/
#ifndef _TSILMUTDIALOG_H_
#define _TSILMUTDIALOG_H_

#include "main.h"
#include <wx/spinctrl.h>

#define M_SILMUT 0
#define M_WHATCUTS 1

class TRestrictionEnzyme ;
class TPrimerDesign ;

/**	\brief Helper class for TSilmutDialog
*/
class TSilmutItem
    {
    public :
    wxString mut ; ///< Mutated sequence
    int changes , cuts ;
    TRestrictionEnzyme *e ; ///< Pointer to the restriction enzyme
    wxArrayInt fragments ;
    } ;

/** \brief Silent mutation dialog
*/
class TSilmutDialog : public wxDialog
    {
    public :
    TSilmutDialog ( wxWindow *parent , const wxString &s , 
                    int _mode = M_SILMUT , 
                    int _mut_pos = -1 , int _mut_dir = 1 ) ; ///< Constructor
    ~TSilmutDialog () ; ///< Destructor
    
    virtual void initme ( TVector *vec , int _from , int _to ) ; ///< Initialization
    virtual void calc () ; ///< Calculate new cuts through mutation
    virtual void calc_acr () ; ///< Calculate cuts that go away through mutation
    virtual void showit () ; ///< Show results
    virtual void OnSpin ( wxSpinEvent &event ) ; ///< Spin control (changes) event handler
    virtual void OnSpin2 ( wxCommandEvent &event ) ; ///< Spin control (max) event handler
    virtual void OnChoose ( wxCommandEvent &event ) ; ///< Choice event handler
    virtual void OnOK ( wxCommandEvent &ev ) ; ///< OK button event handler
    virtual void OnCancel ( wxCommandEvent &ev ) ; ///< Cancel button event handler
    virtual void OnACR ( wxCommandEvent &ev ) ; ///< Allow cut removal event handler
    virtual void OnLbDoubleClick ( wxCommandEvent &ev ) ; ///< Listbox double-click event handler
    virtual void OnCharHook(wxKeyEvent& event) ; ///< Key event handler
    virtual wxString getSequence () ; ///< Returns the sequence
    virtual TRestrictionEnzyme *getEnzyme () ; ///< Returns a pointer to the enzyme
    
    private :
    wxString getAAresult ( wxString dna ) ; ///< Returns resulting amino acid sequence
    int selID () ; ///< Returns selected ID
    
    // Variables
    TVector *v ;
    int from , to ;
    vector <TSilmutItem> vs ;
    wxListBox *lb ;
    wxCheckBox *allow_cut_removal ;
    TPrimerDesign *pd ;
    wxStaticText *status ;
    wxSpinCtrl *lim_xhg , *lim_max ;
    wxChoice *egr , *mut ;
    wxArrayInt lb_retro ;
    int last_selection ;
    int mode ;
    int mut_pos , mut_dir ;
    bool running ;

    DECLARE_EVENT_TABLE()
    } ;


#endif