]> git.donarmstrong.com Git - mothur.git/commitdiff
removed line option
authorwestcott <westcott>
Tue, 22 Sep 2009 14:16:08 +0000 (14:16 +0000)
committerwestcott <westcott>
Tue, 22 Sep 2009 14:16:08 +0000 (14:16 +0000)
38 files changed:
binsequencecommand.cpp
binsequencecommand.h
bootstrapsharedcommand.cpp
bootstrapsharedcommand.h
collect.cpp
collectcommand.cpp
collectcommand.h
collectsharedcommand.cpp
collectsharedcommand.h
getoturepcommand.cpp
getoturepcommand.h
getrabundcommand.cpp
getrabundcommand.h
getsabundcommand.cpp
getsabundcommand.h
globaldata.cpp
globaldata.hpp
heatmapcommand.cpp
heatmapcommand.h
heatmapsimcommand.cpp
heatmapsimcommand.h
matrixoutputcommand.cpp
matrixoutputcommand.h
rarefactcommand.cpp
rarefactcommand.h
rarefactsharedcommand.cpp
rarefactsharedcommand.h
readotucommand.cpp
readotucommand.h
sharedcommand.cpp
summarycommand.cpp
summarycommand.h
summarysharedcommand.cpp
summarysharedcommand.h
treegroupscommand.cpp
treegroupscommand.h
venncommand.cpp
venncommand.h

index e4e4c48d98e06014ee7a243fa6e43672445b0c5d..08ae6b607a13e3406aa4fe42d8a1f5025a41bbc0 100644 (file)
@@ -15,7 +15,6 @@ BinSeqCommand::BinSeqCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                
                //allow user to run help
@@ -23,7 +22,7 @@ BinSeqCommand::BinSeqCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string AlignArray[] =  {"fasta","line","label","name", "group"};
+                       string AlignArray[] =  {"fasta","label","name", "group"};
                        vector<string> myArray (AlignArray, AlignArray+(sizeof(AlignArray)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -51,12 +50,6 @@ BinSeqCommand::BinSeqCommand(string option){
                
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
                        
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
@@ -65,13 +58,10 @@ BinSeqCommand::BinSeqCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if ((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if (label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                        
                        namesfile = validParameter.validFile(parameters, "name", true);
@@ -103,11 +93,11 @@ BinSeqCommand::BinSeqCommand(string option){
 void BinSeqCommand::help(){
        try {
                mothurOut("The bin.seqs command can only be executed after a successful read.otu command of a listfile.\n");
-               mothurOut("The bin.seqs command parameters are fasta, name, line, label and group.  The fasta parameter is required, and you may not use line and label at the same time.\n");
-               mothurOut("The line and label allow you to select what distance levels you would like a output files created for, and are separated by dashes.\n");
-               mothurOut("The bin.seqs command should be in the following format: bin.seqs(fasta=yourFastaFile, name=yourNamesFile, group=yourGroupFile, line=yourLines, label=yourLabels).\n");
-               mothurOut("Example bin.seqs(fasta=amazon.fasta, group=amazon.groups, line=1-3-5, name=amazon.names).\n");
-               mothurOut("The default value for line and label are all lines in your inputfile.\n");
+               mothurOut("The bin.seqs command parameters are fasta, name, label and group.  The fasta parameter is required.\n");
+               mothurOut("The label parameter allows you to select what distance levels you would like a output files created for, and are separated by dashes.\n");
+               mothurOut("The bin.seqs command should be in the following format: bin.seqs(fasta=yourFastaFile, name=yourNamesFile, group=yourGroupFile, label=yourLabels).\n");
+               mothurOut("Example bin.seqs(fasta=amazon.fasta, group=amazon.groups, name=amazon.names).\n");
+               mothurOut("The default value for label is all lines in your inputfile.\n");
                mothurOut("The bin.seqs command outputs a .fasta file for each distance you specify appending the OTU number to each name.\n");
                mothurOut("If you provide a groupfile, then it also appends the sequences group to the name.\n");
                mothurOut("Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n");
@@ -137,7 +127,6 @@ int BinSeqCommand::execute(){
        try {
                if (abort == true) {    return 0;       }
        
-               int count = 1;
                int error = 0;
                
                //read fastafile
@@ -163,19 +152,17 @@ int BinSeqCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
 
                                
-               while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                        
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(list->getLabel()) == 1){
+                       if(allLines == 1 || labels.count(list->getLabel()) == 1){
                                
                                error = process(list);  
                                if (error == 1) { return 0; }   
                                                        
                                processedLabels.insert(list->getLabel());
                                userLabels.erase(list->getLabel());
-                               userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -187,14 +174,12 @@ int BinSeqCommand::execute(){
                                                                                                        
                                processedLabels.insert(list->getLabel());
                                userLabels.erase(list->getLabel());
-                               
                        }
                        
                        lastLabel = list->getLabel();                   
                        
                        delete list;
                        list = input->getListVector();
-                       count++;
                }
                
                
@@ -211,7 +196,7 @@ int BinSeqCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        if (list != NULL) {             delete list;    }
                        list = input->getListVector(lastLabel);
index 8ea88cbfcff767eec8461df493cea50217675404..a183151f3580ab5232a1108c25a58c22a0c540e6 100644 (file)
@@ -37,9 +37,8 @@ private:
        FastaMap* fasta;
        GroupMap* groupMap;
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string filename, fastafile, namesfile, groupfile, line, label;
+       string filename, fastafile, namesfile, groupfile, label;
        ofstream out;
        ifstream in, inNames;
        
index 0c6c53c0652df0786b885966919f3ce15a2f5197..0f758c15a0eafc98d620d2fb37980be6f221a767 100644 (file)
@@ -27,7 +27,6 @@ BootSharedCommand::BootSharedCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                Groups.clear();
                Estimators.clear();
@@ -37,7 +36,7 @@ BootSharedCommand::BootSharedCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"line","label","calc","groups","iters"};
+                       string Array[] =  {"label","calc","groups","iters"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -58,13 +57,6 @@ BootSharedCommand::BootSharedCommand(string option){
                        
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -72,13 +64,10 @@ BootSharedCommand::BootSharedCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if(label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        groups = validParameter.validFile(parameters, "groups", false);                 
@@ -158,11 +147,11 @@ BootSharedCommand::BootSharedCommand(string option){
 void BootSharedCommand::help(){
        try {
                mothurOut("The bootstrap.shared command can only be executed after a successful read.otu command.\n");
-               mothurOut("The bootstrap.shared command parameters are groups, calc, iters, line and label.  You may not use line and label at the same time.\n");
+               mothurOut("The bootstrap.shared command parameters are groups, calc, iters and label.\n");
                mothurOut("The groups parameter allows you to specify which of the groups in your groupfile you would like included used.\n");
-               mothurOut("The group names are separated by dashes. The line and label allow you to select what distance levels you would like trees created for, and are also separated by dashes.\n");
-               mothurOut("The bootstrap.shared command should be in the following format: bootstrap.shared(groups=yourGroups, calc=yourCalcs, line=yourLines, label=yourLabels, iters=yourIters).\n");
-               mothurOut("Example bootstrap.shared(groups=A-B-C, line=1-3-5, calc=jabund-sorabund, iters=100).\n");
+               mothurOut("The group names are separated by dashes. The label parameter allows you to select what distance levels you would like trees created for, and is also separated by dashes.\n");
+               mothurOut("The bootstrap.shared command should be in the following format: bootstrap.shared(groups=yourGroups, calc=yourCalcs, label=yourLabels, iters=yourIters).\n");
+               mothurOut("Example bootstrap.shared(groups=A-B-C, calc=jabund-sorabund, iters=100).\n");
                mothurOut("The default value for groups is all the groups in your groupfile.\n");
                mothurOut("The default value for calc is jclass-thetayc. The default for iters is 1000.\n");
        }
@@ -191,7 +180,6 @@ int BootSharedCommand::execute(){
        
                if (abort == true) {    return 0;       }
        
-               int count = 1;
                util = new SharedUtil();        
        
                //read first line
@@ -207,7 +195,6 @@ int BootSharedCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
                                
                //set users groups
                util->setGroups(globaldata->Groups, globaldata->gGroupmap->namesOfGroups, "treegroup");
@@ -224,19 +211,18 @@ int BootSharedCommand::execute(){
                tmap->makeSim(globaldata->gGroupmap);
                globaldata->gTreemap = tmap;
                        
-               while((order != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((order != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(order->getLabel()) == 1){                   
+                       if(allLines == 1 || labels.count(order->getLabel()) == 1){                      
                                
                                mothurOut(order->getLabel()); mothurOutEndLine();
                                process(order);
                                
                                processedLabels.insert(order->getLabel());
                                userLabels.erase(order->getLabel());
-                               userLines.erase(count);
                        }
                        
-                       //you have a label the user want that is smaller than this line and the last line has not already been processed
+                       //you have a label the user want that is smaller than this label and the last label has not already been processed
                        if ((anyLabelsToProcess(order->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
                                
                                delete order;
@@ -254,7 +240,6 @@ int BootSharedCommand::execute(){
                        //get next line to process
                        delete order;
                        order = input->getSharedOrderVector();
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -280,8 +265,6 @@ int BootSharedCommand::execute(){
 
                }
                
-               
-               
                //reset groups parameter
                globaldata->Groups.clear();  
 
index cf68e00b42b3e3eb2db96ae4d7e1bb23b3d22096..794da84001135d9b1ab365fc9014ed021a467d38 100644 (file)
@@ -55,9 +55,8 @@ private:
        vector<SharedRAbundVector*> lookup;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string outputFile, calc, groups, line, label;
+       string outputFile, calc, groups, label;
        int numGroups, iters;
        vector<string>  Estimators, Groups; //holds estimators to be used
 
index 2d1f6e38573d10288f4192c1208f19c919673821..77d279d57ed4ac4d0078d20e736a874056d3b132 100644 (file)
@@ -129,7 +129,7 @@ try {
                         totalNumSeq = i+1;
                 }
                 
-                //calculate last line if you haven't already
+                //calculate last label if you haven't already
                 if(numSeqs % increment != 0){
                         //how many comparisons to make i.e. for group a, b, c = ab, ac, bc.
                         int n = 1;
index 58aa32cd785343419f0395acccf1dbe6b7bfa10b..7d3daef96cccf6d7b1604728fd1eaff9f2b78048 100644 (file)
@@ -36,7 +36,6 @@ CollectCommand::CollectCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                Estimators.clear();
                
@@ -45,7 +44,7 @@ CollectCommand::CollectCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"freq","line","label","calc","abund","size"};
+                       string Array[] =  {"freq","label","calc","abund","size"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -63,13 +62,6 @@ CollectCommand::CollectCommand(string option){
                        
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -77,13 +69,10 @@ CollectCommand::CollectCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if (label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        calc = validParameter.validFile(parameters, "calc", false);                     
@@ -168,13 +157,13 @@ void CollectCommand::help(){
        try {
                mothurOut("The collect.single command can only be executed after a successful read.otu command. WITH ONE EXECEPTION. \n");
                mothurOut("The collect.single command can be executed after a successful cluster command.  It will use the .list file from the output of the cluster.\n");
-               mothurOut("The collect.single command parameters are label, line, freq, calc and abund.  No parameters are required, but you may not use \n");
-               mothurOut("both the line and label parameters at the same time. The collect.single command should be in the following format: \n");
-               mothurOut("collect.single(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, calc=yourEstimators).\n");
-               mothurOut("Example collect(label=unique-.01-.03, line=0-5-10, iters=10000, freq=10, calc=sobs-chao-ace-jack).\n");
+               mothurOut("The collect.single command parameters are label, freq, calc and abund.  No parameters are required. \n");
+               mothurOut("The collect.single command should be in the following format: \n");
+               mothurOut("collect.single(label=yourLabel, iters=yourIters, freq=yourFreq, calc=yourEstimators).\n");
+               mothurOut("Example collect(label=unique-.01-.03, iters=10000, freq=10, calc=sobs-chao-ace-jack).\n");
                mothurOut("The default values for freq is 100, and calc are sobs-chao-ace-jack-shannon-npshannon-simpson.\n");
                validCalculator->printCalc("single", cout);
-               mothurOut("The label and line parameters are used to analyze specific lines in your input.\n");
+               mothurOut("The label parameter is used to analyze specific labels in your input.\n");
                mothurOut("Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq).\n\n");
        }
        catch(exception& e) {
@@ -201,8 +190,6 @@ int CollectCommand::execute(){
        try {
                
                if (abort == true) { return 0; }
-       
-               int count = 1;
                
                //if the users entered no valid calculators don't execute command
                if (cDisplays.size() == 0) { return 0; }
@@ -217,11 +204,10 @@ int CollectCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
                
-               while((order != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((order != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(order->getLabel()) == 1){
+                       if(allLines == 1 || labels.count(order->getLabel()) == 1){
                                
                                cCurve = new Collect(order, cDisplays);
                                cCurve->getCurve(freq);
@@ -230,11 +216,10 @@ int CollectCommand::execute(){
                                mothurOut(order->getLabel()); mothurOutEndLine();
                                processedLabels.insert(order->getLabel());
                                userLabels.erase(order->getLabel());
-                               userLines.erase(count);
                        
-                       //you have a label the user want that is smaller than this line and the last line has not already been processed 
-                       }
                        
+                       }
+                       //you have a label the user want that is smaller than this label and the last label has not already been processed 
                        if ((anyLabelsToProcess(order->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
                                
                                delete order;
@@ -253,7 +238,6 @@ int CollectCommand::execute(){
                        
                        delete order;           
                        order = (input->getOrderVector());
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -269,7 +253,7 @@ int CollectCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        if (order != NULL) {    delete order;   }
                        order = (input->getOrderVector(lastLabel));
index b099c8a44390ef361019de2e12dff6af71f1dc73..10894e7218b5d2d607f2c0fa931f7c10a0f6146d 100644 (file)
        The collect command generates a collector's curve from the given file.  
        The collect command can only be executed after a successful read.list, read.sabund or read.rabund command, with one exception. 
        The collect command can be executed after a successful cluster command.  It will use the .list file from the output of the cluster.  
-       The collect command outputs a file for each estimator you choose to use.  The collect command parameters are label, line, freq, single, abund.  
-       No parameters are required, but you may not use both the line and label  parameters at the same time.  
-       The collect command should be in the following format: collect(label=yourLabel, line=yourLines, freq=yourFreq, single=yourEstimators, abund=yourAbund). 
-       example collect(label=unique-.01-.03, line=0,5,10, freq=10, single=collect-chao-ace-jack).  
+       The collect command outputs a file for each estimator you choose to use.  The collect command parameters are label, freq, single, abund.  
+       No parameters are required.  
+       The collect command should be in the following format: collect(label=yourLabel, freq=yourFreq, single=yourEstimators, abund=yourAbund). 
+       example collect(label=unique-.01-.03, freq=10, single=collect-chao-ace-jack).  
        The default values for  freq is 100, for abund is 10, and single are collect-chao-ace-jack-bootstrap-shannon-npshannon-simpson.  
        The valid single estimators are: collect-chao-ace-jack-bootstrap-shannon-npshannon-simpson. 
-       The label and line parameters are used to analyze specific lines in your input. */
+       The label parameter is used to analyze specific labels in your input. */
 
 
 
@@ -53,9 +53,8 @@ private:
        int freq, abund, size;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string line, label, calc;
+       string label, calc;
        vector<string>  Estimators;
 
 
index 697bc5340d66d54f9bdfcd8505bd8927a7e0ac57..18faa2d699333bade9ce3f492b52a1dbe2eb10a2 100644 (file)
@@ -41,7 +41,6 @@ CollectSharedCommand::CollectSharedCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                Estimators.clear();
                Groups.clear();
@@ -51,7 +50,7 @@ CollectSharedCommand::CollectSharedCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"freq","line","label","calc","groups"};
+                       string Array[] =  {"freq","label","calc","groups"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -72,14 +71,7 @@ CollectSharedCommand::CollectSharedCommand(string option){
 
                        
                        //check for optional parameter and set defaults
-                       // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
+                       // ...at some point should added some additional type checking..
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -87,13 +79,10 @@ CollectSharedCommand::CollectSharedCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if(label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        calc = validParameter.validFile(parameters, "calc", false);                     
@@ -184,14 +173,14 @@ CollectSharedCommand::CollectSharedCommand(string option){
 void CollectSharedCommand::help(){
        try {
                mothurOut("The collect.shared command can only be executed after a successful read.otu command.\n");
-               mothurOut("The collect.shared command parameters are label, line, freq, calc and groups.  No parameters are required, but you may not use \n");
-               mothurOut("both the line and label parameters at the same time. The collect.shared command should be in the following format: \n");
-               mothurOut("collect.shared(label=yourLabel, line=yourLines, freq=yourFreq, calc=yourEstimators, groups=yourGroups).\n");
-               mothurOut("Example collect.shared(label=unique-.01-.03, line=0-5-10, freq=10, groups=B-C, calc=sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan).\n");
+               mothurOut("The collect.shared command parameters are label, freq, calc and groups.  No parameters are required \n");
+               mothurOut("The collect.shared command should be in the following format: \n");
+               mothurOut("collect.shared(label=yourLabel, freq=yourFreq, calc=yourEstimators, groups=yourGroups).\n");
+               mothurOut("Example collect.shared(label=unique-.01-.03, freq=10, groups=B-C, calc=sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan).\n");
                mothurOut("The default values for freq is 100 and calc are sharedsobs-sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan.\n");
                mothurOut("The default value for groups is all the groups in your groupfile.\n");
                validCalculator->printCalc("shared", cout);
-               mothurOut("The label and line parameters are used to analyze specific lines in your input.\n");
+               mothurOut("The label parameter is used to analyze specific labels in your input.\n");
                mothurOut("The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed.  You must enter at least 2 valid groups.\n");
                mothurOut("Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile).\n\n");
                
@@ -221,8 +210,6 @@ int CollectSharedCommand::execute(){
                
                if (abort == true) {    return 0;       }
                
-               int count = 1;
-               
                //if the users entered no valid calculators don't execute command
                if (cDisplays.size() == 0) { return 0; }
                
@@ -236,15 +223,14 @@ int CollectSharedCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
                                
                //set users groups
                util->setGroups(globaldata->Groups, globaldata->gGroupmap->namesOfGroups, "collect");
                util->updateGroupIndex(globaldata->Groups, globaldata->gGroupmap->groupIndex);
 
-               while((order != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((order != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
 
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(order->getLabel()) == 1){
+                       if(allLines == 1 || labels.count(order->getLabel()) == 1){
                                
                                //create collectors curve
                                cCurve = new Collect(order, cDisplays);
@@ -254,10 +240,9 @@ int CollectSharedCommand::execute(){
                                mothurOut(order->getLabel()); mothurOutEndLine();
                                processedLabels.insert(order->getLabel());
                                userLabels.erase(order->getLabel());
-                               userLines.erase(count);
                        }
                        
-                       //you have a label the user want that is smaller than this line and the last line has not already been processed
+                       //you have a label the user want that is smaller than this label and the last label has not already been processed
                        if ((anyLabelsToProcess(order->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
                                delete order;
                                order = input->getSharedOrderVector(lastLabel);
@@ -278,7 +263,6 @@ int CollectSharedCommand::execute(){
                        //get next line to process
                        delete order;
                        order = input->getSharedOrderVector();
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -294,7 +278,7 @@ int CollectSharedCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        if (order != NULL) {  delete order;  }
                        order = input->getSharedOrderVector(lastLabel);
index 67e8e0c1073dae0a81f5d4d8e88ac7ee4981d708..e8b7b96a608453f5c5c7c6e510cd9b96bacd661b 100644 (file)
 #include "validcalculator.h"
 #include "sharedutilities.h"
 
-/* The collect.shared() command:
-       The collect command generates a collector's curve from the given file representing several groups.  
-       The collect.shared command can only be executed after a successful read.shared command. 
-       It outputs a file for each estimator you choose to use.  The collect.shared command parameters are label, line, freq and shared.  
-       No parameters are required, but you may not use both the line and label parameters at the same time. 
-       The collect.shared command should be in the following format: collect.shared(label=yourLabel, line=yourLines, 
-       freq=yourFreq, shared=yourEstimators). Example collect.shared(label=unique-.01-.03, line=0,5,10, freq=10, 
-       shared=sharedChao-sharedAce-sharedJabund). The default value for
-       freq is 100 and shared are sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN.  
-       The valid shared estimators are: sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN.  
-       The label and line parameters are used to analyze specific lines in your input. */
-
-
 class GlobalData;
 
 class CollectSharedCommand : public Command {
@@ -59,9 +46,8 @@ private:
        string format;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string line, label, calc, groups;
+       string label, calc, groups;
        vector<string>  Estimators, Groups;
 
 
index 441e82438b54c33891d4e80e54cbf38410ca6a87..07486191e886c72d5d2aafd1db781bad96411874 100644 (file)
@@ -15,7 +15,6 @@ GetOTURepCommand::GetOTURepCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                
                //allow user to run help
@@ -23,7 +22,7 @@ GetOTURepCommand::GetOTURepCommand(string option){
                        help(); abort = true;
                } else {
                        //valid paramters for this command
-                       string Array[] =  {"fasta","list","line","label","name", "group"};
+                       string Array[] =  {"fasta","list","label","name", "group"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -53,13 +52,6 @@ GetOTURepCommand::GetOTURepCommand(string option){
 
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -67,13 +59,10 @@ GetOTURepCommand::GetOTURepCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if ((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if (label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                        
                        namesfile = validParameter.validFile(parameters, "name", true);
@@ -136,11 +125,11 @@ GetOTURepCommand::GetOTURepCommand(string option){
 void GetOTURepCommand::help(){
        try {
                mothurOut("The get.oturep command can only be executed after a successful read.dist command.\n");
-               mothurOut("The get.oturep command parameters are list, fasta, name, group, line and label.  The fasta and list parameters are required, and you may not use line and label at the same time.\n");
-               mothurOut("The line and label allow you to select what distance levels you would like a output files created for, and are separated by dashes.\n");
-               mothurOut("The get.oturep command should be in the following format: get.oturep(fasta=yourFastaFile, list=yourListFile, name=yourNamesFile, group=yourGroupFile, line=yourLines, label=yourLabels).\n");
-               mothurOut("Example get.oturep(fasta=amazon.fasta, list=amazon.fn.list, group=amazon.groups, line=1-3-5, name=amazon.names).\n");
-               mothurOut("The default value for line and label are all lines in your inputfile.\n");
+               mothurOut("The get.oturep command parameters are list, fasta, name, group and label.  The fasta and list parameters are required.\n");
+               mothurOut("The label parameter allows you to select what distance levels you would like a output files created for, and is separated by dashes.\n");
+               mothurOut("The get.oturep command should be in the following format: get.oturep(fasta=yourFastaFile, list=yourListFile, name=yourNamesFile, group=yourGroupFile, label=yourLabels).\n");
+               mothurOut("Example get.oturep(fasta=amazon.fasta, list=amazon.fn.list, group=amazon.groups, name=amazon.names).\n");
+               mothurOut("The default value for label is all labels in your inputfile.\n");
                mothurOut("The get.oturep command outputs a .fastarep file for each distance you specify, selecting one OTU representative for each bin.\n");
                mothurOut("If you provide a groupfile, then it also appends the names of the groups present in that bin.\n");
                mothurOut("Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFastaFile).\n\n");
@@ -171,7 +160,6 @@ int GetOTURepCommand::execute(){
        
                if (abort == true) { return 0; }
 
-               int count = 1;
                int error;
                
                //read fastafile
@@ -198,19 +186,16 @@ int GetOTURepCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
-
                
-               while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                        
-                       if (allLines == 1 || lines.count(count) == 1 || labels.count(list->getLabel()) == 1){
+                       if (allLines == 1 || labels.count(list->getLabel()) == 1){
                                        mothurOut(list->getLabel() + "\t" + toString(list->size())); mothurOutEndLine();
                                        error = process(list);
                                        if (error == 1) { return 0; } //there is an error in hte input files, abort command
                                        
                                        processedLabels.insert(list->getLabel());
                                        userLabels.erase(list->getLabel());
-                                       userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -228,7 +213,6 @@ int GetOTURepCommand::execute(){
                        
                        delete list;
                        list = input->getListVector();
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -243,7 +227,7 @@ int GetOTURepCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        if (list != NULL) {     delete list;    }
                        list = input->getListVector(lastLabel);
@@ -332,7 +316,7 @@ string GetOTURepCommand::findRep(int bin, string& group, ListVector* thisList, i
                        group = group.substr(0, group.length()-1);
                }
 
-               // if only 1 sequence in bin or processing the "unique" line, then 
+               // if only 1 sequence in bin or processing the "unique" label, then 
                // the first sequence of the OTU is the representative one
                if ((names.size() == 1) || (list->getLabel() == "unique")) {
                        return names[0];
index 4f755d0fccfe68dd1e03b5b36d57ce4b76287df9..a48cbf1d7fd195264dacf9c43ee12b27867a8ff4 100644 (file)
@@ -39,13 +39,12 @@ private:
        InputData* input;
        FastaMap* fasta;
        GroupMap* groupMap;
-       string filename, fastafile, listfile, namesfile, groupfile, line, label;
+       string filename, fastafile, listfile, namesfile, groupfile, label;
        ofstream out;
        ifstream in, inNames;
        bool groupError;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
        map<string, int> nameToIndex;  //maps sequence name to index in sparsematrix
 
index dd4fdd58178a0ce13467d5f45a00a105a8954fca..04b1b0badcf7dfc009296ac145aa49da50a3de50 100644 (file)
@@ -16,7 +16,6 @@ GetRAbundCommand::GetRAbundCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                
                //allow user to run help
@@ -24,7 +23,7 @@ GetRAbundCommand::GetRAbundCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"line","label","sorted"};
+                       string Array[] =  {"label","sorted"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -47,13 +46,6 @@ GetRAbundCommand::GetRAbundCommand(string option){
                        temp = validParameter.validFile(parameters, "sorted", false);                   if (temp == "not found") { temp = "T"; }
                        sorted = isTrue(temp);
                        
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -61,13 +53,10 @@ GetRAbundCommand::GetRAbundCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if(label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        if (abort == false) {
@@ -87,14 +76,14 @@ GetRAbundCommand::GetRAbundCommand(string option){
 void GetRAbundCommand::help(){
        try {
                mothurOut("The get.rabund command can only be executed after a successful read.otu of a listfile.\n");
-               mothurOut("The get.rabund command parameters are line, label and sorted.  No parameters are required, and you may not use line and label at the same time.\n");
-               mothurOut("The line and label allow you to select what distance levels you would like included in your .rabund file, and are separated by dashes.\n");
+               mothurOut("The get.rabund command parameters are label and sorted.  No parameters are required.\n");
+               mothurOut("The label parameter allows you to select what distance levels you would like included in your .rabund file, and are separated by dashes.\n");
                mothurOut("The sorted parameters allows you to print the rabund results sorted by abundance or not.  The default is sorted.\n");
-               mothurOut("The get.rabund command should be in the following format: get.rabund(line=yourLines, label=yourLabels, sorted=yourSorted).\n");
-               mothurOut("Example get.rabund(line=1-3-5, sorted=F).\n");
-               mothurOut("The default value for line and label are all lines in your inputfile.\n");
+               mothurOut("The get.rabund command should be in the following format: get.rabund(label=yourLabels, sorted=yourSorted).\n");
+               mothurOut("Example get.rabund(sorted=F).\n");
+               mothurOut("The default value for label is all labels in your inputfile.\n");
                mothurOut("The get.rabund command outputs a .rabund file containing the lines you selected.\n");
-               mothurOut("Note: No spaces between parameter labels (i.e. line), '=' and parameters (i.e.yourLines).\n\n");
+               mothurOut("Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabels).\n\n");
        }
        catch(exception& e) {
                errorOut(e, "GetRAbundCommand", "help");
@@ -115,8 +104,6 @@ int GetRAbundCommand::execute(){
        
                if (abort == true) { return 0; }
                
-               int count = 1;
-               
                //read first line
                read = new ReadOTUFile(globaldata->inputFileName);      
                read->read(&*globaldata); 
@@ -128,12 +115,10 @@ int GetRAbundCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
-
                
-               while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                        
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(list->getLabel()) == 1){
+                       if(allLines == 1 || labels.count(list->getLabel()) == 1){
                                        mothurOut(list->getLabel()); mothurOutEndLine();
                                        rabund = new RAbundVector();                            
                                        *rabund = (list->getRAbundVector());
@@ -145,7 +130,6 @@ int GetRAbundCommand::execute(){
                                                                                                                        
                                        processedLabels.insert(list->getLabel());
                                        userLabels.erase(list->getLabel());
-                                       userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -169,7 +153,6 @@ int GetRAbundCommand::execute(){
                        
                        delete list;
                        list = input->getListVector();
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -185,7 +168,7 @@ int GetRAbundCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        if (list != NULL) {     delete list;    }
                        list = input->getListVector(lastLabel);
index 92e8475d154db06761e52ada6d72120bb586ce16..ed51be12ca9e9c0a41b9c03a5089cd9fce7b3893 100644 (file)
@@ -35,9 +35,8 @@ private:
        RAbundVector* rabund;
 
        bool abort, allLines, sorted;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string line, label;
+       string label;
 
        
 };
index 8cbb9d4a06ed2c3d578821520968f47630f6c0ce..80a44297b48bfde50c633edfe7354e2f3e0cb115 100644 (file)
@@ -16,7 +16,6 @@ GetSAbundCommand::GetSAbundCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                
                //allow user to run help
@@ -24,7 +23,7 @@ GetSAbundCommand::GetSAbundCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"line","label"};
+                       string Array[] =  {"label"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -42,13 +41,6 @@ GetSAbundCommand::GetSAbundCommand(string option){
                        
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -56,13 +48,10 @@ GetSAbundCommand::GetSAbundCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if(label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        if (abort == false) {
@@ -82,13 +71,13 @@ GetSAbundCommand::GetSAbundCommand(string option){
 void GetSAbundCommand::help(){
        try {
                mothurOut("The get.sabund command can only be executed after a successful read.otu of a listfile or rabundfile.\n");
-               mothurOut("The get.sabund command parameters are line and label.  No parameters are required, and you may not use line and label at the same time.\n");
-               mothurOut("The line and label allow you to select what distance levels you would like included in your .sabund file, and are separated by dashes.\n");
-               mothurOut("The get.sabund command should be in the following format: get.sabund(line=yourLines, label=yourLabels).\n");
-               mothurOut("Example get.sabund(line=1-3-5).\n");
-               mothurOut("The default value for line and label are all lines in your inputfile.\n");
-               mothurOut("The get.sabund command outputs a .sabund file containing the lines you selected.\n");
-               mothurOut("Note: No spaces between parameter labels (i.e. line), '=' and parameters (i.e.yourLines).\n\n");
+               mothurOut("The get.sabund command parameters is label.  No parameters are required.\n");
+               mothurOut("The label parameter allows you to select what distance levels you would like included in your .sabund file, and are separated by dashes.\n");
+               mothurOut("The get.sabund command should be in the following format: get.sabund(label=yourLabels).\n");
+               mothurOut("Example get.sabund().\n");
+               mothurOut("The default value for label is all labels in your inputfile.\n");
+               mothurOut("The get.sabund command outputs a .sabund file containing the labels you selected.\n");
+               mothurOut("Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabel).\n\n");
        }
        catch(exception& e) {
                errorOut(e, "GetSAbundCommand", "help");
@@ -108,8 +97,6 @@ int GetSAbundCommand::execute(){
                
                if (abort == true) { return 0; }
        
-               int count = 1;
-               
                //using order vector so you don't have to distinguish between the list and rabund files
                read = new ReadOTUFile(globaldata->inputFileName);      
                read->read(&*globaldata); 
@@ -121,12 +108,10 @@ int GetSAbundCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
-
                
-               while((order != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((order != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                        
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(order->getLabel()) == 1){
+                       if(allLines == 1 || labels.count(order->getLabel()) == 1){
                                        mothurOut(order->getLabel());  mothurOutEndLine();
                                        sabund = new SAbundVector();
                                        *sabund = (order->getSAbundVector());
@@ -135,7 +120,6 @@ int GetSAbundCommand::execute(){
 
                                        processedLabels.insert(order->getLabel());
                                        userLabels.erase(order->getLabel());
-                                       userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(order->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -157,7 +141,6 @@ int GetSAbundCommand::execute(){
                        
                        delete order;           
                        order = (input->getOrderVector());
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -173,7 +156,7 @@ int GetSAbundCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        if (order != NULL) {    delete order;   }
                        order = (input->getOrderVector(lastLabel));
index 2612b7daa6c178f8ae0468893c49c2c9c613a38c..e2ea5d292fdf7bbd4e9a1d1fb58ab62a80549c6c 100644 (file)
@@ -35,9 +35,8 @@ private:
        SAbundVector* sabund;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string line, label;
+       string label;
 
 };
 
index 155aad57e1a6bcce20cbce2e0c8d92c776ead103..690a8c3400c802844dc71c49f13f898a0e822e0e 100644 (file)
@@ -119,7 +119,7 @@ void GlobalData::newRead() {
 
                        gTree.clear();
                        Treenames.clear();
-                       labels.clear(); lines.clear(); Groups.clear();
+                       labels.clear(); Groups.clear();
                        allLines = 1;
                        runParse = true;
        }
index 759bcae6fd7631988bf15407e7234330c2c9f659..e125e6f3d7032d78d2b1330dece6cf909a6bf320 100644 (file)
@@ -44,7 +44,6 @@ public:
        string inputFileName, argv;
        bool allLines, runParse, jumble;
        vector<string>  Estimators, Groups; //holds estimators to be used
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
        vector<string> Treenames;
        
index e2fdc645a83dfd72574bc8f14a61db30b74b4e45..52395bb2a2613f24846e031f530519afbd2ed39c 100644 (file)
@@ -17,7 +17,6 @@ HeatMapCommand::HeatMapCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                
                //allow user to run help
@@ -25,7 +24,7 @@ HeatMapCommand::HeatMapCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string AlignArray[] =  {"groups","line","label","sorted","scale"};
+                       string AlignArray[] =  {"groups","label","sorted","scale"};
                        vector<string> myArray (AlignArray, AlignArray+(sizeof(AlignArray)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -45,13 +44,6 @@ HeatMapCommand::HeatMapCommand(string option){
 
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -59,13 +51,10 @@ HeatMapCommand::HeatMapCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if ((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if (label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                        
                        groups = validParameter.validFile(parameters, "groups", false);                 
@@ -97,17 +86,17 @@ HeatMapCommand::HeatMapCommand(string option){
 void HeatMapCommand::help(){
        try {
                mothurOut("The heatmap.bin command can only be executed after a successful read.otu command.\n");
-               mothurOut("The heatmap.bin command parameters are groups, sorted, scale, line and label.  No parameters are required, but you may not use line and label at the same time.\n");
+               mothurOut("The heatmap.bin command parameters are groups, sorted, scale label.  No parameters are required.\n");
                mothurOut("The groups parameter allows you to specify which of the groups in your groupfile you would like included in your heatmap.\n");
                mothurOut("The sorted parameter allows you to choose to see the file with the shared otus at the top or the otus in the order they appear in your input file. \n");
                mothurOut("The scale parameter allows you to choose the range of color your bin information will be displayed with.\n");
-               mothurOut("The group names are separated by dashes. The line and label allow you to select what distance levels you would like a heatmap created for, and are also separated by dashes.\n");
-               mothurOut("The heatmap.bin command should be in the following format: heatmap.bin(groups=yourGroups, sorted=yourSorted, line=yourLines, label=yourLabels).\n");
-               mothurOut("Example heatmap.bin(groups=A-B-C, line=1-3-5, sorted=F, scale=log10).\n");
-               mothurOut("The default value for groups is all the groups in your groupfile, and all lines in your inputfile will be used.\n");
+               mothurOut("The group names are separated by dashes. The label parameter allows you to select what distance levels you would like a heatmap created for, and are also separated by dashes.\n");
+               mothurOut("The heatmap.bin command should be in the following format: heatmap.bin(groups=yourGroups, sorted=yourSorted, label=yourLabels).\n");
+               mothurOut("Example heatmap.bin(groups=A-B-C, sorted=F, scale=log10).\n");
+               mothurOut("The default value for groups is all the groups in your groupfile, and all labels in your inputfile will be used.\n");
                mothurOut("The default value for sorted is T meaning you want the shared otus on top, you may change it to F meaning the exact representation of your input file.\n");
                mothurOut("The default value for scale is log10; your other options are log2 and linear.\n");
-               mothurOut("The heatmap.bin command outputs a .svg file for each line or label you specify.\n");
+               mothurOut("The heatmap.bin command outputs a .svg file for each label you specify.\n");
                mothurOut("Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n");
 
        }
@@ -133,7 +122,6 @@ int HeatMapCommand::execute(){
        
                if (abort == true) { return 0; }
 
-               int count = 1;  
                string lastLabel;
        
                if (format == "sharedfile") {
@@ -159,21 +147,19 @@ int HeatMapCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
 
                if ((format != "list") && (format != "rabund") && (format != "sabund")) {       
                
                        //as long as you are not at the end of the file or done wih the lines you want
-                       while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+                       while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                
-                               if(allLines == 1 || lines.count(count) == 1 || labels.count(lookup[0]->getLabel()) == 1){                       
+                               if(allLines == 1 || labels.count(lookup[0]->getLabel()) == 1){                  
        
                                        mothurOut(lookup[0]->getLabel()); mothurOutEndLine();
                                        heatmap->getPic(lookup);
                                        
                                        processedLabels.insert(lookup[0]->getLabel());
                                        userLabels.erase(lookup[0]->getLabel());
-                                       userLines.erase(count);
                                }
                                
                                if ((anyLabelsToProcess(lookup[0]->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -193,7 +179,6 @@ int HeatMapCommand::execute(){
                                                        
                                //get next line to process
                                lookup = input->getSharedRAbundVectors();                               
-                               count++;
                        }
                        
                        //output error messages about any remaining user labels
@@ -209,7 +194,7 @@ int HeatMapCommand::execute(){
                                }
                        }
                
-                       //run last line if you need to
+                       //run last label if you need to
                        if (needToRun == true)  {
                                for (int i = 0; i < lookup.size(); i++) { if (lookup[i] != NULL) { delete lookup[i]; } }  
                                lookup = input->getSharedRAbundVectors(lastLabel);
@@ -226,16 +211,15 @@ int HeatMapCommand::execute(){
                        
                }else{
        
-                       while((rabund != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+                       while((rabund != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
 
-                               if(allLines == 1 || lines.count(count) == 1 || labels.count(rabund->getLabel()) == 1){                  
+                               if(allLines == 1 || labels.count(rabund->getLabel()) == 1){                     
        
                                        mothurOut(rabund->getLabel()); mothurOutEndLine();
                                        heatmap->getPic(rabund);
                                        
                                        processedLabels.insert(rabund->getLabel());
                                        userLabels.erase(rabund->getLabel());
-                                       userLines.erase(count);
                                }
                                
                                if ((anyLabelsToProcess(rabund->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -255,7 +239,6 @@ int HeatMapCommand::execute(){
                                lastLabel = rabund->getLabel();                 
                                delete rabund;
                                rabund = input->getRAbundVector();
-                               count++;
                        }
                        
                        //output error messages about any remaining user labels
@@ -271,7 +254,7 @@ int HeatMapCommand::execute(){
                                }
                        }
                
-                       //run last line if you need to
+                       //run last label if you need to
                        if (needToRun == true)  {
                
                                if (rabund != NULL) {   delete rabund;  }
index 6d6c1d55020b170d8072b5a860ea7f89a1e50e71..5c00b284061dd279db4ee52aaa891ef700d0cc61 100644 (file)
@@ -38,9 +38,8 @@ private:
        HeatMap* heatmap;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string format, groups, sorted, scale, line, label;
+       string format, groups, sorted, scale, label;
        vector<string> Groups;
 
 
index 004a3bf05a901262ca1233e16ceb862d9b5f9ebd..d88bec0147095a1ed8e57e14c7e771548f86ffe6 100644 (file)
@@ -27,7 +27,6 @@ HeatMapSimCommand::HeatMapSimCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                Groups.clear();
                Estimators.clear();
@@ -37,7 +36,7 @@ HeatMapSimCommand::HeatMapSimCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string AlignArray[] =  {"groups","line","label", "calc"};
+                       string AlignArray[] =  {"groups","label", "calc"};
                        vector<string> myArray (AlignArray, AlignArray+(sizeof(AlignArray)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -57,13 +56,6 @@ HeatMapSimCommand::HeatMapSimCommand(string option){
 
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -71,13 +63,10 @@ HeatMapSimCommand::HeatMapSimCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if ((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if (label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                        
                        calc = validParameter.validFile(parameters, "calc", false);                     
@@ -142,15 +131,15 @@ HeatMapSimCommand::HeatMapSimCommand(string option){
 void HeatMapSimCommand::help(){
        try {
                mothurOut("The heatmap.sim command can only be executed after a successful read.otu command.\n");
-               mothurOut("The heatmap.sim command parameters are groups, calc, line and label.  No parameters are required, but you may not use line and label at the same time.\n");
+               mothurOut("The heatmap.sim command parameters are groups, calc and label.  No parameters are required.\n");
                mothurOut("The groups parameter allows you to specify which of the groups in your groupfile you would like included in your heatmap.\n");
-               mothurOut("The group names are separated by dashes. The line and label allow you to select what distance levels you would like a heatmap created for, and are also separated by dashes.\n");
-               mothurOut("The heatmap.sim command should be in the following format: heatmap.sim(groups=yourGroups, calc=yourCalc, line=yourLines, label=yourLabels).\n");
-               mothurOut("Example heatmap.sim(groups=A-B-C, line=1-3-5, calc=jabund).\n");
-               mothurOut("The default value for groups is all the groups in your groupfile, and all lines in your inputfile will be used.\n");
+               mothurOut("The group names are separated by dashes. The label parameter allows you to select what distance levels you would like a heatmap created for, and is also separated by dashes.\n");
+               mothurOut("The heatmap.sim command should be in the following format: heatmap.sim(groups=yourGroups, calc=yourCalc, label=yourLabels).\n");
+               mothurOut("Example heatmap.sim(groups=A-B-C, calc=jabund).\n");
+               mothurOut("The default value for groups is all the groups in your groupfile, and all labels in your inputfile will be used.\n");
                validCalculator->printCalc("heat", cout);
                mothurOut("The default value for calc is jclass-thetayc.\n");
-               mothurOut("The heatmap.sim command outputs a .svg file for each calculator you choose at each line or label you specify.\n");
+               mothurOut("The heatmap.sim command outputs a .svg file for each calculator you choose at each label you specify.\n");
                mothurOut("Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n");
 
        }
@@ -178,8 +167,6 @@ int HeatMapSimCommand::execute(){
        
                if (abort == true)  { return 0; }
                
-               int count = 1;  
-               
                //if the users entered no valid calculators don't execute command
                if (heatCalculators.size() == 0) { mothurOut("No valid calculators."); mothurOutEndLine(); return 0; }
                
@@ -196,20 +183,17 @@ int HeatMapSimCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
-
                
                //as long as you are not at the end of the file or done wih the lines you want
-               while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(lookup[0]->getLabel()) == 1){                       
+                       if(allLines == 1 || labels.count(lookup[0]->getLabel()) == 1){                  
        
                                mothurOut(lookup[0]->getLabel()); mothurOutEndLine();
                                heatmap->getPic(lookup, heatCalculators);
                                        
                                processedLabels.insert(lookup[0]->getLabel());
                                userLabels.erase(lookup[0]->getLabel());
-                               userLines.erase(count);
                        }
                                
                        if ((anyLabelsToProcess(lookup[0]->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -231,7 +215,6 @@ int HeatMapSimCommand::execute(){
                        //get next line to process
                        for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  } 
                        lookup = input->getSharedRAbundVectors();                               
-                       count++;
                }
                        
                //output error messages about any remaining user labels
@@ -247,7 +230,7 @@ int HeatMapSimCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        for (int i = 0; i < lookup.size(); i++) {  if (lookup[i] != NULL) { delete lookup[i]; } } 
                        lookup = input->getSharedRAbundVectors(lastLabel);                              
index 091da26af7db4cf4e9302c0e9a9d0e8a4587f5de..595f918f442352aea7dd94d6e62065b28398c6ca 100644 (file)
@@ -38,9 +38,8 @@ private:
        map<string, string> parameters;
        map<string, string>::iterator it;
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string format, groups, line, label, calc;
+       string format, groups, label, calc;
        vector<string> Estimators, Groups;
 
 
index 9b4935f5ec076ddc870ed7716b0588184e13dee4..6ccbf35d9affe9d0ab345018ba2165fe80d37dd8 100644 (file)
@@ -27,7 +27,6 @@ MatrixOutputCommand::MatrixOutputCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                Groups.clear();
                Estimators.clear();
@@ -37,7 +36,7 @@ MatrixOutputCommand::MatrixOutputCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"line","label","calc","groups"};
+                       string Array[] =  {"label","calc","groups"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -58,13 +57,6 @@ MatrixOutputCommand::MatrixOutputCommand(string option){
                        
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -72,13 +64,10 @@ MatrixOutputCommand::MatrixOutputCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if (label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        groups = validParameter.validFile(parameters, "groups", false);                 
@@ -141,11 +130,11 @@ MatrixOutputCommand::MatrixOutputCommand(string option){
 void MatrixOutputCommand::help(){
        try {
                mothurOut("The dist.shared command can only be executed after a successful read.otu command.\n");
-               mothurOut("The dist.shared command parameters are groups, calc, line and label.  The calc parameter is required, and you may not use line and label at the same time.\n");
+               mothurOut("The dist.shared command parameters are groups, calc and label.  No parameters are required.\n");
                mothurOut("The groups parameter allows you to specify which of the groups in your groupfile you would like included used.\n");
-               mothurOut("The group names are separated by dashes. The line and label allow you to select what distance levels you would like distance matrices created for, and are also separated by dashes.\n");
-               mothurOut("The dist.shared command should be in the following format: dist.shared(groups=yourGroups, calc=yourCalcs, line=yourLines, label=yourLabels).\n");
-               mothurOut("Example dist.shared(groups=A-B-C, line=1-3-5, calc=jabund-sorabund).\n");
+               mothurOut("The group names are separated by dashes. The label parameter allows you to select what distance levels you would like distance matrices created for, and is also separated by dashes.\n");
+               mothurOut("The dist.shared command should be in the following format: dist.shared(groups=yourGroups, calc=yourCalcs, label=yourLabels).\n");
+               mothurOut("Example dist.shared(groups=A-B-C, calc=jabund-sorabund).\n");
                mothurOut("The default value for groups is all the groups in your groupfile.\n");
                mothurOut("The default value for calc is jclass and thetayc.\n");
                validCalculator->printCalc("matrix", cout);
@@ -175,9 +164,7 @@ int MatrixOutputCommand::execute(){
        try {
                
                if (abort == true) {    return 0;       }
-       
-               int count = 1;  
-                               
+                       
                //if the users entered no valid calculators don't execute command
                if (matrixCalculators.size() == 0) { mothurOut("No valid calculators."); mothurOutEndLine();  return 0; }
 
@@ -192,22 +179,20 @@ int MatrixOutputCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
-                               
+                                       
                if (lookup.size() < 2) { mothurOut("You have not provided enough valid groups.  I cannot run the command."); mothurOutEndLine(); return 0;}
                
                numGroups = lookup.size();
                                
                //as long as you are not at the end of the file or done wih the lines you want
-               while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(lookup[0]->getLabel()) == 1){                       
+                       if(allLines == 1 || labels.count(lookup[0]->getLabel()) == 1){                  
                                mothurOut(lookup[0]->getLabel()); mothurOutEndLine();
                                process(lookup);
                                
                                processedLabels.insert(lookup[0]->getLabel());
                                userLabels.erase(lookup[0]->getLabel());
-                               userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(lookup[0]->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -222,13 +207,11 @@ int MatrixOutputCommand::execute(){
                                userLabels.erase(lookup[0]->getLabel());
                        }
 
-                        
                        lastLabel = lookup[0]->getLabel();                      
                        
                        //get next line to process
                        for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  } 
                        lookup = input->getSharedRAbundVectors();
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -244,7 +227,7 @@ int MatrixOutputCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        for (int i = 0; i < lookup.size(); i++) {  if (lookup[i] != NULL) {  delete lookup[i]; }  } 
                        lookup = input->getSharedRAbundVectors(lastLabel);
index 07743e5b4df6d867323c89c2acd78b241486bd00..02e8fe6b4cb75351fadfc5a503b78ed6bd589a7d 100644 (file)
@@ -18,7 +18,7 @@
 // aka. dist.shared()
 
 /* This command create a tree file for each similarity calculator at distance level, using various calculators to find the similiarity between groups. 
-       The user can select the lines or labels they wish to use as well as the groups they would like included.
+       The user can select the labels they wish to use as well as the groups they would like included.
        They can also use as many or as few calculators as they wish. */
        
 class GlobalData;
@@ -47,9 +47,8 @@ private:
        ofstream out;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string outputFile, calc, groups, line, label;
+       string outputFile, calc, groups, label;
        vector<string>  Estimators, Groups; //holds estimators to be used
        
 
index 5584b9b0ee5200569a9eb8021ef7a3ef8ac664c1..76d66023237c025b6f5a8b0216f9dcdcb85e0110 100644 (file)
@@ -27,7 +27,6 @@ RareFactCommand::RareFactCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                Estimators.clear();
                
@@ -36,7 +35,7 @@ RareFactCommand::RareFactCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"iters","freq","line","label","calc","abund"};
+                       string Array[] =  {"iters","freq","label","calc","abund"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -54,13 +53,6 @@ RareFactCommand::RareFactCommand(string option){
                        
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -68,13 +60,10 @@ RareFactCommand::RareFactCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if(label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        calc = validParameter.validFile(parameters, "calc", false);                     
@@ -144,13 +133,13 @@ void RareFactCommand::help(){
        try {
                mothurOut("The rarefaction.single command can only be executed after a successful read.otu WTIH ONE EXECEPTION.\n");
                mothurOut("The rarefaction.single command can be executed after a successful cluster command.  It will use the .list file from the output of the cluster.\n");
-               mothurOut("The rarefaction.single command parameters are label, line, iters, freq, calc and abund.  No parameters are required, but you may not use \n");
-               mothurOut("both the line and label parameters at the same time. The rarefaction.single command should be in the following format: \n");
-               mothurOut("rarefaction.single(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, calc=yourEstimators).\n");
-               mothurOut("Example rarefaction.single(label=unique-.01-.03, line=0-5-10, iters=10000, freq=10, calc=sobs-rchao-race-rjack-rbootstrap-rshannon-rnpshannon-rsimpson).\n");
+               mothurOut("The rarefaction.single command parameters are label, iters, freq, calc and abund.  No parameters are required. \n");
+               mothurOut("The rarefaction.single command should be in the following format: \n");
+               mothurOut("rarefaction.single(label=yourLabel, iters=yourIters, freq=yourFreq, calc=yourEstimators).\n");
+               mothurOut("Example rarefaction.single(label=unique-.01-.03, iters=10000, freq=10, calc=sobs-rchao-race-rjack-rbootstrap-rshannon-rnpshannon-rsimpson).\n");
                mothurOut("The default values for iters is 1000, freq is 100, and calc is rarefaction which calculates the rarefaction curve for the observed richness.\n");
                validCalculator->printCalc("rarefaction", cout);
-               mothurOut("The label and line parameters are used to analyze specific lines in your input.\n");
+               mothurOut("The label parameter is used to analyze specific labels in your input.\n");
                mothurOut("Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq).\n\n");
        }
        catch(exception& e) {
@@ -177,8 +166,6 @@ int RareFactCommand::execute(){
        
                if (abort == true) { return 0; }
                
-               int count = 1;
-               
                //if the users entered no valid calculators don't execute command
                if (rDisplays.size() == 0) { return 0; }
 
@@ -192,12 +179,11 @@ int RareFactCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
        
                //as long as you are not at the end of the file or done wih the lines you want
-               while((order != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((order != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                        
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(order->getLabel()) == 1){
+                       if(allLines == 1 || labels.count(order->getLabel()) == 1){
                        
                                rCurve = new Rarefact(order, rDisplays);
                                rCurve->getCurve(freq, nIters);
@@ -206,7 +192,6 @@ int RareFactCommand::execute(){
                                mothurOut(order->getLabel()); mothurOutEndLine();
                                processedLabels.insert(order->getLabel());
                                userLabels.erase(order->getLabel());
-                               userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(order->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -226,7 +211,6 @@ int RareFactCommand::execute(){
                        
                        delete order;
                        order = (input->getOrderVector());
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -242,7 +226,7 @@ int RareFactCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        if (order != NULL) {    delete order;   }
                        order = (input->getOrderVector(lastLabel));
index 1bcb0cf490dda8358a6ba55f042e689abc51bf69..88b0ade9c51824059f387e1c72b6564b3046d453 100644 (file)
 #include "validcalculator.h"
 
 
-/*The rarefaction() command:
-       The rarefaction command generates a rarefaction curve from a given file.  
-       The rarefaction command can only be executed after a successful read.list, read.sabund or read.rabund command, with one exception. 
-       The rarefaction command can be executed after a successful cluster command.  It will use the .list file from the output of the cluster. 
-       The rarefaction command outputs a file for each estimator you choose to use.  It is recommended to only use rarefaction estimator.  
-       The rarefaction command parameters are label, line, iters, freq, rarefaction.  No parameters are required, 
-       but you may not use both the line and label  parameters at the same time. The rarefaction command should be in the following format: 
-       rarefaction(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, rarefaction=yourEstimators). 
-       Example rarefaction(label=unique-.01-.03, line=0,5,10, iters=10000, freq=10, rarefaction=rarefaction-rchao-race-rjack-rbootstrap-rshannon-rnpshannon-rsimpson). 
-       The default values for iters is 1000, freq is 100, and rarefaction is rarefaction which calculates the rarefaction curve for the observed richness. 
-       The valid rarefaction estimators are: rarefaction-rchao-race-rjack-rbootstrap-rshannon-rnpshannon-rsimpson.  
-       Rarefaction is the only recommended estimator.  The label and line parameters are used to analyze specific lines in your input. */
-       
-
 class GlobalData;
 
 class RareFactCommand : public Command {
@@ -53,9 +39,8 @@ private:
        int freq, nIters, abund;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string line, label, calc;
+       string label, calc;
        vector<string>  Estimators;
 
 };
index 7e1b4773ddb0505861fd90a2c0064b37ce5e9c59..022ae65bf8530da954589881fbcfa811adba8082 100644 (file)
@@ -19,7 +19,6 @@ RareFactSharedCommand::RareFactSharedCommand(string option){
                
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                Estimators.clear();
                Groups.clear();
@@ -29,7 +28,7 @@ RareFactSharedCommand::RareFactSharedCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"iters","line","label","calc","groups", "jumble"};
+                       string Array[] =  {"iters","label","calc","groups", "jumble"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -51,13 +50,6 @@ RareFactSharedCommand::RareFactSharedCommand(string option){
                        
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -65,13 +57,10 @@ RareFactSharedCommand::RareFactSharedCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if(label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        calc = validParameter.validFile(parameters, "calc", false);                     
@@ -130,14 +119,14 @@ RareFactSharedCommand::RareFactSharedCommand(string option){
 void RareFactSharedCommand::help(){
        try {
                mothurOut("The rarefaction.shared command can only be executed after a successful read.otu command.\n");
-               mothurOut("The rarefaction.shared command parameters are label, line, iters, groups, jumble and calc.  No parameters are required, but you may not use \n");
-               mothurOut("both the line and label parameters at the same time. The rarefaction command should be in the following format: \n");
-               mothurOut("rarefaction.shared(label=yourLabel, line=yourLines, iters=yourIters, calc=yourEstimators, jumble=yourJumble, groups=yourGroups).\n");
-               mothurOut("Example rarefaction.shared(label=unique-.01-.03, line=0-5-10, iters=10000, groups=B-C, jumble=T, calc=sharedobserved).\n");
+               mothurOut("The rarefaction.shared command parameters are label, iters, groups, jumble and calc.  No parameters are required.\n");
+               mothurOut("The rarefaction command should be in the following format: \n");
+               mothurOut("rarefaction.shared(label=yourLabel, iters=yourIters, calc=yourEstimators, jumble=yourJumble, groups=yourGroups).\n");
+               mothurOut("Example rarefaction.shared(label=unique-0.01-0.03,  iters=10000, groups=B-C, jumble=T, calc=sharedobserved).\n");
                mothurOut("The default values for iters is 1000, freq is 100, and calc is sharedobserved which calculates the shared rarefaction curve for the observed richness.\n");
                mothurOut("The default value for groups is all the groups in your groupfile, and jumble is true.\n");
                validCalculator->printCalc("sharedrarefaction", cout);
-               mothurOut("The label and line parameters are used to analyze specific lines in your input.\n");
+               mothurOut("The label parameter is used to analyze specific labels in your input.\n");
                mothurOut("The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed.  You must enter at least 2 valid groups.\n");
                mothurOut("Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq).\n\n");
        }
@@ -164,8 +153,6 @@ int RareFactSharedCommand::execute(){
        
                if (abort == true) { return 0; }
                
-               int count = 1;
-               
                //if the users entered no valid calculators don't execute command
                if (rDisplays.size() == 0) { return 0; }
 
@@ -185,12 +172,11 @@ int RareFactSharedCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
        
                //as long as you are not at the end of the file or done wih the lines you want
-               while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                        
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(lookup[0]->getLabel()) == 1){
+                       if(allLines == 1 || labels.count(lookup[0]->getLabel()) == 1){
                                
                                rCurve = new Rarefact(lookup, rDisplays);
                                rCurve->getSharedCurve(freq, nIters);
@@ -199,7 +185,6 @@ int RareFactSharedCommand::execute(){
                                mothurOut(lookup[0]->getLabel()); mothurOutEndLine();
                                processedLabels.insert(lookup[0]->getLabel());
                                userLabels.erase(lookup[0]->getLabel());
-                               userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(lookup[0]->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -221,7 +206,6 @@ int RareFactSharedCommand::execute(){
                        //get next line to process
                        for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  } 
                        lookup = input->getSharedRAbundVectors();
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -237,7 +221,7 @@ int RareFactSharedCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        for (int i = 0; i < lookup.size(); i++) {  if (lookup[i] != NULL) {     delete lookup[i]; }  } 
                        lookup = input->getSharedRAbundVectors(lastLabel);
index b0109579d81ba55ba14de4e92d9a4f1e3cc1efca..a141988e51c90989515a5ec868319a94015a6e2d 100644 (file)
 #include "readotu.h"
 #include "validcalculator.h"
 
-/* The rarefaction.shared() command:
-       The rarefaction command generates a rarefaction curve from a given file representing several groups.  
-       The rarefaction.shared command can only be executed after a successful read.shared command. It outputs a file for each estimator you choose to use.  
-       The rarefaction.shared command parameters are label, line, iters and sharedrarefaction.  
-       No parameters are required, but you may not use both the line and label  parameters at the same time.  
-       The rarefaction command should be in the following format: rarefaction.shared(label=yourLabel, line=yourLines, iters=yourIters, 
-        sharedrarefaction=yourEstimators).  Example rarefaction.shared(label=unique-.01-.03, line=0,5,10, iters=10000, 
-        sharedrarefaction =sharedobserved).  The default values for 
-       iters is 1000 and sharedrarefaction is sharedobserved which calculates the shared rarefaction curve for the observed richness. 
-        The valid sharedrarefaction estimator is sharedobserved. The label and line parameters are used to analyze specific lines in your input. */
-
-
 class GlobalData;
 
 class RareFactSharedCommand : public Command {
@@ -50,9 +38,8 @@ private:
        string format;
 
        bool abort, allLines, jumble;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string line, label, calc, groups;
+       string label, calc, groups;
        vector<string>  Estimators, Groups;
 
 
index 999d8de95ecdda62b411e3d5fab11092d3105636..2e2bbc90baf0fbcfe9abb79b049c1cf2589edfe0 100644 (file)
@@ -21,7 +21,7 @@ ReadOtuCommand::ReadOtuCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"list","order","shared", "line", "label","group","sabund", "rabund"};
+                       string Array[] =  {"list","order","shared", "label","group","sabund", "rabund"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -77,14 +77,6 @@ ReadOtuCommand::ReadOtuCommand(string option){
                
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = ""; }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                               globaldata->lines = lines;
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -95,9 +87,6 @@ ReadOtuCommand::ReadOtuCommand(string option){
                        
                        globaldata->allLines = allLines;
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       
                        orderfile = validParameter.validFile(parameters, "order", true);
                        if (orderfile == "not open") { abort = true; }  
                        else if (orderfile == "not found") { orderfile = ""; }
@@ -123,16 +112,15 @@ void ReadOtuCommand::help(){
        try {
                mothurOut("The read.otu command must be run before you execute a collect.single, rarefaction.single, summary.single, \n");
                mothurOut("collect.shared, rarefaction.shared or summary.shared command.   Mothur will generate a .list, .rabund and .sabund upon completion of the cluster command \n");
-               mothurOut("or you may use your own. The read.otu command parameter options are list, rabund, sabund, shared, group, order, line and label.\n");
+               mothurOut("or you may use your own. The read.otu command parameter options are list, rabund, sabund, shared, group, order and label.\n");
                mothurOut("The read.otu command can be used in two ways.  The first is to read a list, rabund or sabund and run the collect.single, rarefaction.single or summary.single.\n");
                mothurOut("For this use the read.otu command should be in the following format: read.otu(list=yourListFile, order=yourOrderFile, label=yourLabels).\n");
                mothurOut("The list, rabund or sabund parameter is required, but you may only use one of them.\n");
-               mothurOut("The line and label parameters are optional but you may not use both the line and label parameters at the same time.\n");
-               mothurOut("The label and line parameters are used to read specific lines in your input.\n");
+               mothurOut("The label parameter is used to read specific labels in your input.\n");
                mothurOut("The second way to use the read.otu command is to read a list and a group, or a shared so you can use the collect.shared, rarefaction.shared or summary.shared commands.\n");
-               mothurOut("In this case the read.otu command should be in the following format: read.otu(list=yourListFile, group=yourGroupFile, line=yourLines) or read.otu(shared=yourSharedFile).  \n");
+               mothurOut("In this case the read.otu command should be in the following format: read.otu(list=yourListFile, group=yourGroupFile) or read.otu(shared=yourSharedFile).  \n");
                mothurOut("The list parameter and group paramaters or the shared paremeter is required. When using the command the second way with a list and group file read.otu command parses the .list file\n");
-               mothurOut("and separates it into groups.  It outputs a .shared file containing the OTU information for each group. The read.otu command also outputs a .list file for each group. \n");
+               mothurOut("and separates it into groups.  It outputs a .shared file containing the OTU information for each group. The read.otu command also outputs a .rabund file for each group. \n");
                mothurOut("Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile).\n\n");
 
        }
index 6ec35412c3c82206bef933787c820ca36e2158d2..dd0cf3adab7798c71e9e853ff1e5b33c8f53a690 100644 (file)
 #include "groupmap.h"
 #include "sharedcommand.h"
 
-/* The read.otu must be run before you execute a collect.single, rarefaction.single, summary.single, 
-collect.shared, rarefaction.shared or summary.shared command. Mothur will generate a .list, .rabund and .sabund 
-upon completion of the cluster command or you may use your own. The read.otu command parameter options are 
-listfile, rabundfile, sabundfile, groupfile and orderfile. The reaad.otu command can be used in two ways. 
-The first is to read a listfile, rabundfile or sabundfile and run the collect.single, rarefaction.single or summary.single. 
-For this use the read.otu command should be in the following format: read.otu(listfile=yourListFile, orderfile=yourOrderFile). 
-The listfile, rabundfile or sabundfile parameter is required, but you may only use one of them. 
-The second way to use the read.otu command is to read a listfile and a groupfile so you can use the collect.shared, 
-rarefaction.shared or summary.shared commands. In this case the read.otu command should be in the following format: 
-read.otu(listfile=yourListFile, groupfile=yourGroupFile). The listfile parameter and groupfile paramaters are required. 
-When using the command the second way read.otu command parses the .list file and separates it into groups. 
-It outputs a .shared file containing the OTU information for each group. The read.otu command also outputs a .list file for each group. */
-
 class GlobalData;
 
 class ReadOtuCommand : public Command {
@@ -39,14 +26,12 @@ public:
        
 private:
        GlobalData* globaldata;
-       //ReadOTUFile* read;
        InputData* input;
        Command* shared;
        GroupMap* groupMap;
-       string filename, listfile, orderfile, sharedfile, line, label, groupfile, sabundfile, rabundfile, format;
+       string filename, listfile, orderfile, sharedfile, label, groupfile, sabundfile, rabundfile, format;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
 
 };
index aba07b2a8d97503913cff85fedde5d8562ca4f5c..c3f99d2704bec1fc11f0383a69f015768857aad2 100644 (file)
@@ -51,7 +51,6 @@ int SharedCommand::execute(){
        try {
                
                //lookup.clear();
-               int count = 1;
                string errorOff = "no error";
                        
                //read in listfile
@@ -82,13 +81,12 @@ int SharedCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = globaldata->labels;
-               set<int> userLines = globaldata->lines;
                
                
-               while((SharedList != NULL) && ((globaldata->allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((SharedList != NULL) && ((globaldata->allLines == 1) || (userLabels.size() != 0))) {
                        
 
-                       if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(SharedList->getLabel()) == 1){
+                       if(globaldata->allLines == 1 || globaldata->labels.count(SharedList->getLabel()) == 1){
                                        
                                        lookup = SharedList->getSharedRAbundVector();
                                        mothurOut(lookup[0]->getLabel()); mothurOutEndLine();
@@ -98,7 +96,6 @@ int SharedCommand::execute(){
                                
                                        processedLabels.insert(SharedList->getLabel());
                                        userLabels.erase(SharedList->getLabel());
-                                       userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(SharedList->getLabel(), userLabels, errorOff) == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -120,8 +117,6 @@ int SharedCommand::execute(){
                                
                        delete SharedList;
                        SharedList = input->getSharedListVector(); //get new list vector to process
-                       
-                       count++;                
                }
                
                //output error messages about any remaining user labels
@@ -133,7 +128,7 @@ int SharedCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        if (SharedList != NULL) {       delete SharedList;      }
                        SharedList = input->getSharedListVector(lastLabel); //get new list vector to process
index 731a4101eaff0b6b5712caf15bf7a0ad6feb6e62..a2f79f9b0322670e009cf916c0ce8f05a61c5642 100644 (file)
@@ -36,7 +36,6 @@ SummaryCommand::SummaryCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                Estimators.clear();
                
@@ -45,7 +44,7 @@ SummaryCommand::SummaryCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"line","label","calc","abund","size"};
+                       string Array[] =  {"label","calc","abund","size"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -63,13 +62,6 @@ SummaryCommand::SummaryCommand(string option){
                        
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -77,13 +69,10 @@ SummaryCommand::SummaryCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if(label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        calc = validParameter.validFile(parameters, "calc", false);                     
@@ -168,14 +157,14 @@ void SummaryCommand::help(){
        try {
                mothurOut("The summary.single command can only be executed after a successful read.otu WTIH ONE EXECEPTION.\n");
                mothurOut("The summary.single command can be executed after a successful cluster command.  It will use the .list file from the output of the cluster.\n");
-               mothurOut("The summary.single command parameters are label, line, calc, abund.  No parameters are required, but you may not use \n");
-               mothurOut("both the line and label parameters at the same time. The summary.single command should be in the following format: \n");
-               mothurOut("summary.single(label=yourLabel, line=yourLines, calc=yourEstimators).\n");
-               mothurOut("Example summary.single(label=unique-.01-.03, line=0,5,10, calc=sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson).\n");
+               mothurOut("The summary.single command parameters are label, calc, abund.  No parameters are required.\n");
+               mothurOut("The summary.single command should be in the following format: \n");
+               mothurOut("summary.single(label=yourLabel, calc=yourEstimators).\n");
+               mothurOut("Example summary.single(label=unique-.01-.03, calc=sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson).\n");
                validCalculator->printCalc("summary", cout);
                mothurOut("The default value calc is sobs-chao-ace-jack-shannon-npshannon-simpson\n");
-               mothurOut("The label and line parameters are used to analyze specific lines in your input.\n");
-               mothurOut("Note: No spaces between parameter labels (i.e. line), '=' and parameters (i.e.yourLines).\n\n");
+               mothurOut("The label parameter is used to analyze specific labels in your input.\n");
+               mothurOut("Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabels).\n\n");
        }
        catch(exception& e) {
                errorOut(e, "SummaryCommand", "help");
@@ -201,8 +190,6 @@ int SummaryCommand::execute(){
        
                if (abort == true) { return 0; }
                
-               int count = 1;
-               
                //if the users entered no valid calculators don't execute command
                if (sumCalculators.size() == 0) { return 0; }
 
@@ -230,18 +217,15 @@ int SummaryCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
-               
-               while((sabund != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
                        
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(sabund->getLabel()) == 1){                  
+               while((sabund != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
+                       
+                       if(allLines == 1 || labels.count(sabund->getLabel()) == 1){                     
        
                                mothurOut(sabund->getLabel()); mothurOutEndLine();
                                processedLabels.insert(sabund->getLabel());
                                userLabels.erase(sabund->getLabel());
-                               userLines.erase(count);
-
-                               
+                                                               
                                outputFileHandle << sabund->getLabel();
                                for(int i=0;i<sumCalculators.size();i++){
                                        vector<double> data = sumCalculators[i]->getValues(sabund);
@@ -272,7 +256,6 @@ int SummaryCommand::execute(){
                        
                        delete sabund;
                        sabund = input->getSAbundVector();
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -288,7 +271,7 @@ int SummaryCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        if (sabund != NULL) {   delete sabund;  }
                        sabund = input->getSAbundVector(lastLabel);
index b12f76f4e9812b7d26de87769d746167fe3552c1..6ee8c4a522d517b563318d92b840f708b20603e5 100644 (file)
 #include "readotu.h"
 #include "validcalculator.h"
 
-/* The summary() command:
-       The summary command can only be executed after a successful read.list, read.sabund or read.rabund command, with one exception. 
-       The summary command can be executed after a successful cluster command.  It will use the .list file from the output of the cluster. 
-       The summary command outputs a file for each estimator you choose to use.  The summary command parameters are label, line, summary. 
-        No parameters are required, but you may not use both the line and label  parameters at the same time. 
-        The summary command should be in the following format: summary(label=yourLabel, line=yourLines, summary=yourEstimators). 
-        Example summary(label=unique-.01-.03, line=0,5,10, summary=collect-chao-ace-jack-bootstrap-shannon-npshannon-simpson). 
-        The default value for summary is collect-chao-ace-jack-bootstrap-shannon-npshannon-simpson.  
-        The valid summary estimators are: collect-chao-ace-jack-bootstrap-shannon-npshannon-simpson.  
-        The label and line parameters are used to analyze specific lines in your input.  */
-
-
 class GlobalData;
 
 class SummaryCommand : public Command {
@@ -50,9 +38,8 @@ private:
        int abund, size;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string line, label, calc;
+       string label, calc;
        vector<string>  Estimators;
 
 };
index 9f951debfddf4346ed362dffa529d03e4bce3350..ef0485c61886e6f14ae3135f908bf8317855130f 100644 (file)
@@ -40,7 +40,6 @@ SummarySharedCommand::SummarySharedCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                Estimators.clear();
                
@@ -49,7 +48,7 @@ SummarySharedCommand::SummarySharedCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"line","label","calc","groups"};
+                       string Array[] =  {"label","calc","groups"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -69,13 +68,6 @@ SummarySharedCommand::SummarySharedCommand(string option){
                        
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -83,13 +75,10 @@ SummarySharedCommand::SummarySharedCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if(label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        calc = validParameter.validFile(parameters, "calc", false);                     
@@ -176,16 +165,16 @@ SummarySharedCommand::SummarySharedCommand(string option){
 void SummarySharedCommand::help(){
        try {
                mothurOut("The summary.shared command can only be executed after a successful read.otu command.\n");
-               mothurOut("The summary.shared command parameters are label, line and calc.  No parameters are required, but you may not use \n");
-               mothurOut("both the line and label parameters at the same time. The summary.shared command should be in the following format: \n");
-               mothurOut("summary.shared(label=yourLabel, line=yourLines, calc=yourEstimators, groups=yourGroups).\n");
-               mothurOut("Example summary.shared(label=unique-.01-.03, line=0,5,10, groups=B-C, calc=sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan).\n");
+               mothurOut("The summary.shared command parameters are label and calc.  No parameters are required.\n");
+               mothurOut("The summary.shared command should be in the following format: \n");
+               mothurOut("summary.shared(label=yourLabel, calc=yourEstimators, groups=yourGroups).\n");
+               mothurOut("Example summary.shared(label=unique-.01-.03, groups=B-C, calc=sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan).\n");
                validCalculator->printCalc("sharedsummary", cout);
                mothurOut("The default value for calc is sharedsobs-sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan\n");
                mothurOut("The default value for groups is all the groups in your groupfile.\n");
-               mothurOut("The label and line parameters are used to analyze specific lines in your input.\n");
+               mothurOut("The label parameter is used to analyze specific labels in your input.\n");
                mothurOut("The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed.  You must enter at least 2 valid groups.\n");
-               mothurOut("Note: No spaces between parameter labels (i.e. line), '=' and parameters (i.e.yourLines).\n\n");
+               mothurOut("Note: No spaces between parameter labels (i.e. label), '=' and parameters (i.e.yourLabel).\n\n");
        }
        catch(exception& e) {
                errorOut(e, "SummarySharedCommand", "help");
@@ -208,8 +197,6 @@ int SummarySharedCommand::execute(){
        try {
        
                if (abort == true) { return 0; }
-               
-               int count = 1;  
        
                //if the users entered no valid calculators don't execute command
                if (sumCalculators.size() == 0) { return 0; }
@@ -267,18 +254,16 @@ int SummarySharedCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
-               
+                       
                //as long as you are not at the end of the file or done wih the lines you want
-               while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(lookup[0]->getLabel()) == 1){                       
+                       if(allLines == 1 || labels.count(lookup[0]->getLabel()) == 1){                  
                                mothurOut(lookup[0]->getLabel()); mothurOutEndLine();
                                process(lookup);
                                
                                processedLabels.insert(lookup[0]->getLabel());
                                userLabels.erase(lookup[0]->getLabel());
-                               userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(lookup[0]->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -300,7 +285,6 @@ int SummarySharedCommand::execute(){
                        //prevent memory leak
                        for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  } 
                        lookup = input->getSharedRAbundVectors();
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -316,7 +300,7 @@ int SummarySharedCommand::execute(){
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                                for (int i = 0; i < lookup.size(); i++) {  if (lookup[i] != NULL) {     delete lookup[i];       } } 
                                lookup = input->getSharedRAbundVectors(lastLabel);
index 515c776716100358d9369e21ff2e400d4458101f..119a75c47438a85460b4b798501edbf0807569c0 100644 (file)
 #include "readotu.h"
 #include "validcalculator.h"
 
-
-/*The summary.shared() command
-       The summary.shared command can only be executed after a successful read.shared command. 
-       It outputs a file for each estimator you choose to use.  The summary.shared command parameters are label, 
-       line and sharedsummary.  No parameters are required, but you may not use both the line and label parameters at the same time.  
-       The summary.shared command should be in the following format: summary.shared(label=yourLabel, 
-       line=yourLines, sharedsummary=yourEstimators).  
-       Example summary.shared(label=unique-.01-.03, line=0,5,10, sharedsummary=sharedChao-sharedAce-sharedJabund
-       -sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN).  
-       The default value for sharedsummary is sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN. 
-       The valid sharedsummary estimators are: sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass
-       -sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN.  The label and line parameters are used to analyze specific lines in your input. */
-
-
 class GlobalData;
 
-
 class SummarySharedCommand : public Command {
 
 public:
@@ -53,9 +38,8 @@ private:
        map<string, string> parameters;
        map<string, string>::iterator it;
        bool abort, allLines, mult;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string line, label, calc, groups;
+       string label, calc, groups;
        vector<string>  Estimators, Groups;
        vector<SharedRAbundVector*> lookup;
        string outputFileName, format, outAllFileName;
index 27f701ffd20da0ea1d83a011b575a5d9fb5ea956..d25c46adde9b46ce3044a115d1c816dd552ac146 100644 (file)
@@ -27,7 +27,6 @@ TreeGroupCommand::TreeGroupCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                Groups.clear();
                Estimators.clear();
@@ -37,7 +36,7 @@ TreeGroupCommand::TreeGroupCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"line","label","calc","groups", "phylip", "column", "name", "precision","cutoff"};
+                       string Array[] =  {"label","calc","groups", "phylip", "column", "name", "precision","cutoff"};
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -78,13 +77,6 @@ TreeGroupCommand::TreeGroupCommand(string option){
 
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -92,13 +84,10 @@ TreeGroupCommand::TreeGroupCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if(label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                                
                        groups = validParameter.validFile(parameters, "groups", false);                 
@@ -172,13 +161,13 @@ void TreeGroupCommand::help(){
        try {
                mothurOut("The tree.shared command creates a .tre to represent the similiarity between groups or sequences.\n");
                mothurOut("The tree.shared command can only be executed after a successful read.otu command or by providing a distance file.\n");
-               mothurOut("The tree.shared command parameters are groups, calc, phylip, column, name, cutoff, precision, line and label.  You may not use line and label at the same time.\n");
+               mothurOut("The tree.shared command parameters are groups, calc, phylip, column, name, cutoff, precision and label.\n");
                mothurOut("The groups parameter allows you to specify which of the groups in your groupfile you would like included used.\n");
-               mothurOut("The group names are separated by dashes. The line and label allow you to select what distance levels you would like trees created for, and are also separated by dashes.\n");
+               mothurOut("The group names are separated by dashes. The label allow you to select what distance levels you would like trees created for, and are also separated by dashes.\n");
                mothurOut("The phylip or column parameter are required if you do not run the read.otu command first, and only one may be used.  If you use a column file the name filename is required. \n");
                mothurOut("If you do not provide a cutoff value 10.00 is assumed. If you do not provide a precision value then 100 is assumed.\n");
-               mothurOut("The tree.shared command should be in the following format: tree.shared(groups=yourGroups, calc=yourCalcs, line=yourLines, label=yourLabels).\n");
-               mothurOut("Example tree.shared(groups=A-B-C, line=1-3-5, calc=jabund-sorabund).\n");
+               mothurOut("The tree.shared command should be in the following format: tree.shared(groups=yourGroups, calc=yourCalcs, label=yourLabels).\n");
+               mothurOut("Example tree.shared(groups=A-B-C, calc=jabund-sorabund).\n");
                mothurOut("The default value for groups is all the groups in your groupfile.\n");
                mothurOut("The default value for calc is jclass-thetayc.\n");
                mothurOut("The tree.shared command outputs a .tre file for each calculator you specify at each distance you choose.\n");
@@ -427,7 +416,6 @@ void TreeGroupCommand::makeSimsDist() {
 /***********************************************************/
 void TreeGroupCommand::makeSimsShared() {
        try {
-               int count = 1;  
        
                //clear globaldatas old tree names if any
                globaldata->Treenames.clear();
@@ -442,18 +430,16 @@ void TreeGroupCommand::makeSimsShared() {
                
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
-
+               
                //as long as you are not at the end of the file or done wih the lines you want
-               while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+               while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                
-                       if(allLines == 1 || lines.count(count) == 1 || labels.count(lookup[0]->getLabel()) == 1){                       
+                       if(allLines == 1 || labels.count(lookup[0]->getLabel()) == 1){                  
                                mothurOut(lookup[0]->getLabel()); mothurOutEndLine();
                                process(lookup);
                                
                                processedLabels.insert(lookup[0]->getLabel());
                                userLabels.erase(lookup[0]->getLabel());
-                               userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(lookup[0]->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -472,7 +458,6 @@ void TreeGroupCommand::makeSimsShared() {
                        //get next line to process
                        for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  } 
                        lookup = input->getSharedRAbundVectors();
-                       count++;
                }
                
                //output error messages about any remaining user labels
@@ -488,7 +473,7 @@ void TreeGroupCommand::makeSimsShared() {
                        }
                }
                
-               //run last line if you need to
+               //run last label if you need to
                if (needToRun == true)  {
                        for (int i = 0; i < lookup.size(); i++) {  if (lookup[i] != NULL) {             delete lookup[i]; }             } 
                        lookup = input->getSharedRAbundVectors(lastLabel);
index 08389f8b798077e72b06e6a847a2c3f4d094214e..3f2822cfae2abe2929b8ac8f2b94b0e5b9236503 100644 (file)
@@ -66,9 +66,8 @@ private:
        float precision, cutoff;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string phylipfile, columnfile, namefile, calc, groups, line, label;
+       string phylipfile, columnfile, namefile, calc, groups, label;
        vector<string>  Estimators, Groups; //holds estimators to be used
        
        //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
index f28800191f908ec7feabd8271228583b61c3b6a8..b6a53e67eaa8947ffd6d4b48b26e11fe23d7bdc4 100644 (file)
@@ -24,7 +24,6 @@ VennCommand::VennCommand(string option){
                globaldata = GlobalData::getInstance();
                abort = false;
                allLines = 1;
-               lines.clear();
                labels.clear();
                
                //allow user to run help
@@ -32,7 +31,7 @@ VennCommand::VennCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string AlignArray[] =  {"groups","line","label","calc", "abund"};
+                       string AlignArray[] =  {"groups","label","calc", "abund"};
                        vector<string> myArray (AlignArray, AlignArray+(sizeof(AlignArray)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -52,13 +51,6 @@ VennCommand::VennCommand(string option){
 
                        //check for optional parameter and set defaults
                        // ...at some point should added some additional type checking...
-                       line = validParameter.validFile(parameters, "line", false);                             
-                       if (line == "not found") { line = "";  }
-                       else { 
-                               if(line != "all") {  splitAtDash(line, lines);  allLines = 0;  }
-                               else { allLines = 1;  }
-                       }
-                       
                        label = validParameter.validFile(parameters, "label", false);                   
                        if (label == "not found") { label = ""; }
                        else { 
@@ -66,13 +58,10 @@ VennCommand::VennCommand(string option){
                                else { allLines = 1;  }
                        }
                        
-                       //make sure user did not use both the line and label parameters
-                       if ((line != "") && (label != "")) { mothurOut("You cannot use both the line and label parameters at the same time. "); mothurOutEndLine(); abort = true; }
-                       //if the user has not specified any line or labels use the ones from read.otu
-                       else if ((line == "") && (label == "")) {  
+                       //if the user has not specified any labels use the ones from read.otu
+                       if (label == "") {  
                                allLines = globaldata->allLines; 
                                labels = globaldata->labels; 
-                               lines = globaldata->lines;
                        }
                        
                        groups = validParameter.validFile(parameters, "groups", false);                 
@@ -151,12 +140,12 @@ VennCommand::VennCommand(string option){
 void VennCommand::help(){
        try {
                mothurOut("The venn command can only be executed after a successful read.otu command.\n");
-               mothurOut("The venn command parameters are groups, calc, abund, line and label.  No parameters are required, but you may not use line and label at the same time.\n");
+               mothurOut("The venn command parameters are groups, calc, abund and label.  No parameters are required.\n");
                mothurOut("The groups parameter allows you to specify which of the groups in your groupfile you would like included in your venn diagram, you may only use a maximum of 4 groups.\n");
-               mothurOut("The group names are separated by dashes. The line and label allow you to select what distance levels you would like a venn diagram created for, and are also separated by dashes.\n");
-               mothurOut("The venn command should be in the following format: venn(groups=yourGroups, calc=yourCalcs, line=yourLines, label=yourLabels, abund=yourAbund).\n");
-               mothurOut("Example venn(groups=A-B-C, line=1-3-5, calc=sharedsobs-sharedchao, abund=20).\n");
-               mothurOut("The default value for groups is all the groups in your groupfile up to 4, and all lines in your inputfile will be used.\n");
+               mothurOut("The group names are separated by dashes. The label allows you to select what distance levels you would like a venn diagram created for, and are also separated by dashes.\n");
+               mothurOut("The venn command should be in the following format: venn(groups=yourGroups, calc=yourCalcs, label=yourLabels, abund=yourAbund).\n");
+               mothurOut("Example venn(groups=A-B-C, calc=sharedsobs-sharedchao, abund=20).\n");
+               mothurOut("The default value for groups is all the groups in your groupfile up to 4, and all labels in your inputfile will be used.\n");
                mothurOut("The default value for calc is sobs if you have only read a list file or if you have selected only one group, and sharedsobs if you have multiple groups.\n");
                mothurOut("The default available estimators for calc are sobs, chao and ace if you have only read a list file, and sharedsobs, sharedchao and sharedace if you have read a list and group file or a shared file.\n");
                mothurOut("The only estmiator available four 4 groups is sharedsobs.\n");
@@ -189,7 +178,6 @@ int VennCommand::execute(){
        
                if (abort == true) { return 0; }
                
-               int count = 1;
                string lastLabel;
                
                //if the users entered no valid calculators don't execute command
@@ -216,18 +204,16 @@ int VennCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = labels;
-               set<int> userLines = lines;
                
                if (format != "list") { 
                        
                        //as long as you are not at the end of the file or done wih the lines you want
-                       while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+                       while((lookup[0] != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
 
-                               if(allLines == 1 || lines.count(count) == 1 || labels.count(lookup[0]->getLabel()) == 1){                       
+                               if(allLines == 1 || labels.count(lookup[0]->getLabel()) == 1){                  
                                        mothurOut(lookup[0]->getLabel()); mothurOutEndLine();
                                        processedLabels.insert(lookup[0]->getLabel());
                                        userLabels.erase(lookup[0]->getLabel());
-                                       userLines.erase(count);
                                        
                                        if (lookup.size() > 4) {
                                                mothurOut("Error: Too many groups chosen.  You may use up to 4 groups with the venn command.  I will use the first four groups in your groupfile."); mothurOutEndLine();
@@ -257,7 +243,6 @@ int VennCommand::execute(){
                                //get next line to process
                                for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  } 
                                lookup = input->getSharedRAbundVectors();
-                               count++;
                        }
                        
                        //output error messages about any remaining user labels
@@ -273,7 +258,7 @@ int VennCommand::execute(){
                                }
                        }
                
-                       //run last line if you need to
+                       //run last label if you need to
                        if (needToRun == true)  {
                                        for (int i = 0; i < lookup.size(); i++) {  if (lookup[i] != NULL) {     delete lookup[i]; }  } 
                                        lookup = input->getSharedRAbundVectors(lastLabel);
@@ -296,16 +281,15 @@ int VennCommand::execute(){
                        
                }else{
                
-                       while((sabund != NULL) && ((allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
+                       while((sabund != NULL) && ((allLines == 1) || (userLabels.size() != 0))) {
                
-                               if(allLines == 1 || lines.count(count) == 1 || labels.count(sabund->getLabel()) == 1){                  
+                               if(allLines == 1 || labels.count(sabund->getLabel()) == 1){                     
        
                                        mothurOut(sabund->getLabel()); mothurOutEndLine();
                                        venn->getPic(sabund, vennCalculators);
                                        
                                        processedLabels.insert(sabund->getLabel());
                                        userLabels.erase(sabund->getLabel());
-                                       userLines.erase(count);
                                }
                                
                                if ((anyLabelsToProcess(sabund->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
@@ -323,7 +307,6 @@ int VennCommand::execute(){
                                
                                delete sabund;
                                sabund = input->getSAbundVector();
-                               count++;
                        }
                        
                        //output error messages about any remaining user labels
@@ -339,7 +322,7 @@ int VennCommand::execute(){
                                }
                        }
                
-                       //run last line if you need to
+                       //run last label if you need to
                        if (needToRun == true)  {
                                if (sabund != NULL) {   delete sabund;  }
                                sabund = input->getSAbundVector(lastLabel);
index 79a22d9bf6127a222382a6878ac026ebf1d5ae2b..cc6b333d12f7eba65d9837e167220e34d6b3327d 100644 (file)
@@ -41,9 +41,8 @@ private:
        int abund;
        
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string format, groups, calc, line, label;
+       string format, groups, calc, label;
        vector<string> Estimators, Groups;