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/ThresholdWidget.hpp"
15 #include "qui/seqbrowser/SequenceBrowserWidget.hpp"
16 #include "qui/SubanalysisWindow.hpp"
18 //! Show sequence alignments
19 class MussaAlignedWindow : public QMainWindow
24 //! construct an aligned window for an analysis and selected paths
25 /*! \param analysis is a shared_ptr to a mussa analysis
26 * \param paths is a set of "paths" AKA integer offsets into the sequences stored in mussa
27 * \param window points to a SubanalysisWindowRef, so we can pick interesting
28 * sequence portions from both the mussa window and the sequence view window
29 * \param parent is the typical Qt pointer to a parent widget
31 MussaAlignedWindow(MussaRef analysis, const std::set<int>& paths,
32 SubanalysisWindowRef window, QWidget *parent=0);
35 //! launch a sub analysis
36 void createSubAnalysis();
37 //! use selected_paths[pathid] to set the starting position of our sequence
38 void setAlignment(int pathid);
39 //! toggle whether or not to show the aligned basepairs of a window
40 void toggleViewAlignment(int alignment_index);
42 //! just force updating the window
46 // figure out what Alignments we have (needed for setupAlignmentMenus)
47 void setSelectedPaths(MussaRef m, const std::set<int>& sel_paths);
52 //! set menus (must be called after setSelectedPaths)
53 void setupAlignmentMenus();
54 void computeMatchLines();
57 //std::vector<Sequence> sequences;
58 //const std::set<int>& selected_paths;
59 std::vector<ConservedPath> selected_paths;
60 std::vector<bool> view_paths;
61 SubanalysisWindowRef subanalysis_window;
62 SequenceBrowserWidget browser;
63 QMenu pick_align_menu;
64 QMenu view_align_menu;
66 QAction *createSubAnalysisAction;
67 QAction *saveBrowserPixmapAction;
69 std::vector <IntAction *> pick_actions;
70 std::vector <IntAction *> view_actions;
72 ThresholdWidget *threshold_widget;
76 //! reference to a MussaAlignedWindow
77 typedef boost::shared_ptr<MussaAlignedWindow> MussaAlignedWindowRef;