+
+ delete phylo;
+
+ if (method == "classify") {
+ splitDistanceFileByTax(seqGroup, numGroups);
+ }else {
+ createDistanceFilesFromTax(seqGroup, numGroups);
+ }
+
+
+ return 0;
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SplitMatrix", "splitClassify");
+ exit(1);
+ }
+}
+/***********************************************************************/
+int SplitMatrix::createDistanceFilesFromTax(map<string, int>& seqGroup, int numGroups){
+ try {
+ map<string, int>::iterator it;
+ map<string, int>::iterator it2;
+ map<string, int> seqIndexInFasta;
+
+ //read fastafile
+ SequenceDB alignDB;
+
+ ifstream filehandle;
+ openInputFile(fastafile, filehandle);
+ int numSeqs = 0;
+ while (!filehandle.eof()) {
+ //input sequence info into sequencedb
+ Sequence newSequence(filehandle);
+
+ if (newSequence.getName() != "") {
+ alignDB.push_back(newSequence);
+ seqIndexInFasta[newSequence.getName()] = numSeqs;
+ numSeqs++;
+ }
+
+ //takes care of white space
+ gobble(filehandle);
+ }
+ filehandle.close();
+
+ Dist* distCalculator = new oneGapDist();
+
+
+//still not done....
+
+
+ return 0;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SplitMatrix", "createDistanceFilesFromTax");
+ exit(1);
+ }
+}
+/***********************************************************************/
+int SplitMatrix::splitDistanceFileByTax(map<string, int>& seqGroup, int numGroups){
+ try {
+ map<string, int>::iterator it;
+ map<string, int>::iterator it2;
+