*
*/
-using namespace std;
-
-
+#include "mothur.h"
#include "sequence.hpp"
#include "database.hpp"
/**************************************************************************************************/
-Database::Database(string fastaFileName){ // This assumes that the template database is in fasta format, may
- // need to alter this in the future?
-
- ifstream fastaFile;
- openInputFile(fastaFileName, fastaFile);
-
- cout << endl << "Reading in the " << fastaFileName << " template sequences...\t"; cout.flush();
-
- //all of this is elsewhere already!
- numSeqs=count(istreambuf_iterator<char>(fastaFile),istreambuf_iterator<char>(), '>'); // count the number of
- fastaFile.seekg(0); // sequences
-
- templateSequences.resize(numSeqs);
-
- string seqName, sequence;
- for(int i=0;i<numSeqs;i++){
- fastaFile >> seqName;
- seqName = seqName.substr(1);
- char letter;
- string aligned;
-
- while(fastaFile && (letter=fastaFile.get()) != '>'){
- if(isprint(letter)){
- letter = toupper(letter);
- if(letter == 'U'){letter = 'T';}
- aligned += letter;
- }
- }
- templateSequences[i] = new Sequence(seqName, aligned);
- fastaFile.putback(letter);
- }
-
- fastaFile.close();
- //all of this is elsewhere already!
-
- cout << "DONE." << endl; cout.flush();
-
+Database::Database(){
+ longest = 0;
+ numSeqs = 0;
+ m = MothurOut::getInstance();
}
+/**************************************************************************************************/
+
+Database::~Database(){}
/**************************************************************************************************/
float Database::getSearchScore() { return searchScore; } // we're assuming that the search is already done
+
+/**************************************************************************************************/
+
+int Database::getLongestBase() { return longest+1; }
+
/**************************************************************************************************/