X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=rarefactcommand.h;h=02fe6e3aa4355a107e76f06d8f8f9a7f0df19118;hp=0da5f0c20548196ed65d6e200620a8b0d9009d39;hb=b206f634aae1b4ce13978d203247fb64757d5482;hpb=58cf1d08fee8c64334979075fa57bcafb035a2ed diff --git a/rarefactcommand.h b/rarefactcommand.h index 0da5f0c..02fe6e3 100644 --- a/rarefactcommand.h +++ b/rarefactcommand.h @@ -9,48 +9,51 @@ * */ -#include -#include -#include #include "command.hpp" #include "ordervector.hpp" #include "inputdata.h" #include "rarefact.h" #include "display.h" -#include "readmatrix.hpp" - - -/*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; +#include "validcalculator.h" class RareFactCommand : public Command { public: + RareFactCommand(string); RareFactCommand(); - ~RareFactCommand(); - int execute(); + ~RareFactCommand(){} + + vector setParameters(); + string getCommandName() { return "rarefaction.single"; } + string getCommandCategory() { return "OTU-Based Approaches"; } + + string getHelpString(); + string getOutputPattern(string); + string getCitation() { return "Magurran AE (2004). Measuring biological diversity. Blackwell Pub.: Malden, Ma. \nhttp://www.mothur.org/wiki/Rarefaction.single"; } + string getDescription() { return "generate intra-sample rarefaction curves using a re-sampling without replacement approach"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } private: - GlobalData* globaldata; + vector rDisplays; - ReadMatrix* read; OrderVector* order; InputData* input; Rarefact* rCurve; - int freq, nIters; + int nIters, abund, processors; + float freq; + + bool abort, allLines, groupMode; + set labels; //holds labels to be used + string label, calc, sharedfile, listfile, rabundfile, sabundfile, format, inputfile; + vector Estimators; + vector inputFileNames, outputNames; + vector groups; + string outputDir; + + vector parseSharedFile(string, map >&); + vector createGroupFile(vector&, map); }; #endif