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
45 //! set the title based on the analysis
49 // figure out what Alignments we have (needed for setupAlignmentMenus)
50 void setSelectedPaths(MussaRef m, const std::set<int>& sel_paths);
55 //! set menus (must be called after setSelectedPaths)
56 void setupAlignmentMenus();
57 void computeMatchLines();
60 //std::vector<Sequence> sequences;
61 //const std::set<int>& selected_paths;
62 std::vector<ConservedPath> selected_paths;
63 std::vector<bool> view_paths;
64 SubanalysisWindowRef subanalysis_window;
65 SequenceBrowserWidget browser;
66 QMenu pick_align_menu;
67 QMenu view_align_menu;
69 QAction *createSubAnalysisAction;
70 QAction *saveBrowserPixmapAction;
72 std::vector <IntAction *> pick_actions;
73 std::vector <IntAction *> view_actions;
75 ThresholdWidget *threshold_widget;
79 //! reference to a MussaAlignedWindow
80 typedef boost::shared_ptr<MussaAlignedWindow> MussaAlignedWindowRef;