]> git.donarmstrong.com Git - mothur.git/blobdiff - subsample.h
test2
[mothur.git] / subsample.h
index 9156e094f9706426fa50d3d9b7e664494e839485..aaf52447b026127b27141bb8794a77a80f60c7f4 100644 (file)
@@ -11,6 +11,8 @@
 
 #include "mothurout.h"
 #include "sharedrabundvector.h"
+#include "treemap.h"
+#include "tree.h"
 
 //subsampling overwrites the sharedRabunds.  If you need to reuse the original use the getSamplePreserve function.
 
@@ -21,14 +23,18 @@ class SubSample {
         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);
+        vector<string> getSample(vector<SharedRAbundVector*>&, int); //returns the bin labels for the subsample, mothurOuts binlabels are preserved so you can run this multiple times. Overwrites original vector passed in, if you need to preserve it deep copy first.
+        
+        Tree* getSample(Tree*, TreeMap*, map<string, string>, int); //creates new subsampled tree, destroys treemap so copy if needed.
     
     private:
     
         MothurOut* m;
         int eliminateZeroOTUS(vector<SharedRAbundVector*>&);
+    
+        vector<string> getSample(TreeMap*, int); //returns map contains names of seqs in subsample -> group. 
+        map<string, string> deconvolute(map<string, string> wholeSet, vector<string>& subsampleWanted); //returns new nameMap containing only subsampled names, and removes redundants from subsampled wanted because it makes the new nameMap.
+
 
 };