7 * Created by Sarah Westcott on 3/6/09.
8 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
14 #include "globaldata.hpp"
15 #include "progress.hpp"
34 FullMatrix(ifstream&);
38 void printMatrix(ostream&);
39 void setBounds(); //requires globaldata->Groups to be filled
40 vector<float> getMins(int); //returns vector of mins for "box" requested ie. groups A, B, 0 = AA, 1 = AB, 2 = BA, 3 = BB;
41 void getDist(vector<float>&); //fills a vector with the valid distances for the integral form.
42 void shuffle(string, string); //shuffles the sequences in the groups passed in.
43 void restore(); //unshuffles the matrix.
46 void sortGroups(int, int); //this function sorts the sequences within the matrix.
47 void getBounds(int&, string);
48 void readSquareMatrix(ifstream&);
49 void readLTMatrix(ifstream&);
50 void printMinsForRows(ostream&);
52 map<int, Names> index; // row in vector, sequence group. need to know this so when we sort it can be updated.
53 map<int, Swap> restoreIndex; //a map of the swaps made so you can undo them in restore.
54 map<int, Names>::iterator it;
55 map<int, Swap>::reverse_iterator it2;
57 vector< vector<float> > matrix; //a 2D distance matrix of all the sequences and their distances to eachother.
58 vector<float> minsForRows; //vector< minimum distance for that subrow> - one for each comparison.
59 vector<int> bounds; //bounds[1] = starting row in matrix from group B, bounds[2] = starting row in matrix from group C, bounds[3] = no need to find upper bound of C because its numSeqs.
61 GroupMap* groupmap; //maps sequences to groups they belong to.
62 GlobalData* globaldata;
63 int numSeqs, numGroups, numUserGroups;