]> git.donarmstrong.com Git - mothur.git/blob - splitabundcommand.h
added command descriptions
[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         string getCitation() { return "http://www.mothur.org/wiki/Split.abund"; }
40         string getDescription()         { return "split a list, name, group or fasta file based on abundance"; }
41         
42         int execute(); 
43         void help() { m->mothurOut(getHelpString()); }  
44         
45 private:
46         int splitList(ListVector*);
47         int splitNames(); //namefile
48         int writeNames(); 
49         int writeList(ListVector*, string); 
50         int writeAccnos(string); 
51         int parseGroup(string); 
52         int parseFasta(string); 
53         int readNamesFile(); //namefile
54         int createNameMap(ListVector*);
55         
56         vector<string> outputNames;
57         ListVector* list;
58         GroupMap* groupMap;
59         InputData* input;
60         
61         string outputDir, listfile, namefile, groupfile, label, groups, fastafile, inputFile;
62         set<string> labels, rareNames, abundNames;
63         vector<string> Groups;
64         bool abort, allLines, accnos;
65         int cutoff;
66         //map<string, bool> wroteListFile;
67         map<string, string> nameMap;
68         
69         
70
71 };
72
73 /***************************************************************************************/
74
75 #endif
76
77