From 336103ed40931c3317808a0bf9b7e33d502227d7 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Tue, 21 Feb 2006 08:42:03 +0000 Subject: [PATCH] add notes of what i learned about seqcomp and nway stored notes as doxygen comments --- flp.cxx | 25 ------------------------- flp.hh | 15 ++++++++++++++- gui/ConnView.hh | 1 + mussa_class.hh | 5 +++++ mussa_nway.hh | 2 ++ 5 files changed, 22 insertions(+), 26 deletions(-) diff --git a/flp.cxx b/flp.cxx index 73527d2..879f550 100644 --- a/flp.cxx +++ b/flp.cxx @@ -82,16 +82,11 @@ FLPs::matches(int index) index = abs(index); list_i = all_matches[index].begin(); list_end = all_matches[index].end(); - //if (list_i == list_end) - //cout << "its fuckin empty!!!!"; while (list_i != list_end) { these_matches.push_back(list_i->index); - //cout << list_i->index << " "; ++list_i; } - //cout << endl; - return these_matches; } @@ -106,22 +101,15 @@ FLPs::thres_matches(int index, int thres) list_end = all_matches[index].end(); thres_matches.clear(); - //if (list_i == list_end) - //cout << "its fuckin empty!!!!"; while (list_i != list_end) { if (list_i->score >= thres) thres_matches.push_back(list_i->index); - //cout << list_i->index << " "; - ++list_i; } - //cout << endl; - return thres_matches; } - void FLPs::file_save(string save_file_path) { @@ -166,11 +154,6 @@ FLPs::file_load(string file_path) list a_match_list; int i; - - - - - data_file.open(file_path.c_str(), ios::in); getline(data_file,file_data_line); @@ -225,11 +208,3 @@ FLPs::file_load(string file_path) data_file.close(); } -/* - cout << "fee\n"; - cout << "fie\n"; - cout << "foe "; - cout << "fum\n"; -*/ - - diff --git a/flp.hh b/flp.hh index a34b51a..bbeff41 100644 --- a/flp.hh +++ b/flp.hh @@ -40,18 +40,31 @@ class FLPs public: FLPs(); + //! Setup a FLP and reserve space for the match lists + /*! + * Initialize the all_matches structure with a list of matches + * for enough windows for the size of sequence 1 + */ 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(std::string seq1, std::string seq2, bool is_RC); //bool FLPs::match_less(match *match1, match *match2); //void FLPs::sort(); + //! Return all the matches for a particular window? std::list matches(int index); - //version with int threshold + //! Return all the matches for a particular window abouve threshold std::list thres_matches(int index, int thres); + //! Return the number of windows for sequence 1 int win_num(); + //! Save all the FLPs to save_file_path void file_save(std::string save_file_path); + //! Load a vector of a lists of FLPs void file_load(std::string file_path); + /*! All of the matches are stored here, it appears each window position + * in sequence 1 gets an entry in the vector, the list contains matches + * between sequence 1 and sequence 2 + */ std::vector > all_matches; }; #endif diff --git a/gui/ConnView.hh b/gui/ConnView.hh index cf28ff7..2efaba3 100644 --- a/gui/ConnView.hh +++ b/gui/ConnView.hh @@ -52,6 +52,7 @@ class ConnView : public Fl_Box //this data is passed as pointers to the instantiated classes std::vector *S; + //! Store the nway paths our analysis did, we mostly need the refined paths Nway_Paths *P; int name_pad, y_pad; diff --git a/mussa_class.hh b/mussa_class.hh index 334f10f..341a3e4 100644 --- a/mussa_class.hh +++ b/mussa_class.hh @@ -51,6 +51,11 @@ class Mussa // Private methods std::string get_Seqs(); void seqcomp(); + /*! actually run the nway comparison + * it appears there are 4 modes, t (trans_path_search), + * r (radiate_path_search), e (entropy_path_search), and + * o, (find_paths_r (old recursive analysis)) + */ void nway(); diff --git a/mussa_nway.hh b/mussa_nway.hh index 32209c4..41fde80 100644 --- a/mussa_nway.hh +++ b/mussa_nway.hh @@ -38,6 +38,8 @@ class Nway_Paths public: Nway_Paths(); + //! setup an nway comparison, initialize # of species, window size, + //! threshold void setup(int sp_num, int w, int t); void setup_ent(double new_entropy_thres, std::vector some_Seqs); void set_soft_thres(int soft_thres); -- 2.30.2