]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.h
changed how we count sequences in a fastafile to allow for '>' in sequence names
[mothur.git] / mothur.h
index 5d12977383c4d2eb0457cc88190f078a98a5755e..a7946fde756a68a5eeeabec8aa63e72ec53d1df7 100644 (file)
--- a/mothur.h
+++ b/mothur.h
@@ -632,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){