1 #ifndef _MUSSA_CLASS_H_
2 #define _MUSSA_CLASS_H_
3 // This file is part of the Mussa source distribution.
4 // http://mussa.caltech.edu/
5 // Contact author: Tristan De Buysscher, tristan@caltech.edu
7 // This program and all associated source code files are Copyright (C) 2005
8 // the California Institute of Technology, Pasadena, CA, 91125 USA. It is
9 // under the GNU Public License; please see the included LICENSE.txt
10 // file for more information, or contact Tristan directly.
13 // ----------------------------------------
14 // ---------- mussa_class.hh -----------
15 // ----------------------------------------
21 #include "mussa_nway.hh"
22 #include "sequence.hh"
24 std::string int_to_str(int an_int);
28 friend class MussaOverlord;
29 friend class ConnWindow;
33 // parameters needed for a mussa analysis
34 std::string ana_name, file_path_base;
35 int seq_num, window, threshold, soft_thres;
38 std::list<std::string> seq_files, annot_files;
39 std::list<int> fasta_indices, sub_seq_starts, sub_seq_ends;
40 bool win_override, thres_override;
41 bool win_append, thres_append;
44 std::vector<Sequence> the_Seqs;
46 std::vector<std::vector<FLPs> > all_comps;
47 //! N-way data, ie the mussa results
52 std::string get_Seqs();
60 // parameters need to be set before calling this
61 // w & t are for command line override functionality, set to 0 to ignore
62 std::string analyze(int w, int t, char ana_mode, double ent_thres);
64 void save_muway(std::string save_path);
65 std::string load(std::string ana_file);
67 // clear parameters and initialize data lists
70 // set parameters from a file - 'mupa' ~ mussa parameters
71 std::string load_mupa_file(std::string para_file_path);
73 // set parameters individually (eg from user input into gui classes)
74 void set_name(std::string a_name);
75 void set_seq_num(int a_num);
76 void set_window(int a_window);
77 void set_threshold(int a_threshold);
78 void set_soft_thres(int sft_thres);
79 void set_ana_mode(char new_ana_mode);
80 // sets an individual sequence to a string (no ATCGN checking atm)
81 void add_a_seq(std::string a_seq);
82 // sets info to load a seq and annotations from a fasta file
83 void set_seq_info(std::string seq_file, std::string annot_file,
84 int fa_i, int a_start, int the_end);
86 // deprecated - support bridge for python version of mussa
87 // these save & load from the old file format
89 void load_old(char * load_file_path, int s_num);