]> git.donarmstrong.com Git - mothur.git/blobdiff - listseqscommand.cpp
added count.seqs command and made some modifcations to the uchime code to allow it...
[mothur.git] / listseqscommand.cpp
index b977304c9ce54493e5f34dc20705ea1855b21bc4..902ac87286e302977d2fe555754a632487e6e43b 100644 (file)
@@ -41,7 +41,7 @@ string ListSeqsCommand::getHelpString(){
                helpString += "The list.seqs command parameters are fasta, name, group, list, taxonomy and alignreport.  You must provide one of these parameters.\n";
                helpString += "The list.seqs command should be in the following format: list.seqs(fasta=yourFasta).\n";
                helpString += "Example list.seqs(fasta=amazon.fasta).\n";
-               helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+               helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
                return helpString;
        }
        catch(exception& e) {
@@ -71,7 +71,7 @@ ListSeqsCommand::ListSeqsCommand(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 {
                        vector<string> myArray = setParameters();
                        
@@ -257,18 +257,32 @@ int ListSeqsCommand::readFasta(){
                m->openInputFile(fastafile, in);
                string name;
                
+               //ofstream out;
+               //string newFastaName = outputDir + m->getRootName(m->getSimpleName(fastafile)) + "numsAdded.fasta";
+               //m->openOutputFile(newFastaName, out);
+               //int count = 1;
+               //string lastName = "";
+               
                while(!in.eof()){
                        
                        if (m->control_pressed) { in.close(); return 0; }
                        
                        Sequence currSeq(in);
                        name = currSeq.getName();
+                       //if (lastName == "") { lastName = name; }
+                       //if (name != lastName) { count = 1; }
+               //      lastName = name;
+                       
+                       //Sequence newSeq(name+"_"+toString(count), currSeq.getAligned());
+                       //newSeq.printSequence(out);
                        
                        if (name != "") {  names.push_back(name);  }
                        
                        m->gobble(in);
+                       //count++;
                }
                in.close();     
+               //out.close();
                
                return 0;