1 #ifndef MUSSA_ALIGNED_WINDOW_H
2 #define MUSSA_ALIGNED_WINDOW_H
6 #include <boost/shared_ptr.hpp>
11 #include "alg/mussa.hpp"
12 #include "qui/IntAction.hpp"
13 #include "qui/ZoomWidget.hpp"
14 #include "qui/seqbrowser/SequenceBrowserWidget.hpp"
15 #include "qui/SubanalysisWindow.hpp"
17 //! Show sequence alignments
18 class MussaAlignedWindow : public QMainWindow
23 //! construct an aligned window for an analysis and selected paths
24 /*! \param analysis is a shared_ptr to a mussa analysis
25 * \param paths is a set of "paths" AKA integer offsets into the sequences stored in mussa
26 * \param window points to a SubanalysisWindowRef, so we can pick interesting
27 * sequence portions from both the mussa window and the sequence view window
28 * \param parent is the typical Qt pointer to a parent widget
30 MussaAlignedWindow(MussaRef analysis, const std::set<int>& paths,
31 SubanalysisWindowRef window, QWidget *parent=0);
34 //! launch a sub analysis
35 void createSubAnalysis();
36 //! use selected_paths[pathid] to set the starting position of our sequence
37 void setAlignment(int pathid);
38 //! toggle whether or not to show the aligned basepairs of a window
39 void toggleViewAlignment(int alignment_index);
41 //! just force updating the window
45 // figure out what Alignments we have (needed for setupAlignmentMenus)
46 void setSelectedPaths(MussaRef m, const std::set<int>& sel_paths);
51 //! set menus (must be called after setSelectedPaths)
52 void setupAlignmentMenus();
53 void computeMatchLines();
56 //std::vector<Sequence> sequences;
57 //const std::set<int>& selected_paths;
58 std::vector<ConservedPath> selected_paths;
59 std::vector<bool> view_paths;
60 SubanalysisWindowRef subanalysis_window;
61 SequenceBrowserWidget browser;
62 QMenu pick_align_menu;
63 QMenu view_align_menu;
65 QAction *createSubAnalysisAction;
66 QAction *saveBrowserPixmapAction;
68 std::vector <IntAction *> pick_actions;
69 std::vector <IntAction *> view_actions;
74 //! reference to a MussaAlignedWindow
75 typedef boost::shared_ptr<MussaAlignedWindow> MussaAlignedWindowRef;