string tag = "";
time_t start;
float previousDist = 0.00000;
- float rndPreviousDist = 0.00000;
+ float rndPreviousDist = 0.00000;
//read blastfile - creates sparsematrices for the distances and overlaps as well as a listvector
//must remember to delete those objects here since readBlast does not
read = new ReadBlast(blastfile, cutoff, penalty, length, minWanted, hclusterWanted);
read->read(nameMap);
-
- list = new ListVector(nameMap->getListVector());
- RAbundVector* rabund = new RAbundVector(list->getRAbundVector());
+
+ list = new ListVector(nameMap->getListVector());
+ RAbundVector* rabund = NULL;
+ if(large) {
+ map<string, int> nameMapCounts = m->readNames(namefile);
+ RAbundVector* rabund = createRabund(list, nameMapCounts);
+ }else {
+ RAbundVector* rabund = new RAbundVector(list->getRAbundVector());
+ }
+
+
+ //list = new ListVector(nameMap->getListVector());
+ //RAbundVector* rabund = new RAbundVector(list->getRAbundVector());
if (m->control_pressed) { outputTypes.clear(); delete nameMap; delete read; delete list; delete rabund; return 0; }
//**********************************************************************************************************************
+RAbundVector MGClusterCommand::createRabund(ListVector list, map<string, int> nameMapCounts){
+ try {
+ RAbundVector rav;
+ for(int i = 0; i < list->getNumBins(); i++) { rav.push_back(nameMapCounts[i]); }
+ return rav;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "MGClusterCommand", "createRabund");
+ exit(1);
+ }
+
+}
-
+//**********************************************************************************************************************