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