]> git.donarmstrong.com Git - mothur.git/blobdiff - summarysharedcommand.h
broke up globaldata and moved error checking and help into commands
[mothur.git] / summarysharedcommand.h
index 0f2f75386b23382699fbb2b524268fee373dfc25..515c776716100358d9369e21ff2e400d4458101f 100644 (file)
 /*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, jumble and sharedsummary.  No parameters are required, but you may not use both the line and label parameters at the same time.  
+       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, jumble=yourJumble, sharedsummary=yourEstimators).  
-       Example summary.shared(label=unique-.01-.03, line=0,5,10, jumble=1, sharedsummary=sharedChao-sharedAce-sharedJabund
+       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 jumble is 0 (meaning don’t jumble, if it’s set to 1 then it will jumble) and 
-       sharedsummary is 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. */
 
@@ -38,9 +37,10 @@ class GlobalData;
 class SummarySharedCommand : public Command {
 
 public:
-       SummarySharedCommand();
+       SummarySharedCommand(string);
        ~SummarySharedCommand();
        int execute();
+       void help();
        
 private:
        GlobalData* globaldata;
@@ -49,10 +49,17 @@ private:
        InputData* input;
        ValidCalculators* validCalculator;
        SharedListVector* SharedList;
+       OptionParser* parser;
+       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;
+       vector<string>  Estimators, Groups;
        vector<SharedRAbundVector*> lookup;
        string outputFileName, format, outAllFileName;
        ofstream outputFileHandle, outAll;
-       bool mult;
        void process(vector<SharedRAbundVector*>);
 
 };