5 * Created by westcott on 11/3/09.
6 * Copyright 2009 Schloss Lab. All rights reserved.
10 #include "phylotype.h"
12 /**************************************************************************************************/
13 PhyloType::PhyloType(string tfile, string tempFile, string method, int kmerSize, int gapOpen, int gapExtend, int match, int misMatch)
14 : Classify(tfile, tempFile, method, kmerSize, gapOpen, gapExtend, match, misMatch) {}
15 /**************************************************************************************************/
16 string PhyloType::getTaxonomy(Sequence* seq) {
20 //use database to find closest seq
21 vector<int> closest = database->findClosestSequences(seq, 1);
23 //find that sequences taxonomy in map
24 it = taxonomy.find(names[closest[0]]);
26 //is this sequence in the taxonomy file
27 if (it == taxonomy.end()) { //error not in file
28 mothurOut("Error: sequence " + names[closest[0]] + " is not in the taxonomy file. It is the closest match to sequence " + seq->getName() + ". " + seq->getName() + " will be disregarded."); mothurOutEndLine();
37 errorOut(e, "PhyloType", "getTaxonomy");
41 /**************************************************************************************************/