*
*/
-using namespace std;
-
#include "database.hpp"
#include "sequence.hpp"
BlastDB::BlastDB(string fastaFileName, float gO, float gE, float m, float mM) : Database(fastaFileName),
gapOpen(gO), gapExtend(gE), match(m), misMatch(mM) {
-
+
+ globaldata = GlobalData::getInstance();
+
cout << "Generating the temporary BLAST database...\t"; cout.flush();
int randNumber = rand();
}
unalignedFastaFile.close();
- string formatdbCommand = "~/Pipeline/src/cpp/production/blast/bin/formatdb -p F -o T -i " + dbFileName; // format the database, -o option gives us the ability
+ path = globaldata->argv;
+ path = path.substr(0, (path.find_last_of('m')));
+
+ string formatdbCommand = path + "blast/bin/formatdb -p F -o T -i " + dbFileName; // format the database, -o option gives us the ability
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();
// wordsize used in megablast. I'm sure we're sacrificing accuracy for speed, but anyother way would take way too
// long. With this setting, it seems comparable in speed to the suffix tree approach.
- string blastCommand = "~/Pipeline/src/cpp/production/blast/bin/blastall -p blastn -d " + dbFileName + " -b 1 -m 8 -W 28";
+ string blastCommand = path + "blast/bin/blastall -p blastn -d " + dbFileName + " -b 1 -m 8 -W 28";
blastCommand += (" -i " + queryFileName + " -o " + blastFileName);
system(blastCommand.c_str());