X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=summarysharedcommand.h;h=f366d0f62432e0bc34c475b190f946a04ba26335;hb=2bb9267aa4b4ecdf8488b06605cc9f3f36fa4332;hp=515c776716100358d9369e21ff2e400d4458101f;hpb=0470f6d037aacb3563c3f7010708120a4a67d4e6;p=mothur.git diff --git a/summarysharedcommand.h b/summarysharedcommand.h index 515c776..f366d0f 100644 --- a/summarysharedcommand.h +++ b/summarysharedcommand.h @@ -14,53 +14,44 @@ #include "sharedrabundvector.h" #include "inputdata.h" #include "calculator.h" -#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: SummarySharedCommand(string); - ~SummarySharedCommand(); - int execute(); - void help(); + SummarySharedCommand(); + ~SummarySharedCommand() {} + + vector 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; + struct linePair { + int start; + int end; + }; + vector lines; vector sumCalculators; InputData* input; - ValidCalculators* validCalculator; - SharedListVector* SharedList; - OptionParser* parser; - map parameters; - map::iterator it; - bool abort, allLines, mult; - set lines; //hold lines to be used + + bool abort, allLines, mult, all, createPhylip; set labels; //holds labels to be used - string line, label, calc, groups; - vector Estimators, Groups; + string label, calc, groups, sharedfile; + vector Estimators, Groups, outputNames; vector lookup; - string outputFileName, format, outAllFileName; - ofstream outputFileHandle, outAll; - void process(vector); + string format, outputDir; + int numGroups, processors; + int process(vector, string, string); + int driver(vector, int, int, string, string, vector< vector >&); };