X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=preclustercommand.cpp;h=fe722a669f2c0ca983c94ef21cc73dc95f5719bc;hb=18ccb5ee181cc69d8f8e9cbf178d7751e6199da5;hp=24d22845c5a4fc33d109888e5f2007d25134672e;hpb=af0a94ea8f02421b2b73e77e68753a2b4c37768e;p=mothur.git diff --git a/preclustercommand.cpp b/preclustercommand.cpp index 24d2284..fe722a6 100644 --- a/preclustercommand.cpp +++ b/preclustercommand.cpp @@ -192,7 +192,7 @@ PreClusterCommand::PreClusterCommand(string option) { else if (countfile == "not open") { abort = true; countfile = ""; } else { m->setCountTableFile(countfile); - ct.readTable(countfile, true); + ct.readTable(countfile, true, false); if (ct.hasGroupInfo()) { bygroup = true; } else { bygroup = false; } } @@ -300,6 +300,7 @@ int PreClusterCommand::execute(){ m->mothurOut("It took " + toString(time(NULL) - start) + " secs to run pre.cluster."); m->mothurOutEndLine(); }else { + if (processors != 1) { m->mothurOut("When using running without group information mothur can only use 1 processor, continuing."); m->mothurOutEndLine(); processors = 1; } if (namefile != "") { readNameFile(); } //reads fasta file and return number of seqs @@ -903,15 +904,9 @@ void PreClusterCommand::readNameFile(){ while (!in.eof()) { in >> firstCol >> secondCol; m->gobble(in); - for (int i = 0; i < firstCol.length(); i++) { - if (firstCol[i] == ':') { firstCol[i] = '_'; m->changedSeqNames = true; } - } - - int size = 1; - for (int i = 0; i < secondCol.length(); i++) { - if (secondCol[i] == ':') { secondCol[i] = '_'; m->changedSeqNames = true; } - else if(secondCol[i] == ','){ size++; } - } + m->checkName(firstCol); + m->checkName(secondCol); + int size = m->getNumNames(secondCol); names[firstCol] = secondCol; sizes[firstCol] = size;