]> git.donarmstrong.com Git - mothur.git/blobdiff - readdistcommand.cpp
forced rarefaction.single to output ending line for all groups. added subsample...
[mothur.git] / readdistcommand.cpp
index d3cbbb1ff22335b346cb5c01ac90b8dd7c560149..8bf6996333b246814a28009d309ab8f3b6bf8718 100644 (file)
@@ -19,6 +19,7 @@ ReadDistCommand::ReadDistCommand(string option) {
                
                //allow user to run help
                if(option == "help") { help(); abort = true; calledHelp = true; }
+               else if(option == "citation") { citation(); abort = true; calledHelp = true;}
                
                else {
                        /*//valid paramters for this command
@@ -120,7 +121,7 @@ ReadDistCommand::ReadDistCommand(string option) {
                        //get user cutoff and precision or use defaults
                        string temp;
                        temp = validParameter.validFile(parameters, "precision", false);                if (temp == "not found") { temp = "100"; }
-                       convert(temp, precision); 
+                       m->mothurConvert(temp, precision); 
                        
                        temp = validParameter.validFile(parameters, "sim", false);                              if (temp == "not found") { temp = "F"; }
                        sim = m->isTrue(temp); 
@@ -196,7 +197,7 @@ int ReadDistCommand::execute(){
                                m->openOutputFile(newGroupFile, outGroups);
                                
                                for (int i = 0; i < matrix->getNumSeqs(); i++) {
-                                       if (m->control_pressed) { delete groupMap; delete matrix; outGroups.close(); remove(newGroupFile.c_str()); return 0; }
+                                       if (m->control_pressed) { delete groupMap; delete matrix; outGroups.close(); m->mothurRemove(newGroupFile); return 0; }
                                        
                                        Names temp = matrix->getRowInfo(i);
                                        outGroups << temp.seqName << '\t' << temp.groupName << endl;
@@ -213,7 +214,7 @@ int ReadDistCommand::execute(){
                                groupMap = new GroupMap(groupfile);
                                groupMap->readMap();
                                
-                               if (m->control_pressed) { delete groupMap; delete matrix; remove(newGroupFile.c_str()); return 0; }
+                               if (m->control_pressed) { delete groupMap; delete matrix; m->mothurRemove(newGroupFile); return 0; }
        
                                globaldata->gGroupmap = groupMap;
                        }