Permalink
Browse files

Modifies picrust option to accept new unclassified format

Parent_unclassified

#241
  • Loading branch information...
1 parent b3c223f commit e41f1586a40745ead86b167082c9133624244568 @mothur-westcott mothur-westcott committed Jun 30, 2016
Showing with 8 additions and 2 deletions.
  1. +8 −2 source/commands/makebiomcommand.cpp
@@ -1026,8 +1026,14 @@ int MakeBiomCommand::getGreenGenesOTUIDs(vector<SharedRAbundVector*>& lookup, ma
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 e41f158

Please sign in to comment.