]> git.donarmstrong.com Git - mothur.git/blobdiff - getcommandinfocommand.cpp
added sequence name to error string in fastq.info. Changed np_shannon to npshannon.
[mothur.git] / getcommandinfocommand.cpp
index 283cd405eed10282df0ded886c616cb003b7847a..03c6b17a8a9be441c52070f2af24705eb8f3a168 100644 (file)
@@ -92,7 +92,7 @@ int GetCommandInfoCommand::execute(){
                //loop through each command outputting info
                for (it = commands.begin(); it != commands.end(); it++) {
                        
-                       if (m->control_pressed) { m->mothurOut("[ERROR]: did not complete making the file."); m->mothurOutEndLine(); out.close(); remove((output+".temp").c_str()); }
+                       if (m->control_pressed) { m->mothurOut("[ERROR]: did not complete making the file."); m->mothurOutEndLine(); out.close(); m->mothurRemove((output+".temp")); }
                        
                        Command* thisCommand = commandFactory->getCommand(it->first);
                        
@@ -113,6 +113,16 @@ int GetCommandInfoCommand::execute(){
                                }
                                out << "help=" << newHelpString << endl;
                                
+                               //remove /n from citation string since gui reads line by line
+                               string mycitationString = thisCommand->getCitation();
+                               string newCitationString = "";
+                               for (int i = 0; i < mycitationString.length(); i++) { 
+                                       if (mycitationString[i] != '\n') { newCitationString += mycitationString[i]; }
+                               }
+                               out << "citation=" << newCitationString << endl;
+                               
+                               out << "description=" << thisCommand->getDescription() << endl;
+                               
                                //outputTypes - makes something like outputTypes=fasta-name-qfile
                                map<string, vector<string> > thisOutputTypes = thisCommand->getOutputFiles();
                                map<string, vector<string> >::iterator itTypes;
@@ -176,7 +186,7 @@ int GetCommandInfoCommand::execute(){
                out2.close();
                
                m->appendFiles(output+".temp", output);
-               remove((output+".temp").c_str());
+               m->mothurRemove((output+".temp"));
        
                m->mothurOutEndLine();
                m->mothurOut("Output File Names: "); m->mothurOutEndLine();