]> git.donarmstrong.com Git - mothur.git/blob - sequencedb.h
fixed some bugs
[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();             //loops through data and delete each sequence
28
29         int getNumSeqs();
30         
31         void set(int, string);     //unaligned - should also set length
32         void set(int, Sequence);   //unaligned - should also set length
33         Sequence get(int);         //returns sequence name at that location
34         void add(Sequence);        //adds unaligned sequence
35         void changeSize(int);      //resizes data
36         void clear();              //clears data - remeber to loop through and delete the sequences inside or you will have a memory leak
37         int size();                //returns datas size
38         void print(ostream&);      //loops through data using sequence class print
39                 
40 private:
41         vector<Sequence> data;
42
43 };
44
45 #endif