]> git.donarmstrong.com Git - mothur.git/blob - parsimonycommand.h
removed read.dist, read.otu, read.tree and globaldata. added current to defaults...
[mothur.git] / parsimonycommand.h
1 #ifndef PARSIMONYCOMMAND_H
2 #define PARSIMONYCOMMAND_H
3 /*
4  *  parsimonycommand.h
5  *  Mothur
6  *
7  *  Created by Sarah Westcott on 1/26/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12 #include "command.hpp"
13 #include "parsimony.h"
14 #include "treemap.h"
15 #include "progress.hpp"
16 #include "sharedutilities.h"
17 #include "fileoutput.h"
18 #include "readtree.h"
19
20
21 class ParsimonyCommand : public Command {
22
23 public:
24         ParsimonyCommand(string);       
25         ParsimonyCommand();
26         ~ParsimonyCommand(){}
27         
28         vector<string> setParameters();
29         string getCommandName()                 { return "parsimony";                           }
30         string getCommandCategory()             { return "Hypothesis Testing";          }
31         string getHelpString(); 
32         
33         int execute();
34         void help() { m->mothurOut(getHelpString()); }
35         
36 private:
37         ReadTree* read;
38         SharedUtil* util;
39         FileOutput* output;
40         vector<Tree*> T;           //user trees
41         Tree* randT;  //random tree
42         Tree* copyUserTree; 
43         TreeMap* tmap; 
44         TreeMap* savetmap;
45         Parsimony* pars;
46         vector<string> groupComb; // AB. AC, BC...
47         string sumFile, randomtree, allGroups, outputDir, treefile, groupfile, namefile;
48         int iters, numGroups, numComp, counter, processors, numUniquesInName;
49         vector<int> numEachGroup; //vector containing the number of sequences in each group the users wants for random distrib.
50         vector< vector<float> > userTreeScores; //scores for users trees for each comb.
51         vector< vector<float> > UScoreSig;  //tree score signifigance when compared to random trees - percentage of random trees with that score or lower.
52         EstOutput userData;                     //pscore info for user tree
53         EstOutput randomData;           //pscore info for random trees
54         map<int, double>  validScores;  //map contains scores from both user and random
55         vector< map<int, double> > rscoreFreq;  //map <pscore, number of random trees with that score.> -vector entry for each combination.
56         vector< map<int, double> > uscoreFreq;  //map <pscore, number of user trees with that score.> -vector entry for each combination.
57         vector< map<int, double> > rCumul;  //map <pscore, cumulative percentage of number of random trees with that score or lower.> -vector entry for each combination.
58         vector< map<int, double> > uCumul;  //map <pscore, cumulative percentage of number of user trees with that score or lower .> -vector entry for each combination.
59         
60         ofstream outSum;
61         bool abort;
62         string groups, itersString;
63         vector<string> Groups, outputNames; //holds groups to be used
64         map<string, string> nameMap;
65         
66         void printParsimonyFile();  
67         int printUSummaryFile();
68         void getUserInput();
69         int readNamesFile();
70         
71 };
72
73
74 #endif