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);
29 friend class MussaOverlord;
30 friend class ConnWindow;
34 // parameters needed for a mussa analysis
35 std::string ana_name, file_path_base;
36 int seq_num, window, threshold, soft_thres;
39 std::list<std::string> seq_files, annot_files;
40 std::list<int> fasta_indices, sub_seq_starts, sub_seq_ends;
41 bool win_override, thres_override;
42 bool win_append, thres_append;
45 std::vector<Sequence> the_Seqs;
47 std::vector<std::vector<FLPs> > all_comps;
48 // N-way data, ie the mussa results
53 std::string get_Seqs();
61 // parameters need to be set before calling this
62 // w & t are for command line override functionality, set to 0 to ignore
63 std::string analyze(int w, int t, char ana_mode, double ent_thres);
65 void save_muway(std::string save_path);
66 std::string load(std::string ana_file);
68 // clear parameters and initialize data lists
71 // set parameters from a file - 'mupa' ~ mussa parameters
72 std::string load_mupa_file(std::string para_file_path);
74 // set parameters individually (eg from user input into gui classes)
75 void set_name(std::string a_name);
76 void set_seq_num(int a_num);
77 void set_window(int a_window);
78 void set_threshold(int a_threshold);
79 void set_soft_thres(int sft_thres);
80 void set_ana_mode(char new_ana_mode);
81 // sets an individual sequence to a string (no ATCGN checking atm)
82 void add_a_seq(std::string a_seq);
83 // sets info to load a seq and annotations from a fasta file
84 void set_seq_info(std::string seq_file, std::string annot_file,
85 int fa_i, int a_start, int the_end);
87 // deprecated - support bridge for python version of mussa
88 // these save & load from the old file format
90 void load_old(char * load_file_path, int s_num);