1 //
2 //  biominfocommand.h
3 //  Mothur
4 //
5 //  Created by Sarah Westcott on 8/5/15.
6 //  Copyright (c) 2015 Schloss Lab. All rights reserved.
7 //
8 
9 #ifndef __Mothur__biominfocommand__
10 #define __Mothur__biominfocommand__
11 
12 #include "command.hpp"
13 #include "inputdata.h"
14 #include "phylosummary.h"
15 #include "biomsimple.hpp"
16 #include "biomhdf5.hpp"
17 
18 #define MAX_NAME 1024
19 
20 class BiomInfoCommand : public Command {
21 
22 #ifdef UNIT_TEST
23     friend class TestBiomInfoCommand;
24 #endif
25 
26 public:
27     BiomInfoCommand(string);
~BiomInfoCommand()28     ~BiomInfoCommand() {}
29 
30     vector<string> setParameters();
getCommandName()31     string getCommandName()			{ return "biom.info";				}
getCommandCategory()32     string getCommandCategory()		{ return "OTU-Based Approaches";	}
33 
34     string getCommonQuestions();
35     string getHelpString();
36     string getOutputPattern(string);
getCitation()37     string getCitation() { return "http://www.mothur.org/wiki/Biom.info"; }
getDescription()38     string getDescription()		{ return "create 'mothur' files from a biom file. ie: shared, taxonomy, constaxonomy"; }
39 
40     int execute();
help()41     void help() { m->mothurOut(getHelpString()); }
42 
43 protected:
44 
45     void createFilesFromBiomSimple();
46     int extractFilesFromHDF5();
47 
48     vector<string> outputNames, otuNames, sampleNames, taxonomy;
49     vector<int> indices, indptr, otudata;
50     string fileroot, biomfile, label, basis, output, format;
51     bool firsttime, abort, relabund;
52     int maxLevel, printlevel, nnz;
53 
54     #ifdef USE_HDF5
55     void processAttributes(H5::Group&, set<string>&);
56     void checkGroups(H5::H5File&, map<string, vector<string> >&);
57     #endif
58 };
59 
60 
61 #endif /* defined(__Mothur__biominfocommand__) */
62