]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.h
added mpi code to cluster.split command
[mothur.git] / mothur.h
index ca19aea53139b11da68420de6dc28c239990d626..a7946fde756a68a5eeeabec8aa63e72ec53d1df7 100644 (file)
--- a/mothur.h
+++ b/mothur.h
@@ -254,6 +254,13 @@ inline float roundDist(float dist, int precision){
        
        return int(dist * precision + 0.5)/float(precision);
        
+}
+/***********************************************************************/
+
+inline float ceilDist(float dist, int precision){
+       
+       return int(ceil(dist * precision))/float(precision);
+       
 }
 
 /***********************************************************************/
@@ -625,6 +632,19 @@ inline int getNumSeqs(ifstream& file){
        return numSeqs;
 
 }
+/***********************************************************************/
+inline void getNumSeqs(ifstream& file, int& numSeqs){
+       
+       string input;
+       numSeqs = 0;
+       while(!file.eof()){
+               input = getline(file);
+               if (input.length() != 0) {
+                       if(input[0] == '>'){ numSeqs++; }
+               }
+       }
+}
+
 /***********************************************************************/
 
 inline bool inVector(string member, vector<string> group){