#include "flp.hh"
+#include <fstream>
+#include <iostream>
+
+using namespace std;
FLPs::FLPs()
{
+#ifndef _MUSSA_FLP_H_
+#define _MUSSA_FLP_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// ---------- flp.hh -----------
// ----------------------------------------
-#include "sequence.hh"
+#include <list>
+#include <string>
+#include <vector>
// FLP = Fixed Length Pairs (Data)
int window_size;
int hard_threshold;
int seq1_length, seq2_length, seq1_win_num, seq2_win_num;
- string ana_type;
-
+ std::string ana_type;
struct match
{
int score;
};
-
-
-
public:
FLPs();
- void setup(string type, int win_size, int hard_thres, int len1, int len2);
+ void setup(std::string type, int win_size, int hard_thres, int len1, int len2);
inline void add(int seq1_i, int seq2_i, int a_score, int i2_offset);
- void seqcomp(string seq1, string seq2, bool is_RC);
+ void seqcomp(std::string seq1, std::string seq2, bool is_RC);
//bool FLPs::match_less(match *match1, match *match2);
//void FLPs::sort();
- list<int> matches(int index);
+ std::list<int> matches(int index);
//version with int threshold
- list<int> thres_matches(int index, int thres);
+ std::list<int> thres_matches(int index, int thres);
int win_num();
- void file_save(string save_file_path);
- void file_load(string file_path);
+ void file_save(std::string save_file_path);
+ void file_load(std::string file_path);
- vector<list<match> > all_matches;
+ std::vector<std::list<match> > all_matches;
};
+#endif
// ----------------------------------------
#include "flp.hh"
+using namespace std;
// Note one recording RC matches. This version of 'seqcomp' records RC matches
// as index of the window start in its nonRC form. However, past versions of
#include "mussa_gui_conn_window.hh"
-
+#include <iostream>
+using namespace std;
char
parse_args(int argc, char **argv, string *a_file_path, int *window,
// ----------------------------------------
#include "mussa_class.hh"
+
+#include <fstream>
+#include <iostream>
#include <sstream>
+using namespace std;
+
Mussa::Mussa()
{
}
+#ifndef _MUSSA_CLASS_H_
+#define _MUSSA_CLASS_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// ---------- mussa_class.hh -----------
// ----------------------------------------
+#include <list>
+#include <string>
+#include <vector>
+
#include "mussa_nway.hh"
-#include "time.h"
+#include "sequence.hh"
-string int_to_str(int an_int);
+std::string int_to_str(int an_int);
class Mussa
private:
// Private variables
// parameters needed for a mussa analysis
- string ana_name, file_path_base;
+ std::string ana_name, file_path_base;
int seq_num, window, threshold, soft_thres;
char ana_mode;
double ent_thres;
- list<string> seq_files, annot_files;
- list<int> fasta_indices, sub_seq_starts, sub_seq_ends;
+ std::list<std::string> seq_files, annot_files;
+ std::list<int> fasta_indices, sub_seq_starts, sub_seq_ends;
bool win_override, thres_override;
bool win_append, thres_append;
// sequence data
- vector<Sequence> the_Seqs;
+ std::vector<Sequence> the_Seqs;
// the seqcomp data
- vector<vector<FLPs> > all_comps;
+ std::vector<std::vector<FLPs> > all_comps;
// N-way data, ie the mussa results
Nway_Paths the_paths;
// Private methods
- string get_Seqs();
+ std::string get_Seqs();
void seqcomp();
void nway();
// parameters need to be set before calling this
// w & t are for command line override functionality, set to 0 to ignore
- string analyze(int w, int t, char ana_mode, double ent_thres);
+ std::string analyze(int w, int t, char ana_mode, double ent_thres);
void save();
- void save_muway(string save_path);
- string load(string ana_file);
+ void save_muway(std::string save_path);
+ std::string load(std::string ana_file);
// clear parameters and initialize data lists
void clear();
// set parameters from a file - 'mupa' ~ mussa parameters
- string load_mupa_file(string para_file_path);
+ std::string load_mupa_file(std::string para_file_path);
// set parameters individually (eg from user input into gui classes)
- void set_name(string a_name);
+ void set_name(std::string a_name);
void set_seq_num(int a_num);
void set_window(int a_window);
void set_threshold(int a_threshold);
void set_soft_thres(int sft_thres);
void set_ana_mode(char new_ana_mode);
// sets an individual sequence to a string (no ATCGN checking atm)
- void add_a_seq(string a_seq);
+ void add_a_seq(std::string a_seq);
// sets info to load a seq and annotations from a fasta file
- void set_seq_info(string seq_file, string annot_file, int fa_i, int a_start, int the_end);
+ void set_seq_info(std::string seq_file, std::string annot_file,
+ int fa_i, int a_start, int the_end);
// deprecated - support bridge for python version of mussa
// these save & load from the old file format
void save_old();
void load_old(char * load_file_path, int s_num);
};
-
+#endif
#include "mussa_gui_annot_window.hh"
+#include <iostream>
+#include <FL/fl_show_colormap.H>
-
+using namespace std;
annot_color
new_blank_annot()
+#ifndef _MUSSA_GUI_ANNOT_WINDOW_H_
+#define _MUSSA_GUI_ANNOT_WINDOW_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// under the GNU Public License; please see the included LICENSE.txt
// file for more information, or contact Tristan directly.
+#include <list>
+#include <string>
+#include <vector>
-#include "mussa_gui_motif_window.hh"
-
-#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Output.H>
#include <FL/Fl_Pack.H>
-#include <FL/fl_show_colormap.H>
+
+#include "mussa_gui_motif_window.hh"
struct annot_color
{
- string type;
+ std::string type;
Fl_Color color;
};
{
public:
AnnotWindow(int w, int h, const char* title,
- vector<annot_color> * some_annots);
+ std::vector<annot_color> * some_annots);
~AnnotWindow();
Fl_Pack * annot_input_pack;
- list<Fl_Output*> annot_ins;
- vector<Fl_Button*> annot_color_buttons;
- list<Fl_Input*> name_ins;
+ std::list<Fl_Output*> annot_ins;
+ std::vector<Fl_Button*> annot_color_buttons;
+ std::list<Fl_Input*> name_ins;
Fl_Button* test;
Fl_Button* add_annot;
void cb_annot_color_i(Fl_Button* o, int i);
private:
- vector<annot_color> * the_annots;
+ std::vector<annot_color> * the_annots;
int annot_count;
void add_annot_input(int index);
};
annot_color new_blank_annot();
+#endif
#include "mussa_gui_conn_view.hh"
-
+#include <iomanip>
+#include <math.h>
+using namespace std;
void
ConnView::setup(string name, int sq_num, int win_len,
+#ifndef _MUSSA_GUI_CONN_VIEW_H_
+#define _MUSSA_GUI_CONN_VIEW_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// under the GNU Public License; please see the included LICENSE.txt
// file for more information, or contact Tristan directly.
+#include <list>
+#include <sstream>
+#include <string>
+#include <vector>
+#include "mussa_gui_annot_window.hh"
#include "mussa_gui_subana.hh"
-#include <sstream>
class ConnView : public Fl_Box
{
Fl_Box(x_top,y_top,x_bot,y_bot)
{}
- void setup(string name, int sq_num, int win_len,
- vector<Sequence> *, Nway_Paths *);
+ void setup(std::string name, int sq_num, int win_len,
+ std::vector<Sequence> *, Nway_Paths *);
void scale_paths();
void spawnSeq();
private:
- string ana_name;
+ std::string ana_name;
int seq_num, window, threshold;
bool win_append, thres_append;
//this data is passed as pointers to the instantiated classes
- vector<Sequence> *S;
+ std::vector<Sequence> *S;
Nway_Paths *P;
int name_pad, y_pad;
float y_drag_start;
int ref_seq_num, max_seq_len;
bool dragging, selected;
- list<bool> highlight;
+ std::list<bool> highlight;
//path data scaled for current view size
- list<vector<int> > scaled_pathz;
- vector<int> seq_lens;
- vector<int> seq_scales;
+ std::list<std::vector<int> > scaled_pathz;
+ std::vector<int> seq_lens;
+ std::vector<int> seq_scales;
int bar_interval, line_interval;
bool show_bars, show_lines;
//keeps track of all the motifs the user has inputed
- vector<motif> some_motifs;
+ std::vector<motif> some_motifs;
MotifWindow *motif_find_window;
//keeps track of the colors assigned to each motif type
- vector<annot_color> some_annots;
+ std::vector<annot_color> some_annots;
AnnotWindow *annot_color_window;
SeqWindow *a_seq_win;
void check_new_motifs();
//for drawing function debugging
- void reporter(string var, int value);
- void report_float(string var, float value);
+ void reporter(std::string var, int value);
+ void report_float(std::string var, float value);
};
+#endif
#include "mussa_gui_conn_window.hh"
+#include <iostream>
+using namespace std;
void
load_ana_cb(Fl_Button* o, void* v)
+#ifndef _MUSSA_GUI_CONN_WINDOW_H_
+#define _MUSSA_GUI_CONN_WINDOW_H_
+
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// under the GNU Public License; please see the included LICENSE.txt
// file for more information, or contact Tristan directly.
+#include <string>
-#include "mussa_gui_conn_view.hh"
-#include <FL/fl_ask.H>
+#include <Fl/Fl_Double_Window.H>
+#include <Fl/Fl_Menu_Item.H>
+#include "mussa_gui_conn_view.hh"
+#include "mussa_gui_load_window.hh"
+#include "mussa_gui_subana.hh"
+#include "mussa_gui_seq_text.hh"
class ConnWindow : public Fl_Double_Window
{
SubanaWindow *subana_win;
SeqTextWin *show_seq_win;
int padding, name_pad;
- string window_name;
+ std::string window_name;
public:
ConnWindow(int w, int h, const char* title);
void real_toggle_lines_cb();
void real_set_line_len_cb(Fl_Input* o);
void real_set_soft_thres_cb(Fl_Input* o);
-
-
- // I goddamned hate gcc
};
+
+#endif
#include "mussa_gui_load_window.hh"
+#include <iostream>
+#include <FL/Fl_File_Chooser.H>
+
+using namespace std;
+
bool
SetupWindow::done()
{
+#ifndef _MUSSA_GUI_LOAD_WINDOW_H_
+#define _MUSSA_GUI_LOAD_WINDOW_H_
+
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// under the GNU Public License; please see the included LICENSE.txt
// file for more information, or contact Tristan directly.
-
-#include "mussa_gui_annot_window.hh"
-#include <FL/Fl_File_Chooser.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Input.H>
#include <FL/Fl_Scroll.H>
+#include <FL/Fl_Window.H>
+
+#include "mussa_class.hh"
+#include "mussa_gui_load_window.hh"
class SetupWindow : public Fl_Window
{
Fl_Scroll *seq_scroll;
// need to keep track of these so a browsed file search can set the input
// fields to teh selected file
- vector<Fl_Input*> seq_inputs, annot_inputs;
+ std::vector<Fl_Input*> seq_inputs, annot_inputs;
// callback receiver functions
private:
Mussa *an_analysis;
- string ana_name;
+ std::string ana_name;
int window, threshold, seq_num;
- vector<string> seq_files, annot_files;
- vector<int> fasta_indices, sub_seq_starts, sub_seq_ends;
+ std::vector<std::string> seq_files, annot_files;
+ std::vector<int> fasta_indices, sub_seq_starts, sub_seq_ends;
bool win_append, thres_append;
bool all_done;
SetupWindow * sw_ptr;
int index;
};
+
+#endif
#include "mussa_gui_motif_window.hh"
+#include <iostream>
+#include <FL/fl_show_colormap.H>
+
+using namespace std;
motif
new_blank_motif()
+#ifndef _MUSSA_GUI_MOTIF_WINDOW_H_
+#define _MUSSA_GUI_MOTIF_WINDOW_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// under the GNU Public License; please see the included LICENSE.txt
// file for more information, or contact Tristan directly.
+#include <list>
+#include <string>
+#include <vector>
-#include "mussa_class.hh"
-
-#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Input.H>
-#include <FL/Fl_Output.H>
#include <FL/Fl_Pack.H>
-#include <FL/fl_show_colormap.H>
+
+#include "mussa_class.hh"
struct motif
{
- string name, seq;
+ std::string name, seq;
Fl_Color color;
- vector<vector<int> > locations;
+ std::vector<std::vector<int> > locations;
bool dirty;
};
class MotifWindow : public Fl_Window
{
public:
- MotifWindow(int w, int h, const char* title, vector<motif> * some_motifs);
+ MotifWindow(int w, int h, const char* title, std::vector<motif> * some_motifs);
~MotifWindow();
Fl_Pack * motif_input_pack;
- list<Fl_Input*> motif_ins;
- vector<Fl_Button*> motif_color_buttons;
- list<Fl_Input*> name_ins;
+ std::list<Fl_Input*> motif_ins;
+ std::vector<Fl_Button*> motif_color_buttons;
+ std::list<Fl_Input*> name_ins;
Fl_Button* test;
Fl_Button* add_motif;
void cb_motif_color_i(Fl_Button* o, int i);
private:
- vector<motif> * the_motifs;
+ std::vector<motif> * the_motifs;
int motif_count;
void add_motif_input(int index);
};
motif new_blank_motif();
+#endif
#include "mussa_gui_seq.hh"
+
#include <sstream>
+#include <FL/Fl.H>
+
+using namespace std;
void
set_align_cb(Fl_Widget* widg, void* the_data)
+#ifndef _MUSSA_GUI_SEQ_H_
+#define _MUSSA_GUI_SEQ_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// under the GNU Public License; please see the included LICENSE.txt
// file for more information, or contact Tristan directly.
+#include <iostream>
+#include <list>
+#include <string>
+#include <vector>
#include "mussa_gui_seq_view.hh"
#include <FL/Fl_Menu_Button.H>
#include <FL/Fl_Double_Window.H>
-
class SeqWindow : public Fl_Double_Window
{
private:
- string ana_name;
+ std::string ana_name;
int base_window_len;
//this data is passed as pointers to the instantiated classes
- vector<Sequence> *S;
+ std::vector<Sequence> *S;
// list of paths in selection box
- list<vector<int> > P;
- vector<int> seq_lens;
+ std::list<std::vector<int> > P;
+ std::vector<int> seq_lens;
//pointer to passed motif data
- vector<motif> *the_motifs;
+ std::vector<motif> *the_motifs;
int x_max, y_max;
Fl_Menu_Button *choose_align_menu;
int seq_num;
SeqWindow(int w, int h, const char* title, int sq_num,
- vector<Sequence> *some_seqs,
- list<vector<int> > some_paths, vector<int> some_lens,
- vector<motif> *some_motifs);
- virtual ~SeqWindow(){ cout << "dying\n"; }
+ std::vector<Sequence> *some_seqs,
+ std::list<std::vector<int> > some_paths,
+ std::vector<int> some_lens,
+ std::vector<motif> *some_motifs);
+ virtual ~SeqWindow(){ std::cout << "dying\n"; }
void make_choose_menu();
void make_show_menu();
};
-
struct menu_align_data_bundle
{
SeqWindow * swm_ptr;
int which_align;
};
+#endif
#include "mussa_gui_seq_text.hh"
-
+#include <iostream>
+using namespace std;
void
get_seq_cb(Fl_Button* o, void* v)
{
+#ifndef _MUSSA_GUI_SEQ_TEXT_H_
+#define _MUSSA_GUI_SEQ_TEXT_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// under the GNU Public License; please see the included LICENSE.txt
// file for more information, or contact Tristan directly.
+#include <string>
+#include <vector>
-#include "mussa_gui_seq.hh"
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Input.H>
#include <FL/Fl_Text_Buffer.H>
#include <FL/Fl_Text_Display.H>
#include <FL/Fl_Multiline_Output.H>
+#include "mussa_gui_seq.hh"
+
class SeqTextWin : public Fl_Window
{
public:
- SeqTextWin(int w, int h, const char* title, vector<Sequence> some_Seqs);
+ SeqTextWin(int w, int h, const char* title, std::vector<Sequence> some_Seqs);
~SeqTextWin();
Fl_Button* get_seq_but;
private:
// sequence data
- vector<Sequence> the_Seqs;
- string sub_sequence;
+ std::vector<Sequence> the_Seqs;
+ std::string sub_sequence;
int seq_id, seq_start, seq_end;
};
-
+#endif
#include "mussa_gui_seq.hh"
#include <sstream>
+#include <FL/Fl.H>
+#include <FL/fl_draw.H>
+
+using namespace std;
+
void
SeqView::setup(string name, int sq_num,
vector<Sequence> *some_seqs,
+#ifndef _MUSSA_GUI_SEQ_VIEW_H_
+#define _MUSSA_GUI_SEQ_VIEW_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// under the GNU Public License; please see the included LICENSE.txt
// file for more information, or contact Tristan directly.
+#include <list>
+#include <string>
+#include <vector>
-#include "mussa_gui_load_window.hh"
-
-#include <math.h>
#include <FL/Fl_Box.H>
-#include <FL/fl_draw.H>
+
+#include "mussa_gui_motif_window.hh"
+#include "mussa_gui_load_window.hh"
class SeqView : public Fl_Box
{
show_motifs = true;
}
- void setup(string name, int sq_num, vector<Sequence> *some_seqs,
- list<vector<int> > some_paths, vector<int> some_lens,
- vector<motif> *some_motifs);
+ void setup(std::string name, int sq_num, std::vector<Sequence> *some_seqs,
+ std::list<std::vector<int> > some_paths,
+ std::vector<int> some_lens, std::vector<motif> *some_motifs);
void align_offsets(int align_num);
void toggle_align(int align_num);
void toggle_bars();
void toggle_motifs();
private:
- string ana_name;
+ std::string ana_name;
int seq_num;
int base_window_len;
//this data is passed as pointers to the instantiated classes
- vector<Sequence> *S;
+ std::vector<Sequence> *S;
//list of paths in selection box
- list<vector<int> > P;
- vector<int> seq_lens;
+ std::list<std::vector<int> > P;
+ std::vector<int> seq_lens;
//pointer to passed motif data
- vector<motif> *the_motifs;
+ std::vector<motif> *the_motifs;
int x_max, y_max, x_min, y_min;
int y_seq_incre;
int index_pad;
- vector<int> seq_align_offsets;
- vector<string> raw_sequence;
+ std::vector<int> seq_align_offsets;
+ std::vector<std::string> raw_sequence;
bool dragging;
int drag_change, scroll_offset;
bool show_bars, show_motifs;
- vector<bool> show_aligns;
+ std::vector<bool> show_aligns;
void resize(int new_x, int new_y, int new_w, int new_h);
void draw();
void draw_match_lines(double ch_width);
void draw_indices(double ch_width);
int handle(int e);
- void reporter(string id, int value);
+ void reporter(std::string id, int value);
};
+#endif
#include "mussa_gui_subana.hh"
+#include <iostream>
+using namespace std;
void
do_subana_cb(Fl_Button* o, void* v)
+#ifndef _MUSSA_GUI_SUBANA_H_
+#define _MUSSA_GUI_SUBANA_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// under the GNU Public License; please see the included LICENSE.txt
// file for more information, or contact Tristan directly.
+#include <string>
+#include <vector>
-#include "mussa_gui_seq_text.hh"
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Input.H>
#include <FL/Fl_File_Chooser.H>
#include <FL/Fl_Scroll.H>
+#include "mussa_class.hh"
+#include "mussa_gui_seq_text.hh"
+
class SubanaWindow : public Fl_Window
{
public:
SubanaWindow(int w, int h, const char* title, Mussa *an_analysis,
- vector<Sequence> some_Seqs);
+ std::vector<Sequence> some_Seqs);
~SubanaWindow();
bool done();
Fl_Scroll *seq_scroll;
// need to keep track of these so a browsed file search can set the input
// fields to the selected file
- vector<Fl_Input*> seq_inputs, annot_inputs;
+ std::vector<Fl_Input*> seq_inputs, annot_inputs;
// callback receiver functions
private:
// sequence data
- vector<Sequence> the_Seqs;
+ std::vector<Sequence> the_Seqs;
Mussa *an_analysis;
- string ana_name;
+ std::string ana_name;
int window, threshold, seq_num;
- vector<int> sub_seq_starts, sub_seq_ends;
+ std::vector<int> sub_seq_starts, sub_seq_ends;
bool win_append, thres_append;
bool all_done;
static void print_cb(Fl_Button*, void*);
inline void print_cb_real(Fl_Button*, void*);
- void add_seq_input(int index, string a_name);
+ void add_seq_input(int index, std::string a_name);
};
// crazy whacked shite Titus taught me to do to get an index value associated
SubanaWindow * sw_ptr;
int index;
};
-
+#endif
// ----------------------------------------
#include "mussa_nway.hh"
-/*
- cout << "fee\n";
- cout << "fie\n";
- cout << "foe\n";
- cout << "fum\n";
-*/
+#include <fstream>
+#include <iostream>
+using namespace std;
Nway_Paths::Nway_Paths()
{
+#ifndef _MUSSA_NWAY_H_
+#define _MUSSA_NWAY_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// ---------- mussa_nway.hh -----------
// ----------------------------------------
+#include <list>
+#include <string>
+#include <vector>
+
#include "flp.hh"
int soft_thres;
double ent_thres;
- vector<char *> c_sequences;
+ std::vector<char *> c_sequences;
- list<vector<int> > pathz;
- list<vector<int> > refined_pathz;
+ std::list<std::vector<int> > pathz;
+ std::list<std::vector<int> > refined_pathz;
public:
Nway_Paths();
void setup(int sp_num, int w, int t);
- void setup_ent(double new_entropy_thres, vector<string> some_Seqs);
+ void setup_ent(double new_entropy_thres, std::vector<std::string> some_Seqs);
void set_soft_thres(int soft_thres);
- void radiate_path_search(vector<vector<FLPs> > all_comparisons);
- void trans_path_search(vector<vector<FLPs> > all_comparisons);
- void entropy_path_search(vector<vector<FLPs> > all_comparisons);
- double path_entropy(vector<int> path);
+ void radiate_path_search(std::vector<std::vector<FLPs> > all_comparisons);
+ void trans_path_search(std::vector<std::vector<FLPs> > all_comparisons);
+ void entropy_path_search(std::vector<std::vector<FLPs> > all_comparisons);
+ double path_entropy(std::vector<int> path);
// old recursive transitive nway ... has issues checking all links?
- void find_paths_r(vector<vector<FLPs> > all_comparisons);
- void path_search(vector<vector<FLPs> > all_comparisons, vector<int> path, int depth);
+ void find_paths_r(std::vector<std::vector<FLPs> > all_comparisons);
+ void path_search(std::vector<std::vector<FLPs> > all_comparisons, std::vector<int> path, int depth);
void simple_refine();
- void save(string save_file_path);
- string load(string load_file_path);
- void add_path(vector<int> loaded_path);
+ void save(std::string save_file_path);
+ std::string load(std::string load_file_path);
+ void add_path(std::vector<int> loaded_path);
int seq_num();
- void find_paths(vector<vector<FLPs> > all_comparisons);
+ void find_paths(std::vector<std::vector<FLPs> > all_comparisons);
void refine();
- void save_old(string save_file_path);
+ void save_old(std::string save_file_path);
void print();
};
+#endif
// file for more information, or contact Tristan directly.
-/*
-#include <list>
-#include <vector>
-#include <string>
-#include <stdlib.h>
-#include <algorithm>
-
-#include <iostream>
-using namespace std;
-*/
#include "mussa_nway.hh"
#include <math.h>
+#include <iostream>
+using namespace std;
// vars that will be availble to entropy function when in its nway class
//vector<char *> c_sequences;
#include "mussa_nway.hh"
+#include <iostream>
+
+using namespace std;
void
Nway_Paths::radiate_path_search(vector<vector<FLPs> > all_comparisons)
// ----------------------------------------
#include "sequence.hh"
+#include <iostream>
+using namespace std;
Sequence::Sequence()
{
+#ifndef _MUSSA_SEQUENCE_H_
+#define _MUSSA_SEQUENCE_H_
// This file is part of the Mussa source distribution.
// http://mussa.caltech.edu/
// Contact author: Tristan De Buysscher, tristan@caltech.edu
// ----------------------------------------
-#include <iostream>
-#include <iomanip>
+#include <fstream>
#include <list>
-#include <vector>
#include <string>
-#include <fstream>
-#include <stdlib.h>
-#include <algorithm>
+#include <vector>
// Sequence data class
struct annot
{
int start, end;
- string name, type;
+ std::string name, type;
};
class Sequence
friend class ConnView;
friend class SeqView;
private:
- string sequence;
- string header;
- string species;
+ std::string sequence;
+ std::string header;
+ std::string species;
int species_num;
- list<annot> annots;
+ std::list<annot> annots;
- void motif_scan(string a_motif, vector<int> * motif_match_starts);
- string rc_motif(string a_motif);
- string motif_validate(string a_motif);
+ void motif_scan(std::string a_motif, std::vector<int> * motif_match_starts);
+ std::string rc_motif(std::string a_motif);
+ std::string motif_validate(std::string a_motif);
public:
Sequence();
- string load_fasta(string file_path, int seq_num,
+ std::string load_fasta(std::string file_path, int seq_num,
int start_index, int end_index);
- string load_annot(string file_path, int start_index, int end_index);
- string seq();
- string subseq(int start, int end);
+ std::string load_annot(std::string file_path, int start_index, int end_index);
+ std::string seq();
+ std::string subseq(int start, int end);
const char * c_seq();
- string rev_comp();
+ std::string rev_comp();
int len();
- string hdr();
- void set_seq(string a_seq);
- vector<int> find_motif(string a_motif);
- string sp_name();
+ std::string hdr();
+ void set_seq(std::string a_seq);
+ std::vector<int> find_motif(std::string a_motif);
+ std::string sp_name();
void clear();
- void save(fstream &save_file);
- void load_museq(string load_file_path, int seq_num);
+ void save(std::fstream &save_file);
+ void load_museq(std::string load_file_path, int seq_num);
};
+#endif