X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=summarycommand.h;h=3c8420795550e1f39ef5529ad235d13e11e5e7a5;hp=8f42f459bf2de9a6c12679a42ea8bbf35c7835a1;hb=050a3ff02473a3d4c0980964e1a9ebe52e55d6b8;hpb=154e089bcd37c2c2f773e53ffb88a20170b27037 diff --git a/summarycommand.h b/summarycommand.h index 8f42f45..3c84207 100644 --- a/summarycommand.h +++ b/summarycommand.h @@ -13,39 +13,45 @@ #include "sabundvector.hpp" #include "inputdata.h" #include "calculator.h" -#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 { public: + SummaryCommand(string); SummaryCommand(); - ~SummaryCommand(); - int execute(); + ~SummaryCommand(){} + + vector setParameters(); + string getCommandName() { return "summary.single"; } + string getCommandCategory() { return "OTU-Based Approaches"; } + + string getHelpString(); + string getOutputPattern(string); + string getCitation() { return "http://www.mothur.org/wiki/Summary.single"; } + string getDescription() { return "generate summary file that has the calculator value for each line in the OTU data"; } + + + int execute(); + void help() { m->mothurOut(getHelpString()); } private: - GlobalData* globaldata; - ReadOTUFile* read; vector sumCalculators; InputData* input; - ValidCalculators* validCalculator; SAbundVector* sabund; - string outputFileName; - ofstream outputFileHandle; - int abund; + int abund, size, iters, subsampleSize; + + bool abort, allLines, groupMode, subsample; + set labels; //holds labels to be used + string label, calc, outputDir, sharedfile, listfile, rabundfile, sabundfile, format, inputfile; + vector Estimators; + vector inputFileNames, outputNames; + vector groups; + + vector parseSharedFile(string); + vector createGroupSummaryFile(int, int, vector&, map); + int process(SAbundVector*&, ofstream&, ofstream&); + + }; #endif