]> git.donarmstrong.com Git - mothur.git/blob - splitabundcommand.h
removed read.dist, read.otu, read.tree and globaldata. added current to defaults...
[mothur.git] / splitabundcommand.h
1 #ifndef SPLITABUNDCOMMAND_H
2 #define SPLITABUNDCOMMAND_H
3
4 /*
5  *  splitabundcommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 5/17/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13
14 /* split.abund - given a list or name file and a number (cutoff), make two files - *rare* and *abund* 
15 - where rare has data for otus that have fewer sequences than the cutoff and abund has data for otus 
16 that have as many or more sequences as the cutoff. 
17 also allow an option where a user can give a group file with the list or names file and split the group file into rare and abund. */
18
19
20 #include "command.hpp"
21 #include "groupmap.h"
22 #include "inputdata.h"
23 #include "listvector.hpp"
24 #include "sequence.hpp"
25
26 /***************************************************************************************/
27
28 class SplitAbundCommand : public Command {
29         
30 public:
31         SplitAbundCommand(string);      
32         SplitAbundCommand();
33         ~SplitAbundCommand();
34         
35         vector<string> setParameters();
36         string getCommandName()                 { return "split.abund";                         }
37         string getCommandCategory()             { return "OTU-Based Approaches";        }
38         string getHelpString(); 
39         
40         int execute(); 
41         void help() { m->mothurOut(getHelpString()); }  
42         
43 private:
44         int splitList(ListVector*);
45         int splitNames(); //namefile
46         int writeNames(); 
47         int writeList(ListVector*, string); 
48         int writeAccnos(string); 
49         int parseGroup(string); 
50         int parseFasta(string); 
51         int readNamesFile(); //namefile
52         int createNameMap(ListVector*);
53         
54         vector<string> outputNames;
55         ListVector* list;
56         GroupMap* groupMap;
57         InputData* input;
58         
59         string outputDir, listfile, namefile, groupfile, label, groups, fastafile, inputFile;
60         set<string> labels, rareNames, abundNames;
61         vector<string> Groups;
62         bool abort, allLines, accnos;
63         int cutoff;
64         //map<string, bool> wroteListFile;
65         map<string, string> nameMap;
66         
67         
68
69 };
70
71 /***************************************************************************************/
72
73 #endif
74
75