Skip to content

Commit

Permalink
Removes blast as a search option from classify.seqs
Browse files Browse the repository at this point in the history
  • Loading branch information
mothur-westcott committed Dec 1, 2021
1 parent 005caf5 commit b640cec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 0 additions & 2 deletions source/classifier/classify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "sequence.hpp"
#include "kmerdb.hpp"
#include "suffixdb.hpp"
#include "blastdb.hpp"
#include "distancedb.hpp"
#include "optidb.hpp"

Expand Down Expand Up @@ -54,7 +53,6 @@ void Classify::generateDatabaseAndNames(string tfile, string tempFile, string me
}
}
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, "", threadID); }
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.\n");
Expand Down
13 changes: 2 additions & 11 deletions source/commands/classifyseqscommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ vector<string> ClassifySeqsCommand::setParameters(){
CommandParameter pcount("count", "InputTypes", "", "", "NameCount-CountGroup", "none", "none","",false,false,true); parameters.push_back(pcount);
CommandParameter pgroup("group", "InputTypes", "", "", "CountGroup", "none", "none","",false,false,true); parameters.push_back(pgroup);
CommandParameter poutput("output", "Multiple", "simple-detail", "detail", "", "", "","",false,false, true); parameters.push_back(poutput);
CommandParameter psearch("search", "Multiple", "kmer-blast-suffix-distance-align", "kmer", "", "", "","",false,false); parameters.push_back(psearch);
CommandParameter psearch("search", "Multiple", "kmer-suffix-distance-align", "kmer", "", "", "","",false,false); parameters.push_back(psearch);
CommandParameter pksize("ksize", "Number", "", "8", "", "", "","",false,false); parameters.push_back(pksize);
CommandParameter pmethod("method", "Multiple", "wang-knn-zap", "wang", "", "", "","",false,false); parameters.push_back(pmethod);
CommandParameter pprocessors("processors", "Number", "", "1", "", "", "","",false,false,true); parameters.push_back(pprocessors);
Expand Down Expand Up @@ -63,7 +63,7 @@ string ClassifySeqsCommand::getHelpString(){
string helpString = "";
helpString += "The classify.seqs command reads a fasta file containing sequences and creates a .taxonomy file and a .tax.summary file.\n";
helpString += "The classify.seqs command parameters are " + getCommandParameters() + ". The reference, fasta and taxonomy parameters are required.\n";
helpString += "The search parameter allows you to specify the method to find most similar reference sequence. Your options are: suffix, kmer, blast, align and distance. The default is kmer.\n";
helpString += "The search parameter allows you to specify the method to find most similar reference sequence. Your options are: suffix, kmer, align and distance. The default is kmer.\n";
helpString += "The name parameter allows you add a names file with your fasta file.\n";
helpString += "The group parameter allows you add a group file so you can have the summary totals broken up by group.\n";
helpString += "The count parameter allows you add a count file so you can have the summary totals broken up by group.\n";
Expand Down Expand Up @@ -265,15 +265,6 @@ ClassifySeqsCommand::ClassifySeqsCommand(string option) : Command() {
m->mothurOut("The zap method requires the kmer or align search. " + search + " will be disregarded, and kmer will be used.\n" );
search = "kmer";
}

if (search == "blast") {
string blastlocation = "";
bool foundTool = util.findBlastLocation(blastlocation, current->getLocations());

if (!foundTool){
m->mothurOut("[WARNING]: Unable to locate blast executables, cannot use blast as search method. Using kmer instead.\n"); search = "kmer";
}
}
}
}
catch(exception& e) {
Expand Down

0 comments on commit b640cec

Please sign in to comment.