- path = m->argv;
- string tempPath = path;
- for (int i = 0; i < path.length(); i++) { tempPath[i] = tolower(path[i]); }
- path = path.substr(0, (tempPath.find_last_of('m')));
+ if (path == "") {
+ path = m->argv;
+ string tempPath = path;
+ for (int i = 0; i < path.length(); i++) { tempPath[i] = tolower(path[i]); }
+ path = path.substr(0, (tempPath.find_last_of('m')));
+
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
+ path += "blast/bin/";
+#else
+ path += "blast\\bin\\";
+#endif
+ }
+
+ int randNumber = rand();
+ string pid = "";
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
+ pid += getpid();
+#else
+ pid += toString(threadID);
+#endif
+
+ dbFileName = pid + toString(randNumber) + ".template.unaligned.fasta";
+ queryFileName = pid + toString(randNumber) + ".candidate.unaligned.fasta";
+ blastFileName = pid + toString(randNumber) + ".blast";