X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=clusterclassic.cpp;h=2d1b9a6b781960a824fddafc03b904e8039179e1;hb=d205e70ae86dbee2efc2df02f2717975854de6ba;hp=f0bae59ab33de8c2f451b80c7180a33c49c28a54;hpb=bdd77df6a7df8a5775b57d0a7ec8b55de45e7b5b;p=mothur.git diff --git a/clusterclassic.cpp b/clusterclassic.cpp index f0bae59..2d1b9a6 100644 --- a/clusterclassic.cpp +++ b/clusterclassic.cpp @@ -40,7 +40,12 @@ int ClusterClassic::readPhylipFile(string filename, NameAssignment* nameMap) { ifstream fileHandle; m->openInputFile(filename, fileHandle); - fileHandle >> nseqs >> name; + string numTest; + fileHandle >> numTest >> name; + + if (!m->isContainingOnlyDigits(numTest)) { m->mothurOut("[ERROR]: expected a number and got " + numTest + ", quitting."); m->mothurOutEndLine(); exit(1); } + else { convert(numTest, nseqs); } + matrixNames.push_back(name);