1 #ifndef UNIFRACUNWEIGHTEDCOMMAND_H
2 #define UNIFRACUNWEIGHTEDCOMMAND_H
5 * unifracunweightedcommand.h
8 * Created by Sarah Westcott on 2/9/09.
9 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
13 #include "command.hpp"
14 #include "unweighted.h"
16 #include "sharedutilities.h"
17 #include "fileoutput.h"
20 class UnifracUnweightedCommand : public Command {
23 UnifracUnweightedCommand(string);
24 UnifracUnweightedCommand();
25 ~UnifracUnweightedCommand() {}
27 vector<string> setParameters();
28 string getCommandName() { return "unifrac.unweighted"; }
29 string getCommandCategory() { return "Hypothesis Testing"; }
30 string getHelpString();
31 string getCitation() { return "Lozupone C, Knight R (2005). UniFrac: a new phylogenetic method for comparing microbial communities. Appl Environ Microbiol 71: 8228-35. \nhttp://www.mothur.org/wiki/Unifrac.unweighted"; }
32 string getDescription() { return "generic tests that describes whether two or more communities have the same structure"; }
35 void help() { m->mothurOut(getHelpString()); }
40 vector<Tree*> T; //user trees
42 string sumFile, allGroups;
43 vector<string> groupComb; // AB. AC, BC...
44 int iters, numGroups, numComp, counter, processors, subsampleSize, subsampleIters;
45 vector< vector<float> > utreeScores; //scores for users trees for each comb.
46 vector< vector<float> > UWScoreSig; //tree score signifigance when compared to random trees - percentage of random trees with that score or higher.
47 map<float, float> validScores; //map contains scores from random
48 vector< map<float, float> > rscoreFreq; //map <unweighted score, number of random trees with that score.> -vector entry for each combination.
49 vector< map<float, float> > rCumul; //map <unweighted score, cumulative percentage of number of random trees with that score or higher.> -vector entry for each combination.
51 bool abort, phylip, random, includeRoot, consensus, subsample;
52 string groups, itersString, outputDir, outputForm, treefile, groupfile, namefile;
53 vector<string> Groups, outputNames; //holds groups to be used
58 int runRandomCalcs(Tree*, vector<double>);
59 void printUWSummaryFile(int);
60 void printUnweightedFile();
61 void createPhylipFile(int);
62 vector<Tree*> buildTrees(vector< vector<double> >&, int, TreeMap&);
63 int getConsensusTrees(vector< vector<double> >&, int);
64 int getAverageSTDMatrices(vector< vector<double> >&, int);