tree[0].heirarchyID = "0";
maxLevel = 0;
calcTotals = true;
+ addSeqToTree("unknown", "unknown;");
}
catch(exception& e) {
m->errorOut(e, "PhyloTree", "PhyloTree");
maxLevel = 0;
calcTotals = true;
string name, tax;
-
#ifdef USE_MPI
int pid, num, processors;
#endif
assignHeirarchyIDs(0);
-
+
+
+ string unknownTax = "unknown;";
+ //added last taxon until you get desired level
+ for (int i = 1; i < maxLevel; i++) {
+ unknownTax += "unclassfied;";
+ }
+
+ addSeqToTree("unknown", unknownTax);
+
//create file for summary if needed
setUp(tfile);
}
int PhyloTree::addSeqToTree(string seqName, string seqTaxonomy){
try {
-
numSeqs++;
map<string, int>::iterator childPointer;
int level = 1;
tree[0].accessions.push_back(seqName);
+ m->removeConfidences(seqTaxonomy);
+
string taxon;// = getNextTaxon(seqTaxonomy);
while(seqTaxonomy != ""){
map<string, int>::iterator childPointer;
vector<TaxNode> copy = tree;
-
+
//fill out tree
fillOutTree(0, copy);
void PhyloTree::print(ofstream& out, vector<TaxNode>& copy){
try {
-
+
//output mothur version
out << "#" << m->getVersion() << endl;
out << copy.size() << endl;
out << maxLevel << endl;
-
+
for (int i = 0; i < copy.size(); i++) {
-
+
out << copy[i].level << '\t'<< copy[i].name << '\t' << copy[i].children.size() << '\t';
map<string,int>::iterator it;
try {
bool okay = true;
+ templateFileNames.push_back("unknown");
map<string, int>::iterator itFind;
map<string, int> taxonomyFileNames = name2Taxonomy;