X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=clusterclassic.cpp;h=2d1b9a6b781960a824fddafc03b904e8039179e1;hb=e339f9008daa7d37c9a9034829565620a6abe783;hp=f0bae59ab33de8c2f451b80c7180a33c49c28a54;hpb=15b252e317fde72ce0a5de8776cb88112e0ed2b6;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);