Permalink
Browse files
WIP make.biom reftaxonomy change
- Loading branch information...
Showing
with
8 additions
and
2 deletions.
-
+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