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;
}
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)
{
list<match> a_match_list;
int i;
-
-
-
-
-
data_file.open(file_path.c_str(), ios::in);
getline(data_file,file_data_line);
data_file.close();
}
-/*
- cout << "fee\n";
- cout << "fie\n";
- cout << "foe ";
- cout << "fum\n";
-*/
-
-
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<int> matches(int index);
- //version with int threshold
+ //! Return all the matches for a particular window abouve threshold
std::list<int> 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<std::list<match> > all_matches;
};
#endif
//this data is passed as pointers to the instantiated classes
std::vector<Sequence> *S;
+ //! Store the nway paths our analysis did, we mostly need the refined paths
Nway_Paths *P;
int name_pad, y_pad;
// 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();
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<std::string> some_Seqs);
void set_soft_thres(int soft_thres);