]> git.donarmstrong.com Git - mothur.git/blobdiff - rarefact.cpp
modified freq parameter be a percentage of numSeqs, added catchall command - not...
[mothur.git] / rarefact.cpp
index f5e7952688cdbb1dd182ca44df9c152ef46879d9..76f68296b209ec1eb8e2ff5a14668b32fd451b8b 100644 (file)
 
 /***********************************************************************/
 
-int Rarefact::getCurve(int increment = 1, int nIters = 1000){
+int Rarefact::getCurve(float percentFreq = 0.01, int nIters = 1000){
        try {
                RarefactionCurveData* rcd = new RarefactionCurveData();
                for(int i=0;i<displays.size();i++){
                        rcd->registerDisplay(displays[i]);
                }
-       
+               
+               //convert freq percentage to number
+               int increment = numSeqs * percentFreq;
+               
                for(int iter=0;iter<nIters;iter++){
                
                        for(int i=0;i<displays.size();i++){
@@ -73,7 +76,7 @@ int Rarefact::getCurve(int increment = 1, int nIters = 1000){
 
 /***********************************************************************/
 
-int Rarefact::getSharedCurve(int increment = 1, int nIters = 1000){
+int Rarefact::getSharedCurve(float percentFreq = 0.01, int nIters = 1000){
 try {
                SharedRarefactionCurveData* rcd = new SharedRarefactionCurveData();
                
@@ -87,6 +90,9 @@ try {
                //if jumble is false all iters will be the same
                if (globaldata->jumble == false)  {  nIters = 1;  }
                
+               //convert freq percentage to number
+               int increment = numSeqs * percentFreq;
+               
                for(int iter=0;iter<nIters;iter++){
                
                        for(int i=0;i<displays.size();i++){