X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=rarefactsharedcommand.h;h=4f08d00d7332ae32824464b809744042bd997d7f;hp=d81ff6dc2d1c6588d86f9cccbb0251778bd85011;hb=615301e57c25e241356a9c2380648d117709458d;hpb=0470f6d037aacb3563c3f7010708120a4a67d4e6 diff --git a/rarefactsharedcommand.h b/rarefactsharedcommand.h index d81ff6d..4f08d00 100644 --- a/rarefactsharedcommand.h +++ b/rarefactsharedcommand.h @@ -13,50 +13,44 @@ #include "inputdata.h" #include "rarefact.h" #include "display.h" -#include "readotu.h" #include "validcalculator.h" -/* The rarefaction.shared() command: - The rarefaction command generates a rarefaction curve from a given file representing several groups. - The rarefaction.shared command can only be executed after a successful read.shared command. It outputs a file for each estimator you choose to use. - The rarefaction.shared command parameters are label, line, iters and sharedrarefaction. - 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.shared(label=yourLabel, line=yourLines, iters=yourIters, - sharedrarefaction=yourEstimators). Example rarefaction.shared(label=unique-.01-.03, line=0,5,10, iters=10000, - sharedrarefaction =sharedobserved). The default values for - iters is 1000 and sharedrarefaction is sharedobserved which calculates the shared rarefaction curve for the observed richness. - The valid sharedrarefaction estimator is sharedobserved. The label and line parameters are used to analyze specific lines in your input. */ - - -class GlobalData; - class RareFactSharedCommand : public Command { public: - RareFactSharedCommand(string); - ~RareFactSharedCommand(); - int execute(); - void help(); + RareFactSharedCommand(string); + RareFactSharedCommand(); + ~RareFactSharedCommand() {} + + vector setParameters(); + string getCommandName() { return "rarefaction.shared"; } + 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.shared"; } + string getDescription() { return "generate inter-sample rarefaction curves using a re-sampling without replacement approach"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } + private: - GlobalData* globaldata; - ReadOTUFile* read; + vector lookup; - InputData* input; - ValidCalculators* validCalculator; - Rarefact* rCurve; - vector rDisplays; - int freq, nIters; + int nIters, subsampleSize, iters; string format; - OptionParser* parser; - map parameters; - map::iterator it; - bool abort, allLines; - set lines; //hold lines to be used + float freq; + + map file2Group; //index in outputNames[i] -> group + bool abort, allLines, jumble, groupMode, subsample; set labels; //holds labels to be used - string line, label, calc, groups; - vector Estimators, Groups; - + string label, calc, groups, outputDir, sharedfile, designfile; + vector Estimators, Groups, outputNames, Sets; + + int process(GroupMap&, string); + vector createGroupFile(vector&); + int subsampleLookup(vector&, string); };