]> git.donarmstrong.com Git - mothur.git/blobdiff - averagelinkage.cpp
added load.logfile command. changed summary.single output for subsample=t.
[mothur.git] / averagelinkage.cpp
index db2c51edc5b182b52dcf540456baad7b5782c61e..c430c883f66d6006cc9bf01a2a964dd62957688f 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef AVERAGE_H
 #define AVERAGE_H
 
-
+//test
 #include "mothur.h"
 #include "cluster.hpp"
 #include "rabundvector.hpp"
@@ -11,8 +11,8 @@
 
 /***********************************************************************/
 
-AverageLinkage::AverageLinkage(RAbundVector* rav, ListVector* lv, SparseMatrix* dm, float c) :
-       Cluster(rav, lv, dm, c)
+AverageLinkage::AverageLinkage(RAbundVector* rav, ListVector* lv, SparseMatrix* dm, float c, string s) :
+       Cluster(rav, lv, dm, c, s)
 {
        saveRow = -1;
        saveCol = -1;
@@ -38,19 +38,12 @@ bool AverageLinkage::updateDistance(MatData& colCell, MatData& rowCell) {
                        saveCol = smallCol;
                }
                
-               float oldColCell = colCell->dist;
-               
                colCell->dist = (colBin * colCell->dist + rowBin * rowCell->dist) / totalBin;
                
-               //warn user if merge with value above cutoff produces a value below cutoff
-               if ((colCell->dist < cutoff) && ((oldColCell > cutoff) || (rowCell->dist > cutoff)) ) {
-                       mothurOut("Warning: merging " + toString(oldColCell) + " with " + toString(rowCell->dist) + ", new value = " + toString(colCell->dist) + ". Results will differ from those if cutoff was used in the read.dist command."); mothurOutEndLine();
-               }
-
                return(true);
        }
        catch(exception& e) {
-               errorOut(e, "AverageLinkage", "updateDistance");
+               m->errorOut(e, "AverageLinkage", "updateDistance");
                exit(1);
        }
 }