1 #ifndef MGCLUSTERCOMMAND_H
2 #define MGCLUSTERCOMMAND_H
8 * Created by westcott on 12/11/09.
9 * Copyright 2009 Schloss Lab. All rights reserved.
13 #include "command.hpp"
14 #include "readblast.h"
15 #include "nameassignment.hpp"
16 #include "cluster.hpp"
18 #include "rabundvector.hpp"
19 #include "sabundvector.hpp"
20 #include "counttable.h"
22 /**********************************************************************/
24 class MGClusterCommand : public Command {
27 MGClusterCommand(string);
31 vector<string> setParameters();
32 string getCommandName() { return "mgcluster"; }
33 string getCommandCategory() { return "Clustering"; }
35 string getHelpString();
36 string getOutputPattern(string);
37 string getCitation() { return "Schloss PD, Handelsman J (2008). A statistical toolbox for metagenomics. BMC Bioinformatics 9: 34. \nhttp://www.mothur.org/wiki/Mgcluster"; }
38 string getDescription() { return "cluster your sequences into OTUs using a blast file"; }
41 void help() { m->mothurOut(getHelpString()); }
46 NameAssignment* nameMap;
53 vector<seqDist> overlapMatrix;
54 vector<string> outputNames;
56 string blastfile, method, namefile, countfile, overlapFile, distFile, outputDir;
57 ofstream sabundFile, rabundFile, listFile;
59 float penalty, adjust;
60 int precision, length, precisionLength;
61 bool abort, minWanted, hclusterWanted, merge, hard, cutoffSet;
63 void printData(ListVector*);
64 ListVector* mergeOPFs(map<string, int>, float);
65 void sortHclusterFiles(string, string);
66 vector<seqDist> getSeqs(ifstream&);
67 void createRabund(CountTable*&, ListVector*&, RAbundVector*&);
71 /**********************************************************************/