*
*/
-#include <iostream>
-#include <fstream>
-#include <map>
#include "command.hpp"
#include "sharedlistvector.h"
#include "inputdata.h"
-#include "shared.h"
-#include "readmatrix.hpp"
+#include "readotu.h"
/* The shared() command:
The shared command can only be executed after a successful read.shared command.
class SharedCommand : public Command {
public:
- SharedCommand();
+ SharedCommand(string);
+ SharedCommand();
~SharedCommand();
+ vector<string> getRequiredParameters();
+ vector<string> getValidParameters();
+ vector<string> getRequiredFiles();
+ map<string, vector<string> > getOutputFiles() { return outputTypes; }
int execute();
+ void help() {}
private:
- void printSharedData();
+ void printSharedData(vector<SharedRAbundVector*>);
+ int createMisMatchFile();
+ int readOrderFile();
+ bool isValidGroup(string, vector<string>);
+ int eliminateZeroOTUS(vector<SharedRAbundVector*>&);
+ map<string, vector<string> > outputTypes;
+
GlobalData* globaldata;
- ReadMatrix* read;
+ ReadOTUFile* read;
SharedListVector* SharedList;
InputData* input;
- Shared* shared;
- map<string, SharedRAbundVector*>::iterator it;
+ GroupMap* groupMap;
+ vector<string> groups, outputNames, order;
ofstream out;
- string filename;
+ string filename, fileroot, outputDir;
+ bool firsttime, pickedGroups;
+ map<string, ofstream*> filehandles;
+ map<string, ofstream*>::iterator it3;
};