X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=readphylip.cpp;h=1c529b26f15fdfa172c8a0f7ebcf20187e87b03b;hb=ee8403d4eb5760187d62b42a9cf4272de8fc0ec4;hp=b13dc25c0eded92a950bfc41a782075624e47fdd;hpb=ca9ac1d80c62f57270b0dcd49410ebe08a8aecd6;p=mothur.git diff --git a/readphylip.cpp b/readphylip.cpp index b13dc25..1c529b2 100644 --- a/readphylip.cpp +++ b/readphylip.cpp @@ -36,9 +36,13 @@ int ReadPhylipMatrix::read(NameAssignment* nameMap){ int square, nseqs; string name; vector matrixNames; - - 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); if(nameMap == NULL){