5 * Created by Thomas Ryabin on 4/24/09.
6 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10 #include "readclustal.h"
14 /*******************************************************************************/
15 ReadClustal::ReadClustal(string file) {
17 openInputFile(file, filehandle);
19 globaldata = GlobalData::getInstance();
22 cout << "Standard Error: " << e.what() << " has occurred in the ReadTree class Function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
26 cout << "An unknown error has occurred in the ReadTree class function ReadTree. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
30 /*******************************************************************************/
31 ReadClustal::~ReadClustal(){
32 // for(int i = 0; i < sequencedb.getNumSeqs(); i++)
33 // delete sequencedb.get(i);
35 /*******************************************************************************/
36 void ReadClustal::read() {
40 string firstName = "";
41 for(int i = 0; i < 6; i++)
46 bool firstDone = false;
48 while(!filehandle.eof()) {
54 else if(!firstDone && firstName.compare("") == 0)
56 else if(!firstDone && firstName.compare(name) == 0) {
62 if(name.find_first_of("*") == -1) {
63 filehandle >> sequence;
65 Sequence newSeq(name, sequence);
66 sequencedb.add(newSeq);
69 sequencedb.set(count, sequencedb.get(count).getAligned() + sequence);
77 /*********************************************************************************/
78 SequenceDB* ReadClustal::getDB() {