]> git.donarmstrong.com Git - mothur.git/blobdiff - mgclustercommand.h
added modify names parameter to set.dir
[mothur.git] / mgclustercommand.h
index f16a8f0c5ebc75bf07039a54d910d266e418b94e..008bd222a0a91869e14895738ea852b383c0395f 100644 (file)
 
 #include "command.hpp"
 #include "readblast.h"
-#include "sparsematrix.hpp"
 #include "nameassignment.hpp"
-#include "globaldata.hpp"
 #include "cluster.hpp"
 #include "hcluster.h"
+#include "rabundvector.hpp"
+#include "sabundvector.hpp"
+#include "counttable.h"
 
 /**********************************************************************/
 
@@ -25,27 +26,34 @@ class MGClusterCommand : public Command {
 public:
        MGClusterCommand(string);
        MGClusterCommand();
-       ~MGClusterCommand();
-       vector<string> getRequiredParameters();
-       vector<string> getValidParameters();
-       vector<string> getRequiredFiles();
-       map<string, vector<string> > getOutputFiles() { return outputTypes; }
-       int execute();
-       void help();
+       ~MGClusterCommand(){}
+       
+       vector<string> setParameters();
+       string getCommandName()                 { return "mgcluster";   }
+       string getCommandCategory()             { return "Clustering";  }
+       
+       string getHelpString(); 
+    string getOutputPattern(string);   
+       string getCitation() { return "Schloss PD, Handelsman J (2008). A statistical toolbox for metagenomics. BMC Bioinformatics 9: 34. \nhttp://www.mothur.org/wiki/Mgcluster"; }
+       string getDescription()         { return "cluster your sequences into OTUs using a blast file"; }
+
+       int execute(); 
+       void help() { m->mothurOut(getHelpString()); }  
+       
        
 private:
-       GlobalData* globaldata;
        ReadBlast* read;
        NameAssignment* nameMap;
        Cluster* cluster;
        HCluster* hcluster;
        ListVector* list;
+    CountTable* ct;
        ListVector oldList;
+    RAbundVector rav;
        vector<seqDist> overlapMatrix;
        vector<string> outputNames;
-       map<string, vector<string> > outputTypes;
        
-       string blastfile, method, namefile, overlapFile, distFile, outputDir;
+       string blastfile, method, namefile, countfile, overlapFile, distFile, outputDir;
        ofstream sabundFile, rabundFile, listFile;
        double cutoff;
        float penalty;
@@ -56,6 +64,7 @@ private:
        ListVector* mergeOPFs(map<string, int>, float);
        void sortHclusterFiles(string, string);
        vector<seqDist> getSeqs(ifstream&);
+    void createRabund(CountTable*&, ListVector*&, RAbundVector*&);
 
 };