+int ReadColumnMatrix::read(CountTable* countTable){
+ try {
+
+ string firstName, secondName;
+ float distance;
+ int nseqs = countTable->size();
+
+ DMatrix->resize(nseqs);
+ list = new ListVector(countTable->getListVector());
+
+ 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
+ int refCol = 0; //shows up later - Cell(refCol,refRow). If it does, then its a square matrix
+
+ //need to see if this is a square or a triangular matrix...
+
+ while(fileHandle && lt == 1){ //let's assume it's a triangular matrix...
+
+
+ fileHandle >> firstName; m->gobble(fileHandle);
+ fileHandle >> secondName; m->gobble(fileHandle);
+ fileHandle >> distance; // get the row and column names and distance
+
+ if (m->control_pressed) { fileHandle.close(); delete reading; return 0; }
+
+ int itA = countTable->get(firstName);
+ int itB = countTable->get(secondName);
+
+ if (m->control_pressed) { exit(1); }
+
+ if (distance == -1) { distance = 1000000; }
+ else if (sim) { distance = 1.0 - distance; } //user has entered a sim matrix that we need to convert.