]> git.donarmstrong.com Git - mothur.git/commitdiff
pat's changes after generating wiki pages for 1.5
authorpschloss <pschloss>
Thu, 30 Jul 2009 15:27:29 +0000 (15:27 +0000)
committerpschloss <pschloss>
Thu, 30 Jul 2009 15:27:29 +0000 (15:27 +0000)
getseqscommand.cpp
listseqscommand.cpp
removeseqscommand.cpp

index ae242b6f56946c544aff5f389b026c2c93a50bee..8406b813711aeb655ba786ac47eb6df16020327b 100644 (file)
@@ -21,7 +21,7 @@ GetSeqsCommand::GetSeqsCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"fasta","name", "group", "align", "accnos" };
+                       string Array[] =  {"fasta","name", "group", "alignreport", "accnos" };
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -51,13 +51,13 @@ GetSeqsCommand::GetSeqsCommand(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 = "";  }
                        
-                       if ((fastafile == "") && (namefile == "") && (groupfile == "") && (alignfile == ""))  { mothurOut("You must provide one of the following: fasta, name, group, align."); mothurOutEndLine(); abort = true; }
+                       if ((fastafile == "") && (namefile == "") && (groupfile == "") && (alignfile == ""))  { mothurOut("You must provide one of the following: fasta, name, group, alignreport."); mothurOutEndLine(); abort = true; }
                        
-                       if (parameters.size() > 2) { mothurOut("You may only enter one of the following: fasta, name, group, align."); mothurOutEndLine(); abort = true;  }
+                       if (parameters.size() > 2) { mothurOut("You may only enter one of the following: fasta, name, group, alignreport."); mothurOutEndLine(); abort = true;  }
                }
 
        }
@@ -72,7 +72,7 @@ void GetSeqsCommand::help(){
        try {
                mothurOut("The get.seqs command reads an .accnos file and one of the following file types: fasta, name, group or alignreport file.\n");
                mothurOut("It outputs a file containing only the sequences in the .accnos file.\n");
-               mothurOut("The get.seqs command parameters are accnos, fasta, name, group and align.  You must provide accnos and one of the other parameters.\n");
+               mothurOut("The get.seqs command parameters are accnos, fasta, name, group and alignreport.  You must provide accnos and one of the other parameters.\n");
                mothurOut("The get.seqs command should be in the following format: get.seqs(accnos=yourAccnos, fasta=yourFasta).\n");
                mothurOut("Example get.seqs(accnos=amazon.accnos, fasta=amazon.fasta).\n");
                mothurOut("Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n");
@@ -111,7 +111,7 @@ int GetSeqsCommand::execute(){
 //**********************************************************************************************************************
 void GetSeqsCommand::readFasta(){
        try {
-               string outputFileName = getRootName(fastafile) + "pick";
+               string outputFileName = getRootName(fastafile) + "pick" +  getExtension(fastafile);
                ofstream out;
                openOutputFile(outputFileName, out);
                
@@ -155,7 +155,7 @@ void GetSeqsCommand::readFasta(){
 void GetSeqsCommand::readName(){
        try {
        
-               string outputFileName = getRootName(namefile) + "pick";
+               string outputFileName = getRootName(namefile) + "pick" +  getExtension(namefile);;
                ofstream out;
                openOutputFile(outputFileName, out);
 
@@ -240,7 +240,7 @@ void GetSeqsCommand::readName(){
 void GetSeqsCommand::readGroup(){
        try {
        
-               string outputFileName = getRootName(groupfile) + "pick";
+               string outputFileName = getRootName(groupfile) + "pick" + getExtension(groupfile);
                ofstream out;
                openOutputFile(outputFileName, out);
 
@@ -285,7 +285,7 @@ void GetSeqsCommand::readGroup(){
 //alignreport file has a column header line then all other lines contain 16 columns.  we just want the first column since that contains the name
 void GetSeqsCommand::readAlign(){
        try {
-               string outputFileName = getRootName(alignfile) + "pick";
+               string outputFileName = getRootName(alignfile) + "pick" +  getExtension(alignfile);;
                ofstream out;
                openOutputFile(outputFileName, out);
 
@@ -346,6 +346,7 @@ void GetSeqsCommand::readAlign(){
        }
 }
 //**********************************************************************************************************************
+
 void GetSeqsCommand::readAccnos(){
        try {
                
index a7d79f39cd8fd271d448c32bc2a6180264a86392..efc88e98232497383d8d9234ac2d53641d8d3d6e 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");
index d3d12cc321f9cc6d1021bf7bcab4c13636d1ce80..a49d41a9485d22b6d302164f01913d37f42802aa 100644 (file)
@@ -21,7 +21,7 @@ RemoveSeqsCommand::RemoveSeqsCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"fasta","name", "group", "align", "accnos" };
+                       string Array[] =  {"fasta","name", "group", "alignreport", "accnos" };
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -51,13 +51,13 @@ RemoveSeqsCommand::RemoveSeqsCommand(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 = "";  }
                        
-                       if ((fastafile == "") && (namefile == "") && (groupfile == "") && (alignfile == ""))  { mothurOut("You must provide one of the following: fasta, name, group, align."); mothurOutEndLine(); abort = true; }
+                       if ((fastafile == "") && (namefile == "") && (groupfile == "") && (alignfile == ""))  { mothurOut("You must provide one of the following: fasta, name, group, alignreport."); mothurOutEndLine(); abort = true; }
                        
-                       if (parameters.size() > 2) { mothurOut("You may only enter one of the following: fasta, name, group, align."); mothurOutEndLine(); abort = true;  }
+                       if (parameters.size() > 2) { mothurOut("You may only enter one of the following: fasta, name, group, alignreport."); mothurOutEndLine(); abort = true;  }
                }
 
        }
@@ -72,7 +72,7 @@ void RemoveSeqsCommand::help(){
        try {
                mothurOut("The remove.seqs command reads an .accnos file and one of the following file types: fasta, name, group or alignreport file.\n");
                mothurOut("It outputs a file containing the sequences NOT in the .accnos file.\n");
-               mothurOut("The remove.seqs command parameters are accnos, fasta, name, group and align.  You must provide accnos and one of the other parameters.\n");
+               mothurOut("The remove.seqs command parameters are accnos, fasta, name, group and alignreport.  You must provide accnos and one of the other parameters.\n");
                mothurOut("The remove.seqs command should be in the following format: remove.seqs(accnos=yourAccnos, fasta=yourFasta).\n");
                mothurOut("Example remove.seqs(accnos=amazon.accnos, fasta=amazon.fasta).\n");
                mothurOut("Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n");
@@ -111,7 +111,7 @@ int RemoveSeqsCommand::execute(){
 //**********************************************************************************************************************
 void RemoveSeqsCommand::readFasta(){
        try {
-               string outputFileName = getRootName(fastafile) + "pick";
+               string outputFileName = getRootName(fastafile) + "pick" + getExtension(fastafile);
                ofstream out;
                openOutputFile(outputFileName, out);
                
@@ -153,7 +153,7 @@ void RemoveSeqsCommand::readFasta(){
 void RemoveSeqsCommand::readName(){
        try {
        
-               string outputFileName = getRootName(namefile) + "pick";
+               string outputFileName = getRootName(namefile) + "pick" + getExtension(namefile);
                ofstream out;
                openOutputFile(outputFileName, out);
 
@@ -236,7 +236,7 @@ void RemoveSeqsCommand::readName(){
 void RemoveSeqsCommand::readGroup(){
        try {
        
-               string outputFileName = getRootName(groupfile) + "pick";
+               string outputFileName = getRootName(groupfile) + "pick" + getExtension(groupfile);
                ofstream out;
                openOutputFile(outputFileName, out);
 
@@ -278,7 +278,7 @@ void RemoveSeqsCommand::readGroup(){
 //alignreport file has a column header line then all other lines contain 16 columns.  we just want the first column since that contains the name
 void RemoveSeqsCommand::readAlign(){
        try {
-               string outputFileName = getRootName(alignfile) + "pick";
+               string outputFileName = getRootName(alignfile) + "pick" + getExtension(alignfile);
                ofstream out;
                openOutputFile(outputFileName, out);