]> git.donarmstrong.com Git - mothur.git/blobdiff - subsample.h
working on adding subsampling to dist.shared. fixed bug in phylotype command related...
[mothur.git] / subsample.h
diff --git a/subsample.h b/subsample.h
new file mode 100644 (file)
index 0000000..9156e09
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef Mothur_subsample_h
+#define Mothur_subsample_h
+
+//
+//  subsample.h
+//  Mothur
+//
+//  Created by Sarah Westcott on 4/2/12.
+//  Copyright (c) 2012 Schloss Lab. All rights reserved.
+//
+
+#include "mothurout.h"
+#include "sharedrabundvector.h"
+
+//subsampling overwrites the sharedRabunds.  If you need to reuse the original use the getSamplePreserve function.
+
+class SubSample {
+       
+    public:
+    
+        SubSample() { m = MothurOut::getInstance(); }
+        ~SubSample() {}
+    
+        vector<string> getSample(vector<SharedRAbundVector*>&, int); //returns the bin labels for the subsample, mothurOuts binlabels are preserved so you can run this multiple times.
+    
+        vector<SharedRAbundVector*> getSamplePreserve(vector<SharedRAbundVector*>&, vector<string>&, int);
+    
+    private:
+    
+        MothurOut* m;
+        int eliminateZeroOTUS(vector<SharedRAbundVector*>&);
+
+};
+
+#endif