]> git.donarmstrong.com Git - mothur.git/blobdiff - readphylipvector.cpp
changes while testing
[mothur.git] / readphylipvector.cpp
index c3ffccef2aa6c73ef8922a2265d131d52ce40f29..85f4777dde02bd4980411d8d48015d2cf06b0e50 100644 (file)
@@ -34,7 +34,11 @@ vector<string> ReadPhylipVector::read(vector< vector<double> >& matrix) {
                int numSeqs;
                string name;
                
-               in >> numSeqs >> name; 
+               string numTest;
+               in >> numTest >> name;
+               
+               if (!m->isContainingOnlyDigits(numTest)) { m->mothurOut("[ERROR]: expected a number and got " + numTest + ". I suspect you entered a column formatted file as a phylip file, quitting."); m->mothurOutEndLine(); exit(1); }
+               else { convert(numTest, numSeqs); }
                
                while((d=in.get()) != EOF){