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
50 //! display how many base pairs were copied on the status bar
51 void showBasePairsCopied(size_t);
54 // figure out what Alignments we have (needed for setupAlignmentMenus)
55 void setSelectedPaths(MussaRef m, const std::set<int>& sel_paths);
60 //! set menus (must be called after setSelectedPaths)
61 void setupAlignmentMenus();
62 void computeMatchLines();
65 boost::shared_ptr<QDir> default_dir;
66 //std::vector<Sequence> sequences;
67 //const std::set<int>& selected_paths;
68 std::vector<ConservedPath> selected_paths;
69 std::vector<bool> view_paths;
70 SubanalysisWindowRef subanalysis_window;
71 SequenceBrowserWidget browser;
72 QMenu pick_align_menu;
73 QMenu view_align_menu;
75 QAction *createSubAnalysisAction;
76 QAction *saveBrowserPixmapAction;
78 std::vector <IntAction *> pick_actions;
79 std::vector <IntAction *> view_actions;
81 ThresholdWidget *threshold_widget;
85 //! reference to a MussaAlignedWindow
86 typedef boost::shared_ptr<MussaAlignedWindow> MussaAlignedWindowRef;