1 #ifndef SPLITABUNDCOMMAND_H
2 #define SPLITABUNDCOMMAND_H
8 * Created by westcott on 5/17/10.
9 * Copyright 2010 Schloss Lab. All rights reserved.
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. */
20 #include "command.hpp"
22 #include "inputdata.h"
23 #include "listvector.hpp"
24 #include "sequence.hpp"
26 /***************************************************************************************/
28 class SplitAbundCommand : public Command {
31 SplitAbundCommand(string);
35 vector<string> setParameters();
36 string getCommandName() { return "split.abund"; }
37 string getCommandCategory() { return "OTU-Based Approaches"; }
38 string getHelpString();
41 void help() { m->mothurOut(getHelpString()); }
44 int splitList(ListVector*);
45 int splitNames(); //namefile
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*);
54 vector<string> outputNames;
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;
64 //map<string, bool> wroteListFile;
65 map<string, string> nameMap;
71 /***************************************************************************************/