Permalink
Browse files

Adds in redundant names to singletons when name file is used

  • Loading branch information...
1 parent f8e0883 commit 43b3eee968757d76cb51775209dcc95cc42eaf2e @mothur-westcott mothur-westcott committed Jan 31, 2017
Showing with 12 additions and 2 deletions.
  1. +12 −2 source/datastructures/optimatrix.cpp
@@ -216,7 +216,12 @@ int OptiMatrix::readPhylip(){
closeness.resize(nonSingletonCount);
map<string, string> names;
- if (namefile != "") { m->readNames(namefile, names); }
+ if (namefile != "") {
+ m->readNames(namefile, names);
+ for (int i = 0; i < singletons.size(); i++) {
+ singletons[i] = names[singletons[i]];
+ }
+ }
Progress* reading;
ifstream in;
@@ -392,7 +397,12 @@ int OptiMatrix::readColumn(){
closeness.resize(nonSingletonCount);
map<string, string> names;
- if (namefile != "") { m->readNames(namefile, names); }
+ if (namefile != "") {
+ m->readNames(namefile, names);
+ for (int i = 0; i < singletons.size(); i++) {
+ singletons[i] = names[singletons[i]];
+ }
+ }
while(in){ //let's assume it's a triangular matrix...

0 comments on commit 43b3eee

Please sign in to comment.