]> git.donarmstrong.com Git - mothur.git/blobdiff - listseqscommand.cpp
added average and nearest neighbor methods to hcluster
[mothur.git] / listseqscommand.cpp
index a7d79f39cd8fd271d448c32bc2a6180264a86392..3087b48fd9669d13b5460f032f911b8f32049dce 100644 (file)
@@ -21,7 +21,7 @@ ListSeqsCommand::ListSeqsCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"fasta","name", "group", "align" };
+                       string Array[] =  {"fasta","name", "group", "alignreport" };
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -47,7 +47,7 @@ ListSeqsCommand::ListSeqsCommand(string option){
                        if (groupfile == "not open") { abort = true; }
                        else if (groupfile == "not found") {  groupfile = "";  }        
                        
-                       alignfile = validParameter.validFile(parameters, "align", true);
+                       alignfile = validParameter.validFile(parameters, "alignreport", true);
                        if (alignfile == "not open") { abort = true; }
                        else if (alignfile == "not found") {  alignfile = "";  }
                        
@@ -67,7 +67,7 @@ ListSeqsCommand::ListSeqsCommand(string option){
 void ListSeqsCommand::help(){
        try {
                mothurOut("The list.seqs command reads a fasta, name, group or alignreport file and outputs a .accnos file containing sequence names.\n");
-               mothurOut("The list.seqs command parameters are fasta, name, group and align.  You must provide one of these parameters.\n");
+               mothurOut("The list.seqs command parameters are fasta, name, group and alignreport.  You must provide one of these parameters.\n");
                mothurOut("The list.seqs command should be in the following format: list.seqs(fasta=yourFasta).\n");
                mothurOut("Example list.seqs(fasta=amazon.fasta).\n");
                mothurOut("Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n");
@@ -125,7 +125,7 @@ void ListSeqsCommand::readFasta(){
                        Sequence currSeq(in);
                        name = currSeq.getName();
                        
-                       names.push_back(name);
+                       if (name != "") {  names.push_back(name);  }
                        
                        gobble(in);
                }