]> git.donarmstrong.com Git - mothur.git/blobdiff - readotucommand.cpp
fixed bug in heatmap
[mothur.git] / readotucommand.cpp
index c7e83e4db2e5a3048fcf9144db13c8044eada09c..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());
@@ -43,12 +43,20 @@ int ReadOtuCommand::execute(){
                read->read(&*globaldata); 
                if (globaldata->getFormat() == "shared") {
                        groupMap->readMap();
-                       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;
        }
@@ -61,4 +69,4 @@ int ReadOtuCommand::execute(){
                exit(1);
        }
 }
-//**********************************************************************************************************************
\ No newline at end of file
+//**********************************************************************************************************************