else if (method == "pintail") { chimera = new Pintail(fastafile, templatefile); }
else if (method == "ccode") { chimera = new Ccode(fastafile, templatefile); }
else if (method == "chimeracheck") { chimera = new ChimeraCheckRDP(fastafile, templatefile); }
- //else if (method == "chimeraslayer") { chimera = new ChimeraSlayer(fastafile, templatefile); }
+ else if (method == "chimeraslayer") { chimera = new ChimeraSlayer(fastafile, templatefile); }
else { mothurOut("Not a valid method."); mothurOutEndLine(); return 0; }
//set user options
for (int i = 0; i < querySeqs.size(); i++) {
if (chimeraFlags[i] == "yes") {
+ cout << i << endl;
if ((chimeraResults[i][0].bsa >= 90.0) || (chimeraResults[i][0].bsb >= 90.0)) {
mothurOut(querySeqs[i]->getName() + "\tyes"); mothurOutEndLine();
out << querySeqs[i]->getName() << "\tyes" << endl;
}else {
- out << querySeqs[i]->getName() << "\tno" << endl;
+ out << querySeqs[i]->getName() << "\tyes" << endl;
//mothurOut(querySeqs[i]->getName() + "\tno"); mothurOutEndLine();
}
try {
if (abort == true) { return 0; }
- if(method == "bayesian") { classify = new Bayesian(taxonomyFileName, templateFileName, search, kmerSize, cutoff, iters); }
- else if(method == "knn") { classify = new Knn(taxonomyFileName, templateFileName, search, kmerSize, gapOpen, gapExtend, match, misMatch, numWanted); }
+ if(method == "bayesian"){ classify = new Bayesian(taxonomyFileName, templateFileName, search, kmerSize, cutoff, iters); }
+ else if(method == "knn"){ classify = new Knn(taxonomyFileName, templateFileName, search, kmerSize, gapOpen, gapExtend, match, misMatch, numWanted); }
else {
mothurOut(search + " is not a valid method option. I will run the command using bayesian.");
mothurOutEndLine();
//keep what you have counting the levels
while (tax.find_first_of(';') != -1) {
//get taxon
- taxon = tax.substr(0,tax.find_first_of(';'));
+ taxon = tax.substr(0,tax.find_first_of(';'))+';';
tax = tax.substr(tax.find_first_of(';')+1, tax.length());
newTax += taxon;
level++;
if (candidateSeq->getName() != "") {
taxonomy = classify->getTaxonomy(candidateSeq);
-
+
if (taxonomy != "bad seq") {
//output confidence scores or not
if (probs) {
outTax << candidateSeq->getName() << '\t' << taxonomy << endl;
}else{
outTax << candidateSeq->getName() << '\t' << classify->getSimpleTax() << endl;
+ cout << classify->getSimpleTax() << endl;
}
outTaxSimple << candidateSeq->getName() << '\t' << classify->getSimpleTax() << endl;
try {
//remove old logfile
- string log = "mothur.logFile";
- remove(log.c_str());
+// string log = "mothur.logFile";
+// remove(log.c_str());
time_t ltime = time(NULL); /* calendar time */
- string logFileName = "mothur." + toString(asctime( localtime(<ime) )) + ".logfile";
+ string logFileName = "mothur." + toString(ltime) + ".logfile";
//version
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
delete mothur;
- rename(log.c_str(), logFileName.c_str()); //logfile with timestamp
+// rename(log.c_str(), logFileName.c_str()); //logfile with timestamp
return 0;
}
//sort seqs by number of identical seqs
sort(alignSeqs.begin(), alignSeqs.end(), comparePriority);
- //go through active list and cluster everthing you can, until all nodes are inactive
- //taking advantage of the fact that maps are already sorted
-// map<string, bool>::iterator itActive;
-// map<string, bool>::iterator it2Active;
int count = 0;
-
+
+ //think about running through twice...
for (int i = 0; i < numSeqs; i++) {
//are you active
forPrimer.push_back(oligo);
}
else if(type == "reverse"){
- revPrimer.push_back(oligo);
+ Sequence oligoRC("reverse", oligo);
+ oligoRC.reverseComplement();
+ revPrimer.push_back(oligoRC.getUnaligned());
}
else if(type == "barcode"){
inOligos >> group;
}
if(compareDNASeq(oligo, rawSequence.substr(rawSequence.length()-oligo.length(),oligo.length()))){
- seq.setUnaligned(rawSequence.substr(rawSequence.length()-oligo.length()));
+ seq.setUnaligned(rawSequence.substr(0,rawSequence.length()-oligo.length()));
success = 1;
break;
}