X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mgclustercommand.h;fp=mgclustercommand.h;h=df0c526f2071636e87b0c2a403d2410324a8b89d;hb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;hp=0000000000000000000000000000000000000000;hpb=1b73ff67c83892a025e597dabd9df6fe7b58206a;p=mothur.git diff --git a/mgclustercommand.h b/mgclustercommand.h new file mode 100644 index 0000000..df0c526 --- /dev/null +++ b/mgclustercommand.h @@ -0,0 +1,71 @@ +#ifndef MGCLUSTERCOMMAND_H +#define MGCLUSTERCOMMAND_H + +/* + * mgclustercommand.h + * Mothur + * + * Created by westcott on 12/11/09. + * Copyright 2009 Schloss Lab. All rights reserved. + * + */ + +#include "command.hpp" +#include "readblast.h" +#include "sparsematrix.hpp" +#include "nameassignment.hpp" +#include "cluster.hpp" +#include "hcluster.h" +#include "rabundvector.hpp" +#include "sabundvector.hpp" + +/**********************************************************************/ + +class MGClusterCommand : public Command { + +public: + MGClusterCommand(string); + MGClusterCommand(); + ~MGClusterCommand(){} + + vector setParameters(); + string getCommandName() { return "mgcluster"; } + string getCommandCategory() { return "Clustering"; } + string getHelpString(); + 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: + ReadBlast* read; + NameAssignment* nameMap; + Cluster* cluster; + HCluster* hcluster; + ListVector* list; + ListVector oldList; + vector overlapMatrix; + vector outputNames; + + string blastfile, method, namefile, overlapFile, distFile, outputDir; + ofstream sabundFile, rabundFile, listFile; + double cutoff; + float penalty; + int precision, length, precisionLength; + bool abort, minWanted, hclusterWanted, merge, hard; + + void printData(ListVector*); + ListVector* mergeOPFs(map, float); + void sortHclusterFiles(string, string); + vector getSeqs(ifstream&); + +}; + +/**********************************************************************/ + +#endif + + +