Permalink
Browse files

WIP make.biom reftaxonomy change

  • Loading branch information...
1 parent b598f39 commit b3c223ff193e6d1281c2fbc0c0ff5b8905c3ae2e @mothur-westcott mothur-westcott committed Jun 30, 2016
Showing with 8 additions and 2 deletions.
  1. +8 −2 source/commands/makebiomcommand.cpp
@@ -1192,8 +1192,14 @@ int MakeBiomCommand::getGreenGenesOTUIDs(vector<SharedRAbundFloatVector*>& looku
m->removeConfidences(OTUTaxonomy);
//remove unclassifieds to match template
- int thisPos = OTUTaxonomy.find("unclassified;");
- if (thisPos != string::npos) { OTUTaxonomy = OTUTaxonomy.substr(0, thisPos); }
+ int thisPos = OTUTaxonomy.find("unclassified;"); //"Porphyromonadaceae"_unclassified;
+ if (thisPos != string::npos) {
+ OTUTaxonomy = OTUTaxonomy.substr(0, thisPos);
+ thisPos = OTUTaxonomy.find_last_of(";"); //remove rest of parent taxon
+ if (thisPos != string::npos) {
+ OTUTaxonomy = OTUTaxonomy.substr(0, thisPos);
+ }
+ }
//get list of reference ids that map to this taxonomy
vector<string> referenceIds = phylo.getSeqs(OTUTaxonomy);

0 comments on commit b3c223f

Please sign in to comment.