Permalink
Browse files
Modifies picrust option to accept new unclassified format
- Loading branch information...
Showing
with
8 additions
and
2 deletions.
-
+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