]> git.donarmstrong.com Git - mothur.git/blob - cooccurrencecommand.h
Merge remote-tracking branch 'origin/master'
[mothur.git] / cooccurrencecommand.h
1 #ifndef COOCCURRENCECOMMAND_H
2 #define COOCCURRENCECOMMAND_H
3
4 /*
5  *  COOCCURRENCE.h
6  *  Mothur
7  *
8  *  Created by westcott on 11/10/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13
14 #include "command.hpp"
15 #include "trialswap2.h"
16 #include "inputdata.h"
17 #include "sharedrabundvector.h"
18
19
20 class CooccurrenceCommand : public Command {
21         
22 public:
23         
24         CooccurrenceCommand(string);    
25         CooccurrenceCommand();
26         ~CooccurrenceCommand(){}
27         
28         vector<string> setParameters();
29         string getCommandName()                 { return "Cooccurrence";                        }
30         string getCommandCategory()             { return "Hypothesis Testing";  }
31         string getOutputFileNameTag(string, string);
32         string getHelpString(); 
33         string getCitation() { return "Ulrich W & Gotelli NJ (2010).  Null model analysis of species associations using abundance data.  Ecology  91:3384.\nhttp://www.mothur.org/wiki/Cooccurrence"; }
34         string getDescription()         { return "calculates four metrics and tests their significance to assess whether presence-absence patterns are different than what one would expect by chance."; }
35         
36         int execute(); 
37         void help() { m->mothurOut(getHelpString()); }  
38         
39         
40 private:
41     string metric, matrix, outputDir;
42     string label, sharedfile, groups;
43     bool abort, allLines;
44     set<string> labels;
45     vector<string> outputNames, Groups;
46     int runs;
47     
48     int getCooccurrence(vector<SharedRAbundVector*>&, ofstream&);
49         
50 };
51
52 #endif
53
54