]> git.donarmstrong.com Git - mothur.git/blob - sequencedb.h
changed random forest output filename
[mothur.git] / sequencedb.h
1 #ifndef SEQUENCEDB_H
2 #define SEQUENCEDB_H
3
4 /*
5  *  sequencedb.h
6  *  Mothur
7  *
8  *  Created by Thomas Ryabin on 4/13/09.
9  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10  *
11  */
12
13
14 /* This class is a container to store the sequences. */
15
16
17 #include "sequence.hpp"
18 #include "calculator.h"
19
20
21 class SequenceDB {
22         
23 public:
24         SequenceDB();
25         SequenceDB(int);           //makes data that size
26         SequenceDB(ifstream&);     //reads file to fill data
27         SequenceDB(const SequenceDB& sdb) : data(sdb.data) {};
28         ~SequenceDB();             //loops through data and delete each sequence
29
30         int getNumSeqs();
31         
32         void set(int, string);     //unaligned - should also set length
33         void set(int, Sequence);   //unaligned - should also set length
34         Sequence get(int);         //returns sequence name at that location
35         void push_back(Sequence);        //adds unaligned sequence
36         void resize(int);      //resizes data
37         void clear();              //clears data - remeber to loop through and delete the sequences inside or you will have a memory leak
38         int size();                //returns datas size
39         void print(ostream&);      //loops through data using sequence class print
40         bool sameLength() { return samelength; }
41                 
42 private:
43         vector<Sequence> data;
44         string readName(ifstream&);
45         string readSequence(ifstream&);
46         MothurOut* m;
47         bool samelength;
48         int length;
49
50 };
51
52 #endif