]> git.donarmstrong.com Git - mothur.git/blobdiff - readotucommand.cpp
fixed bug in heatmap
[mothur.git] / readotucommand.cpp
index 2a0d33fe352b8e6f4621fd5d336b63ccfb5824b4..c8ec791c5c667e1f01bfdc59944ed2811e345d6c 100644 (file)
@@ -14,7 +14,7 @@ ReadOtuCommand::ReadOtuCommand(){
        try {
                globaldata = GlobalData::getInstance();
                filename = globaldata->inputFileName;
-               read = new ReadPhilFile(filename);
+               read = new ReadOTUFile(filename);
                if (globaldata->getFormat() == "shared") {
                        //read in group map info.
                        groupMap = new GroupMap(globaldata->getGroupFile());
@@ -44,13 +44,19 @@ int ReadOtuCommand::execute(){
                if (globaldata->getFormat() == "shared") {
                        groupMap->readMap();
                        
-                       if (globaldata->gGroupmap != NULL) { delete globaldata->gGroupmap;  }
-                       globaldata->gGroupmap = groupMap;
-               
+                       //if (globaldata->gGroupmap != NULL) { delete globaldata->gGroupmap;  }
+                       globaldata->gGroupmap = groupMap;               
                        shared = new SharedCommand();
                        shared->execute();
+
                        parselist = new ParseListCommand();
                        parselist->execute();
+                       
+                       //change format to shared  to speed up commands
+                       globaldata->setFormat("sharedfile");
+                       globaldata->setListFile("");
+                       globaldata->setGroupFile("");
+                       globaldata->setSharedFile(getRootName(filename) + "shared");
                }
                return 0;
        }