for(int i=0;i<numSeqs;i++){ // generating a fasta file with unaligned template
unalignedFastaFile << '>' << i << endl; // sequences, which will be input to formatdb
- unalignedFastaFile << templateSequences[i]->getUnaligned() << endl;
+ unalignedFastaFile << templateSequences[i].getUnaligned() << endl;
}
unalignedFastaFile.close();
system(formatdbCommand.c_str()); // to get the right sequence names, i think. -p F
// option tells formatdb that seqs are DNA, not prot
cout << "DONE." << endl << endl; cout.flush();
- emptySequence = new Sequence();
- emptySequence->setName("no_match");
- emptySequence->setUnaligned("XXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
- emptySequence->setAligned("XXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
+ emptySequence = Sequence();
+ emptySequence.setName("no_match");
+ emptySequence.setUnaligned("XXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
+ emptySequence.setAligned("XXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
}
/**************************************************************************************************/
BlastDB::~BlastDB(){
+ //for (int i = 0; i < templateSequences.size(); i++) { delete templateSequences[i]; }
+ //templateSequences.clear();
+ //delete emptySequence;
+
remove(queryFileName.c_str()); // let's clean stuff up and remove the temp files
remove(dbFileName.c_str()); // let's clean stuff up and remove the temp files
remove(blastFileName.c_str()); // let's clean stuff up and remove the temp files
/**************************************************************************************************/
-Sequence* BlastDB::findClosestSequence(Sequence* candidate){
+Sequence BlastDB::findClosestSequence(Sequence* candidate){
ofstream queryFile;
openOutputFile(queryFileName, queryFile);
searchScore = 0.00;
return emptySequence;
}
+ m8FileHandle.close();
}
/**************************************************************************************************/