]> git.donarmstrong.com Git - mothur.git/blobdiff - readcluster.cpp
fixing bugs while testing
[mothur.git] / readcluster.cpp
index 025d718dea254f909ab57f98706216366aa3e710..497fc804faadc760bdcc1684f1a45a856ddd9ab1 100644 (file)
@@ -60,8 +60,13 @@ int ReadCluster::convertPhylip2Column(NameAssignment* nameMap){
                int square, nseqs;
                string name;
                vector<string> matrixNames;
-        
-               in >> nseqs >> name;
+               
+               string numTest;
+               in >> numTest >> name;
+               
+               if (!m->isContainingOnlyDigits(numTest)) { m->mothurOut("[ERROR]: expected a number and got " + numTest + ", quitting."); m->mothurOutEndLine(); exit(1); }
+               else { convert(numTest, nseqs); }
+               
                rowToName[0] = name;
                matrixNames.push_back(name);