#endif
}
else if(method == "suffix") { search = new SuffixDB(numSeqs); }
- else if(method == "blast") { search = new BlastDB(fastaFileName.substr(0,fastaFileName.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch); }
+ else if(method == "blast") { search = new BlastDB(fastaFileName.substr(0,fastaFileName.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, ""); }
else {
m->mothurOut(method + " is not a valid search option. I will run the command using kmer, ksize=8.");
m->mothurOutEndLine();
method = s;
if(method == "suffix") { search = new SuffixDB(); }
- else if(method == "blast") { search = new BlastDB(); }
+ else if(method == "blast") { search = new BlastDB(""); }
else { search = new KmerDB(); }
/**************************************************************************************************/
-BlastDB::BlastDB(string tag, float gO, float gE, float mm, float mM) : Database(),
+BlastDB::BlastDB(string tag, float gO, float gE, float mm, float mM, string b) : Database(),
gapOpen(gO), gapExtend(gE), match(mm), misMatch(mM) {
try {
count = 0;
+ path = b;
int randNumber = rand();
//int randNumber = 12345;
blastFileName = tag + pid + toString(randNumber) + ".blast";
//make sure blast exists in the write place
- 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)
+ path += "blast/bin/";
+#else
+ path += "blast\\bin\\";
+#endif
+ }
+
string formatdbCommand;
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- formatdbCommand = path + "blast/bin/formatdb"; // format the database, -o option gives us the ability
+ formatdbCommand = path + "formatdb"; // format the database, -o option gives us the ability
#else
- formatdbCommand = path + "blast\\bin\\formatdb.exe";
- //wrap entire string in ""
- //formatdbCommand = "\"" + formatdbCommand + "\"";
+ formatdbCommand = path + "formatdb.exe";
#endif
//test to make sure formatdb exists
ifstream in;
formatdbCommand = m->getFullPathName(formatdbCommand);
int ableToOpen = m->openInputFile(formatdbCommand, in, "no error"); in.close();
- if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + formatdbCommand + " file does not exist. mothur requires formatdb.exe to be in the ./blast/bin folder relative to the mothur.exe location."); m->mothurOutEndLine(); m->control_pressed = true; }
+ if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + formatdbCommand + " file does not exist. mothur requires formatdb.exe."); m->mothurOutEndLine(); m->control_pressed = true; }
string blastCommand;
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- blastCommand = path + "blast/bin/blastall"; // format the database, -o option gives us the ability
+ blastCommand = path + "blastall"; // format the database, -o option gives us the ability
#else
- blastCommand = path + "blast\\bin\\blastall.exe";
+ blastCommand = path + "blastall.exe";
//wrap entire string in ""
//blastCommand = "\"" + blastCommand + "\"";
#endif
ifstream in2;
blastCommand = m->getFullPathName(blastCommand);
ableToOpen = m->openInputFile(blastCommand, in2, "no error"); in2.close();
- if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + blastCommand + " file does not exist. mothur requires blastall.exe to be in the ./blast/bin folder relative to the mothur.exe location."); m->mothurOutEndLine(); m->control_pressed = true; }
+ if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + blastCommand + " file does not exist. mothur requires blastall.exe."); m->mothurOutEndLine(); m->control_pressed = true; }
string megablastCommand;
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- megablastCommand = path + "blast/bin/megablast"; // format the database, -o option gives us the ability
+ megablastCommand = path + "megablast"; // format the database, -o option gives us the ability
#else
- megablastCommand = path + "blast\\bin\\megablast.exe";
- //wrap entire string in ""
- //megablastCommand = "\"" + megablastCommand + "\"";
+ megablastCommand = path + "megablast.exe";
#endif
//test to make sure formatdb exists
ifstream in3;
megablastCommand = m->getFullPathName(megablastCommand);
ableToOpen = m->openInputFile(megablastCommand, in3, "no error"); in3.close();
- if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + megablastCommand + " file does not exist. mothur requires megablast.exe to be in the ./blast/bin folder relative to the mothur.exe location."); m->mothurOutEndLine(); m->control_pressed = true; }
+ if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + megablastCommand + " file does not exist. mothur requires megablast.exe."); m->mothurOutEndLine(); m->control_pressed = true; }
}
catch(exception& e) {
}
/**************************************************************************************************/
-BlastDB::BlastDB() : Database() {
+BlastDB::BlastDB(string b) : Database() {
try {
count = 0;
-
+
+ path = b;
+
+ //make sure blast exists in the write place
+ 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)
+ path += "blast/bin/";
+#else
+ path += "blast\\bin\\";
+#endif
+ }
+
int randNumber = rand();
string pid = "";
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
queryFileName = pid + toString(randNumber) + ".candidate.unaligned.fasta";
blastFileName = pid + toString(randNumber) + ".blast";
- //make sure blast exists in the write place
- 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')));
-
string formatdbCommand;
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- formatdbCommand = path + "blast/bin/formatdb"; // format the database, -o option gives us the ability
+ formatdbCommand = path + "formatdb"; // format the database, -o option gives us the ability
#else
- formatdbCommand = path + "blast\\bin\\formatdb.exe";
+ formatdbCommand = path + "formatdb.exe";
//wrap entire string in ""
//formatdbCommand = "\"" + formatdbCommand + "\"";
#endif
ifstream in;
formatdbCommand = m->getFullPathName(formatdbCommand);
int ableToOpen = m->openInputFile(formatdbCommand, in, "no error"); in.close();
- if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + formatdbCommand + " file does not exist. mothur requires formatdb.exe to be in the ./blast/bin folder relative to the mothur.exe location."); m->mothurOutEndLine(); m->control_pressed = true; }
+ if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + formatdbCommand + " file does not exist. mothur requires formatdb.exe."); m->mothurOutEndLine(); m->control_pressed = true; }
string blastCommand;
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- blastCommand = path + "blast/bin/blastall"; // format the database, -o option gives us the ability
+ blastCommand = path + "blastall"; // format the database, -o option gives us the ability
#else
- blastCommand = path + "blast\\bin\\blastall.exe";
+ blastCommand = path + "blastall.exe";
//wrap entire string in ""
//blastCommand = "\"" + blastCommand + "\"";
#endif
ifstream in2;
blastCommand = m->getFullPathName(blastCommand);
ableToOpen = m->openInputFile(blastCommand, in2, "no error"); in2.close();
- if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + blastCommand + " file does not exist. mothur requires blastall.exe to be in the ./blast/bin folder relative to the mothur.exe location."); m->mothurOutEndLine(); m->control_pressed = true; }
+ if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + blastCommand + " file does not exist. mothur requires blastall.exe."); m->mothurOutEndLine(); m->control_pressed = true; }
string megablastCommand;
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- megablastCommand = path + "blast/bin/megablast"; // format the database, -o option gives us the ability
+ megablastCommand = path + "megablast"; // format the database, -o option gives us the ability
#else
- megablastCommand = path + "blast\\bin\\megablast.exe";
+ megablastCommand = path + "megablast.exe";
//wrap entire string in ""
//megablastCommand = "\"" + megablastCommand + "\"";
#endif
ifstream in3;
megablastCommand = m->getFullPathName(megablastCommand);
ableToOpen = m->openInputFile(megablastCommand, in3, "no error"); in3.close();
- if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + megablastCommand + " file does not exist. mothur requires megablast.exe to be in the ./blast/bin folder relative to the mothur.exe location."); m->mothurOutEndLine(); m->control_pressed = true; }
+ if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + megablastCommand + " file does not exist. mothur requires megablast.exe."); m->mothurOutEndLine(); m->control_pressed = true; }
}
string blastCommand;
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- blastCommand = path + "blast/bin/blastall -p blastn -d " + dbFileName + " -m 8 -W 28 -v " + toString(n) + " -b " + toString(n);
+ blastCommand = path + "blastall -p blastn -d " + dbFileName + " -m 8 -W 28 -v " + toString(n) + " -b " + toString(n);
blastCommand += (" -i " + (queryFileName+pid+toString(randNumber)) + " -o " + blastFileName+pid+toString(randNumber));
#else
- blastCommand = "\"" + path + "blast\\bin\\blastall\" -p blastn -d " + "\"" + dbFileName + "\"" + " -m 8 -W 28 -v " + toString(n) + " -b " + toString(n);
+ blastCommand = "\"" + path + "blastall\" -p blastn -d " + "\"" + dbFileName + "\"" + " -m 8 -W 28 -v " + toString(n) + " -b " + toString(n);
blastCommand += (" -i " + (queryFileName+pid+toString(randNumber)) + " -o " + blastFileName+pid+toString(randNumber));
//wrap entire string in ""
blastCommand = "\"" + blastCommand + "\"";
//7000004128189528left 0 100 66 0 0 1 66 61 126 1e-31 131
string blastCommand;
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- blastCommand = path + "blast/bin/megablast -e 1e-10 -d " + dbFileName + " -m 8 -b " + toString(n) + " -v " + toString(n); //-W 28 -p blastn
+ blastCommand = path + "megablast -e 1e-10 -d " + dbFileName + " -m 8 -b " + toString(n) + " -v " + toString(n); //-W 28 -p blastn
blastCommand += (" -i " + (queryFileName+pid+toString(randNumber)) + " -o " + blastFileName+pid+toString(randNumber));
#else
//blastCommand = path + "blast\\bin\\megablast -e 1e-10 -d " + dbFileName + " -m 8 -b " + toString(n) + " -v " + toString(n); //-W 28 -p blastn
//blastCommand += (" -i " + (queryFileName+toString(randNumber)) + " -o " + blastFileName+toString(randNumber));
- blastCommand = "\"" + path + "blast\\bin\\megablast\" -e 1e-10 -d " + "\"" + dbFileName + "\"" + " -m 8 -b " + toString(n) + " -v " + toString(n); //-W 28 -p blastn
+ blastCommand = "\"" + path + "megablast\" -e 1e-10 -d " + "\"" + dbFileName + "\"" + " -m 8 -b " + toString(n) + " -v " + toString(n); //-W 28 -p blastn
blastCommand += (" -i " + (queryFileName+pid+toString(randNumber)) + " -o " + blastFileName+pid+toString(randNumber));
//wrap entire string in ""
blastCommand = "\"" + blastCommand + "\"";
try {
//m->mothurOut("Generating the temporary BLAST database...\t"); cout.flush();
-
- 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')));
-
+
string formatdbCommand;
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- formatdbCommand = path + "blast/bin/formatdb -p F -o T -i " + dbFileName; // format the database, -o option gives us the ability
+ formatdbCommand = path + "formatdb -p F -o T -i " + dbFileName; // format the database, -o option gives us the ability
#else
//formatdbCommand = path + "blast\\bin\\formatdb -p F -o T -i " + dbFileName; // format the database, -o option gives us the ability
- formatdbCommand = "\"" + path + "blast\\bin\\formatdb\" -p F -o T -i " + "\"" + dbFileName + "\"";
+ formatdbCommand = "\"" + path + "formatdb\" -p F -o T -i " + "\"" + dbFileName + "\"";
//wrap entire string in ""
formatdbCommand = "\"" + formatdbCommand + "\"";
#endif
class BlastDB : public Database {
public:
- BlastDB(string, float, float, float, float);
- BlastDB();
+ BlastDB(string, float, float, float, float, string);
+ BlastDB(string);
~BlastDB();
void generateDB();
//***************************************************************************************************************
ChimeraSlayer::ChimeraSlayer(string file, string temp, bool trim, string mode, int k, int ms, int mms, int win, float div,
-int minsim, int mincov, int minbs, int minsnp, int par, int it, int inc, int numw, bool r) : Chimera() {
+int minsim, int mincov, int minbs, int minsnp, int par, int it, int inc, int numw, bool r, string blas) : Chimera() {
try {
fastafile = file;
templateFileName = temp; templateSeqs = readSeqs(temp);
realign = r;
trimChimera = trim;
numNoParents = 0;
+ blastlocation = blas;
doPrep();
}
//***************************************************************************************************************
//template=self
ChimeraSlayer::ChimeraSlayer(string file, string temp, bool trim, map<string, int>& prior, string mode, int k, int ms, int mms, int win, float div,
- int minsim, int mincov, int minbs, int minsnp, int par, int it, int inc, int numw, bool r) : Chimera() {
+ int minsim, int mincov, int minbs, int minsnp, int par, int it, int inc, int numw, bool r, string blas) : Chimera() {
try {
fastafile = file; templateSeqs = readSeqs(fastafile);
templateFileName = temp;
trimChimera = trim;
priority = prior;
numNoParents = 0;
+ blastlocation = blas;
createFilter(templateSeqs, 0.0); //just removed columns where all seqs have a gap
}else if (searchMethod == "blast") {
//generate blastdb
- databaseLeft = new BlastDB(m->getRootName(m->getSimpleName(fastafile)), -1.0, -1.0, 1, -3);
+ databaseLeft = new BlastDB(m->getRootName(m->getSimpleName(fastafile)), -1.0, -1.0, 1, -3, blastlocation);
if (m->control_pressed) { return 0; }
}else if (searchMethod == "blast") {
//generate blastdb
- databaseLeft = new BlastDB(m->getRootName(m->getSimpleName(templateFileName)), -1.0, -1.0, 1, -3);
+ databaseLeft = new BlastDB(m->getRootName(m->getSimpleName(templateFileName)), -1.0, -1.0, 1, -3, blastlocation);
if (m->control_pressed) { return userTemplate; }
class ChimeraSlayer : public Chimera {
public:
- ChimeraSlayer(string, string, bool, string, int, int, int, int, float, int, int, int, int, int, int, int, int, bool);
- ChimeraSlayer(string, string, bool, map<string, int>&, string, int, int, int, int, float, int, int, int, int, int, int, int, int, bool);
+ ChimeraSlayer(string, string, bool, string, int, int, int, int, float, int, int, int, int, int, int, int, int, bool, string);
+ ChimeraSlayer(string, string, bool, map<string, int>&, string, int, int, int, int, float, int, int, int, int, int, int, int, int, bool, string);
~ChimeraSlayer();
vector<data_struct> chimeraResults;
data_results printResults;
- string chimeraFlags, searchMethod, fastafile;
+ string chimeraFlags, searchMethod, fastafile, blastlocation;
bool realign, trimChimera;
int window, numWanted, kmerSize, match, misMatch, minSim, minCov, minBS, minSNP, parents, iters, increment;
float divR;
CommandParameter pdivergence("divergence", "Number", "", "1.007", "", "", "",false,false); parameters.push_back(pdivergence);
CommandParameter pparents("parents", "Number", "", "3", "", "", "",false,false); parameters.push_back(pparents);
CommandParameter pincrement("increment", "Number", "", "5", "", "", "",false,false); parameters.push_back(pincrement);
+ CommandParameter pblastlocation("blastlocation", "String", "", "", "", "", "",false,false); parameters.push_back(pblastlocation);
CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir);
CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir);
CommandParameter psave("save", "Boolean", "", "F", "", "", "",false,false); parameters.push_back(psave);
string helpString = "";
helpString += "The chimera.slayer command reads a fastafile and referencefile and outputs potentially chimeric sequences.\n";
helpString += "This command was modeled after the chimeraSlayer written by the Broad Institute.\n";
- helpString += "The chimera.slayer command parameters are fasta, name, template, processors, trim, ksize, window, match, mismatch, divergence. minsim, mincov, minbs, minsnp, parents, search, iters, increment, numwanted, and realign.\n";
+ helpString += "The chimera.slayer command parameters are fasta, name, template, processors, trim, ksize, window, match, mismatch, divergence. minsim, mincov, minbs, minsnp, parents, search, iters, increment, numwanted, blastlocation and realign.\n";
helpString += "The fasta parameter allows you to enter the fasta file containing your potentially chimeric sequences, and is required, unless you have a valid current fasta file. \n";
helpString += "The name parameter allows you to provide a name file, if you are using reference=self. \n";
helpString += "You may enter multiple fasta files by separating their names with dashes. ie. fasta=abrecovery.fasta-amazon.fasta \n";
helpString += "The minsnp parameter allows you to specify percent of SNPs to sample on each side of breakpoint for computing bootstrap support (default: 10) \n";
helpString += "The search parameter allows you to specify search method for finding the closest parent. Choices are blast, and kmer, default blast. \n";
helpString += "The realign parameter allows you to realign the query to the potential parents. Choices are true or false, default true. \n";
+ helpString += "The blastlocation parameter allows you to specify the location of your blast executable. By default mothur will look in ./blast/bin relative to mothur's executable. \n";
helpString += "If the save parameter is set to true the reference sequences will be saved in memory, to clear them later you can use the clear.memory command. Default=f.";
helpString += "The chimera.slayer command should be in the following format: \n";
helpString += "chimera.slayer(fasta=yourFastaFile, reference=yourTemplate, search=yourSearch) \n";
temp = validParameter.validFile(parameters, "numwanted", false); if (temp == "not found") { temp = "15"; }
convert(temp, numwanted);
+
+ blastlocation = validParameter.validFile(parameters, "blastlocation", false);
+ if (blastlocation == "not found") { blastlocation = ""; }
+ else {
+ //add / to name if needed
+ string lastChar = blastlocation.substr(blastlocation.length()-1);
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+ if (lastChar != "/") { blastlocation += "/"; }
+#else
+ if (lastChar != "\\") { blastlocation += "\\"; }
+#endif
+ blastlocation = m->getFullPathName(blastlocation);
+ string formatdbCommand = "";
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+ formatdbCommand = blastlocation + "formatdb";
+#else
+ formatdbCommand = blastlocation + "formatdb.exe";
+#endif
+
+ //test to make sure formatdb exists
+ ifstream in;
+ formatdbCommand = m->getFullPathName(formatdbCommand);
+ int ableToOpen = m->openInputFile(formatdbCommand, in, "no error"); in.close();
+ if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + formatdbCommand + " file does not exist. mothur requires formatdb.exe to run chimera.slayer."); m->mothurOutEndLine(); abort = true; }
+
+ string blastCommand = "";
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+ blastCommand = blastlocation + "megablast";
+#else
+ blastCommand = blastlocation + "megablast.exe";
+#endif
+ //test to make sure formatdb exists
+ ifstream in2;
+ blastCommand = m->getFullPathName(blastCommand);
+ ableToOpen = m->openInputFile(blastCommand, in2, "no error"); in2.close();
+ if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + blastCommand + " file does not exist. mothur requires blastall.exe to run chimera.slayer."); m->mothurOutEndLine(); abort = true; }
+ }
if ((search != "blast") && (search != "kmer")) { m->mothurOut(search + " is not a valid search."); m->mothurOutEndLine(); abort = true; }
int start = time(NULL);
if (templatefile != "self") { //you want to run slayer with a refernce template
- chimera = new ChimeraSlayer(fastaFileNames[s], templatefile, trim, search, ksize, match, mismatch, window, divR, minSimilarity, minCoverage, minBS, minSNP, parents, iters, increment, numwanted, realign);
+ chimera = new ChimeraSlayer(fastaFileNames[s], templatefile, trim, search, ksize, match, mismatch, window, divR, minSimilarity, minCoverage, minBS, minSNP, parents, iters, increment, numwanted, realign, blastlocation);
}else {
if (processors != 1) { m->mothurOut("When using template=self, mothur can only use 1 processor, continuing."); m->mothurOutEndLine(); processors = 1; }
string nameFile = "";
if (m->control_pressed) { for (int j = 0; j < outputNames.size(); j++) { m->mothurRemove(outputNames[j]); } return 0; }
- chimera = new ChimeraSlayer(fastaFileNames[s], templatefile, trim, priority, search, ksize, match, mismatch, window, divR, minSimilarity, minCoverage, minBS, minSNP, parents, iters, increment, numwanted, realign);
+ chimera = new ChimeraSlayer(fastaFileNames[s], templatefile, trim, priority, search, ksize, match, mismatch, window, divR, minSimilarity, minCoverage, minBS, minSNP, parents, iters, increment, numwanted, realign, blastlocation);
}
if (outputDir == "") { outputDir = m->hasPath(fastaFileNames[s]); }//if user entered a file with a path then preserve it
#endif
bool abort, realign, trim, trimera, save;
- string fastafile, templatefile, outputDir, search, namefile;
+ string fastafile, templatefile, outputDir, search, namefile, blastlocation;
int processors, window, iters, increment, numwanted, ksize, match, mismatch, parents, minSimilarity, minCoverage, minBS, minSNP, numSeqs, templateSeqsLength;
float divR;
Chimera* chimera;
}
}
else if(method == "suffix") { database = new SuffixDB(numSeqs); }
- else if(method == "blast") { database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch); }
+ else if(method == "blast") { database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, ""); }
else if(method == "distance") { database = new DistanceDB(); }
else {
m->mothurOut(method + " is not a valid search option. I will run the command using kmer, ksize=8.");
}
}
else if(method == "suffix") { database = new SuffixDB(numSeqs); }
- else if(method == "blast") { database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch); }
+ else if(method == "blast") { database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, ""); }
else if(method == "distance") { database = new DistanceDB(); }
else {
m->mothurOut(method + " is not a valid search option. I will run the command using kmer, ksize=8.");
//is there are current file available for either of these?
//give priority to phylip, then fasta
phylipfile = m->getPhylipFile();
- if (phylipfile != "") { m->mothurOut("Using " + phylipfile + " as input file for the phylip parameter."); m->mothurOutEndLine(); }
+ if (phylipfile != "") { inputFile = phylipfile; m->mothurOut("Using " + phylipfile + " as input file for the phylip parameter."); m->mothurOutEndLine(); }
else {
fastafile = m->getFastaFile();
- if (fastafile != "") { m->mothurOut("Using " + fastafile + " as input file for the fasta parameter."); m->mothurOutEndLine(); }
+ if (fastafile != "") { inputFile = fastafile; m->mothurOut("Using " + fastafile + " as input file for the fasta parameter."); m->mothurOutEndLine(); }
else {
m->mothurOut("No valid current files. You must provide a phylip or fasta file before you can use the clearcut command."); m->mothurOutEndLine();
abort = true;