- reading = new Progress("Reading matrix: ", nseqs * nseqs);
-
- int index = nseqs;
-
- for(int i=1;i<nseqs;i++){
- fileHandle >> name;
- matrixNames.push_back(name);
-
- if(nameMap == NULL){
- list->set(i, name);
- for(int j=0;j<nseqs;j++){
- fileHandle >> distance;
-
- if (distance == -1) { distance = 1000000; }
-
- if(distance < cutoff && j < i){
- PCell value(i, j, distance);
- D->addCell(value);
- }
- index++;
- reading->update(index);
- }
-
- }
- else{
- if(nameMap->count(name)==0){ cout << "Error: Sequence '" << name << "' was not found in the names file, please correct" << endl; }
-
- for(int j=0;j<nseqs;j++){
- fileHandle >> distance;
-
- if (distance == -1) { distance = 1000000; }
-
- if(distance < cutoff && j < i){
- PCell value(nameMap->get(matrixNames[i]), nameMap->get(matrixNames[j]), distance);
- D->addCell(value);
- }
- index++;
- reading->update(index);
- }
- }
- }
- }
- reading->finish();
- delete reading;
+ reading = new Progress("Reading matrix: ", nseqs * nseqs);
+
+ int index = nseqs;
+
+ for(int i=1;i<nseqs;i++){
+ fileHandle >> name;
+ matrixNames.push_back(name);
+
+ if(nameMap == NULL){
+ list->set(i, name);
+ for(int j=0;j<nseqs;j++){
+ fileHandle >> distance;
+
+ if (distance == -1) { distance = 1000000; }
+
+ if(distance < cutoff && j < i){
+ PCell value(i, j, distance);
+ D->addCell(value);
+ }
+ index++;
+ reading->update(index);
+ }
+
+ }
+ else{
+ if(nameMap->count(name)==0){ cout << "Error: Sequence '" << name << "' was not found in the names file, please correct" << endl; }
+
+ for(int j=0;j<nseqs;j++){
+ fileHandle >> distance;
+
+ if (distance == -1) { distance = 1000000; }
+
+ if(distance < cutoff && j < i){
+ PCell value(nameMap->get(matrixNames[i]), nameMap->get(matrixNames[j]), distance);
+ D->addCell(value);
+ }
+ index++;
+ reading->update(index);
+ }
+ }
+ }
+ }
+ reading->finish();
+ delete reading;