1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
//
// constaxonomy.hpp
// Mothur
//
// Created by Sarah Westcott on 1/13/20.
// Copyright © 2020 Schloss Lab. All rights reserved.
//
#ifndef constaxonomy_hpp
#define constaxonomy_hpp
#include "mothurout.h"
#include "utils.hpp"
#include "writer.h"
/**************************************************************************************************/
class Taxonomy {
public:
Taxonomy();
Taxonomy(string, string, int); //name, tax, abund
Taxonomy(string, string);
Taxonomy(ifstream&);
~Taxonomy() = default;
void setName(string n) { name = n; }
void setNumSeqs(int n) { numReps = n; }
string getName() { return name; }
vector<Taxon> getTaxons() { return taxonomy; }
vector<string> getSimpleTaxons (bool includeConfidence=false);
void setTaxons(vector<Taxon> t) { taxonomy = t; }
int getNumSeqs() { return numReps; }
int getNumLevels() { return taxonomy.size(); }
void setTaxons(string);
string getInlineConsTaxonomy();
string getConsTaxString(bool includeConfidence=true); //pass in true to include confidences
void printConsTax(ostream&);
void printConsTax(OutputWriter*);
void printConsTaxNoConfidence(ostream&);
protected:
MothurOut* m;
string name;
int numReps;
bool containsConfidence;
vector<Taxon> taxonomy;
Utils util;
vector<Taxon> parseTax(string);
};
/**************************************************************************************************/
#endif /* constaxonomy_hpp */
|