]> git.donarmstrong.com Git - mothur.git/blobdiff - parsimonycommand.h
sffinfo bug with flow grams right index when clipQualRight=0
[mothur.git] / parsimonycommand.h
index 63980c254545ea07e7a4ffe71b1d9c496407ecf1..7f7ad893b74140087248edfd7deb7b8c3441e671 100644 (file)
 
 #include "command.hpp"
 #include "parsimony.h"
-#include "treemap.h"
+#include "counttable.h"
 #include "progress.hpp"
 #include "sharedutilities.h"
 #include "fileoutput.h"
+#include "readtree.h"
 
 
-class GlobalData;
-
 class ParsimonyCommand : public Command {
 
 public:
        ParsimonyCommand(string);       
-       ~ParsimonyCommand() { delete pars; delete util; delete output; }
-       int execute();  
-       void help();
+       ParsimonyCommand();
+       ~ParsimonyCommand(){}
+       
+       vector<string> setParameters();
+       string getCommandName()                 { return "parsimony";                           }
+       string getCommandCategory()             { return "Hypothesis Testing";          }
+       
+       string getHelpString(); 
+    string getOutputPattern(string);   
+       string getCitation() { return "Slatkin M, Maddison WP (1989). A cladistic measure of gene flow inferred from the phylogenies of alleles. Genetics 123: 603-13. \nSlatkin M, Maddison WP (1990). Detecting isolation by distance using phylogenies of genes. Genetics 126: 249-60. \nMartin AP (2002). Phylogenetic approaches for describing and comparing the diversity of microbial communities. Appl Environ Microbiol 68: 3673-82. \nSchloss PD, Handelsman J (2006). Introducing TreeClimber, a test to compare microbial community structure. Appl Environ Microbiol 72: 2379-84.\nhttp://www.mothur.org/wiki/Parsimony"; }
+       string getDescription()         { return "generic test that describes whether two or more communities have the same structure"; }
 
+       int execute();
+       void help() { m->mothurOut(getHelpString()); }
+       
 private:
-       GlobalData* globaldata;
-       SharedUtil* util;
        FileOutput* output;
        vector<Tree*> T;           //user trees
        Tree* randT;  //random tree
        Tree* copyUserTree; 
-       TreeMap* tmap; 
-       TreeMap* savetmap;
-       Parsimony* pars;
+       CountTable* ct; 
+       CountTable* savect;
        vector<string> groupComb; // AB. AC, BC...
-       string sumFile, randomtree, allGroups;
-       int iters, numGroups, numComp, counter;
+       string sumFile, randomtree, allGroups, outputDir, treefile, groupfile, namefile, countfile;
+       int iters, numGroups, numComp, counter, processors, numUniquesInName;
        vector<int> numEachGroup; //vector containing the number of sequences in each group the users wants for random distrib.
        vector< vector<float> > userTreeScores; //scores for users trees for each comb.
        vector< vector<float> > UScoreSig;  //tree score signifigance when compared to random trees - percentage of random trees with that score or lower.
@@ -52,15 +59,15 @@ private:
        vector< map<int, double> > uCumul;  //map <pscore, cumulative percentage of number of user trees with that score or lower .> -vector entry for each combination.
        
        ofstream outSum;
-       
-
        bool abort;
        string groups, itersString;
-       vector<string> Groups; //holds groups to be used
-
+       vector<string> Groups, outputNames; //holds groups to be used
+       map<string, string> nameMap;
+       
        void printParsimonyFile();  
-       void printUSummaryFile();
+       int printUSummaryFile();
        void getUserInput();
+       int readNamesFile();
        
 };