]> git.donarmstrong.com Git - mothur.git/blobdiff - summarysharedcommand.h
added sequence name to error string in fastq.info. Changed np_shannon to npshannon.
[mothur.git] / summarysharedcommand.h
index ea141d1610c41676cad785690e32b8a16268cbd3..f366d0f62432e0bc34c475b190f946a04ba26335 100644 (file)
 #include "sharedrabundvector.h"
 #include "inputdata.h"
 #include "calculator.h"
-#include "readotu.h"
-#include "sharedlistvector.h"
 #include "validcalculator.h"
-#include "sharedutilities.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, jumble 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
-       -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 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:
+       SummarySharedCommand(string);
        SummarySharedCommand();
-       ~SummarySharedCommand();
-       int execute();
+       ~SummarySharedCommand() {}
+       
+       vector<string> setParameters();
+       string getCommandName()                 { return "summary.shared";                      }
+       string getCommandCategory()             { return "OTU-Based Approaches";        }
+       string getHelpString(); 
+       string getCitation() { return "http://www.mothur.org/wiki/Summary.shared"; }
+       string getDescription()         { return "generate a summary file containing calculator values for each line in the OTU data and for all possible comparisons between groups"; }
+
+       int execute(); 
+       void help() { m->mothurOut(getHelpString()); }  
+       
        
 private:
-       GlobalData* globaldata;
-       ReadOTUFile* read;
-       SharedUtil* util;
+       struct linePair {
+               int start;
+               int end;
+       };
+       vector<linePair> lines;
        vector<Calculator*> sumCalculators;     
        InputData* input;
-       ValidCalculators* validCalculator;
-       SharedListVector* SharedList;
-       SharedOrderVector* order;
+       
+       bool abort, allLines, mult, all, createPhylip;
+       set<string> labels; //holds labels to be used
+       string label, calc, groups, sharedfile;
+       vector<string>  Estimators, Groups, outputNames;
        vector<SharedRAbundVector*> lookup;
-       string outputFileName, format, outAllFileName;
-       ofstream outputFileHandle, outAll;
-       bool mult;
+       string format, outputDir;
+       int numGroups, processors;
+       int process(vector<SharedRAbundVector*>, string, string);
+       int driver(vector<SharedRAbundVector*>, int, int, string, string, vector< vector<seqDist> >&);
 
 };