5 * Created by Thomas Ryabin on 4/21/09.
6 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10 #include "readfasta.h"
14 /*******************************************************************************/
15 ReadFasta::ReadFasta(string file) : ReadSeqs(file) {
19 cout << "Standard Error: " << e.what() << " has occurred in the ReadTree class Function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
23 cout << "An unknown error has occurred in the ReadTree class function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
27 /*******************************************************************************/
28 ReadFasta::~ReadFasta(){
29 //for(int i = 0; i < sequencedb.getNumSeqs(); i++)
30 //delete sequencedb.get(i);
32 /*******************************************************************************/
33 void ReadFasta::read() {
39 while(!filehandle.eof()){
42 if(temp.substr(0,1).compare(">") == 0) {
44 Sequence newSequence(name, sequence);
45 sequencedb.add(newSequence);
50 name = temp.substr(1,temp.length()-1);
63 Sequence newSequence(name, sequence);
64 sequencedb.add(newSequence);
69 /*********************************************************************************/
70 SequenceDB* ReadFasta::getDB() {