1 #ifndef GETOTUREPCOMMAND_H
2 #define GETOTUREPCOMMAND_H
7 * Created by Sarah Westcott on 4/6/09.
8 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
12 /* The get.oturep command outputs a .fastarep file for each distance you specify, selecting one OTU representative for each bin. */
14 #include "command.hpp"
15 #include "globaldata.hpp"
16 #include "sparsematrix.hpp"
17 #include "listvector.hpp"
18 #include "inputdata.h"
25 typedef list<PCell>::iterator MatData;
27 class GetOTURepCommand : public Command {
35 GlobalData* globaldata;
38 ListVector* listOfNames;
43 string filename, fastafile, namesfile, groupfile;
49 map<string, int> nameToIndex; //maps sequence name to index in sparsematrix
50 map<int, string>::iterator it;
51 map<int, string>::iterator it2;
52 map<string, int>::iterator it3;
55 int process(ListVector*);
56 string FindRep(int, string&, ListVector*); // returns name of "representative" sequence of given bin. //and fill a string containing the groups in that bin if a groupfile is given