errorFree = false;
}
- if ((commandName == "libshuff") && (globaldata->gMatrix == NULL)) {
- cout << "You must read in a matrix before you use the libshuff command. " << endl; return false;
+ if ((commandName == "libshuff") && ((globaldata->gMatrix == NULL) || (globaldata->gGroupmap == NULL))) {
+ cout << "You must read in a matrix and groupfile before you use the libshuff command. " << endl; return false;
}
if (commandName == "parsimony") {
try {
Progress* reading;
- reading = new Progress("Reading matrix: ", numSeqs * numSeqs);
+ reading = new Progress("Reading matrix: ", numSeqs * numSeqs);
int count = 0;
void FullMatrix::readLTMatrix(ifstream& filehandle) {
try {
Progress* reading;
- reading = new Progress("Reading matrix: ", numSeqs * (numSeqs - 1) / 2);
+ reading = new Progress("Reading matrix: ", numSeqs * (numSeqs - 1) / 2);
int count = 0;
float distance;
try {
//deltaValues[0] = scores for the difference between AA and AB.
//cValues[0][0][0] = AA at distance 0.0, cValues[0][0][1] = AB at distance 0.0, cValues[0][0][2] = AC at distance 0.0, cValues[0][1][0] = BA at distance 0.0, cValues[0][1][1] = BB...
+ Progress* reading;
+ reading = new Progress("Comparing to random:", iters);
sumDelta.resize(numComp-numGroups, 0.0);
}
//cout << "iter " << m << endl;
//clear out old Values
+ reading->update(m);
cValues.clear();
//cout << "random sum delta for iter " << m << endl;
}
+ reading->finish();
+ delete reading;
/**********************************************************/
//find the signifigance of the user matrix' sumdelta values
}
//set groupmap for .shared commands
+ if (globaldata->gGroupmap != NULL) { delete globaldata->gGroupmap; }
globaldata->gGroupmap = groupMap;
return 0;
Progress::Progress(string job, int end){
try {
- cout << "*******************#****#****#****#****#****#****#****#****#****#****#\n";
+ cout << "********************#****#****#****#****#****#****#****#****#****#****#\n";
cout << job << marker;
cout.flush();
cout << endl;
- cout << "**********************************************************************\n";
+ cout << "***********************************************************************\n";
cout.flush();
}
catch(exception& e) {
else if (format == "matrix") {
groupMap = new GroupMap(globaldata->getGroupFile());
groupMap->readMap();
+ if (globaldata->gGroupmap != NULL) { delete globaldata->gGroupmap; }
globaldata->gGroupmap = groupMap;
}
if(square == 0){
- reading = new Progress("Reading matrix: ", nseqs * (nseqs - 1) / 2);
+ reading = new Progress("Reading matrix: ", nseqs * (nseqs - 1) / 2);
int index = 0;
}
else{
- reading = new Progress("Reading matrix: ", nseqs * nseqs);
+ reading = new Progress("Reading matrix: ", nseqs * nseqs);
int index = nseqs;
list = new ListVector(nameMap->getListVector());
- Progress* reading = new Progress("Reading matrix: ", nseqs * nseqs);
+ Progress* reading = new Progress("Reading matrix: ", nseqs * nseqs);
int lt = 1;
int refRow = 0; //we'll keep track of one cell - Cell(refRow,refCol) - and see if it's transpose
read->read(&*globaldata);
if (globaldata->getFormat() == "shared") {
groupMap->readMap();
+
+ if (globaldata->gGroupmap != NULL) { delete globaldata->gGroupmap; }
globaldata->gGroupmap = groupMap;
shared = new SharedCommand();