Changeset 1612 for branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/pal/tree/UPGMAAligningTree.java
- Timestamp:
- 07/14/14 23:27:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/pal/tree/UPGMAAligningTree.java
r1589 r1612 18 18 import java.util.logging.Level; 19 19 20 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm; 20 21 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithmFactory; 21 22 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence; … … 221 222 //Align 2 sequences 222 223 if(seqCount1 == 1 && seqCount2 == 1) { 223 alignment = (alignments.get(node1.getNumber(), node2.getNumber())).getAlignment(); 224 AlignmentAlgorithm aa = AlignmentAlgorithmFactory.create(); 225 aa.align(node1.getSequence(0).getSequence(), node2.getSequence(0).getSequence(), submat, 5); 226 alignment = aa.getAlignment(); 224 227 225 228 } … … 231 234 double maxScore = 0.0; 232 235 int maxIndex = 0; 233 for(int i=0;i<seqCount1;i++) { 234 tempStorage.set(i, 1, AlignmentAlgorithmFactory.create(node1.getSequence(i).getSequence(), node2.getSequence(0).getSequence() , submat, 5)); 236 for(int i=0;i<seqCount1;i++){ 237 AlignmentAlgorithm aa = AlignmentAlgorithmFactory.create(); 238 aa.align(node1.getSequence(i).getSequence(), node2.getSequence(0).getSequence() , submat, 5); 239 tempStorage.set(i, 1, aa); 240 235 241 if(maxScore < tempStorage.get(i, 1).getAlignmentScore()) { 236 242 maxScore = tempStorage.get(i, 1).getAlignmentScore(); … … 249 255 int maxIndex = 0; 250 256 for(int i=0;i<seqCount2;i++) { 251 tempStorage.set(1, i, AlignmentAlgorithmFactory.create(node2.getSequence(i).getSequence(), node1.getSequence(0).getSequence() , submat, 5)); 257 AlignmentAlgorithm aa = AlignmentAlgorithmFactory.create(); 258 aa.align(node2.getSequence(i).getSequence(), node1.getSequence(0).getSequence() , submat, 5); 259 tempStorage.set(1, i, aa); 252 260 if(maxScore < tempStorage.get(1, i).getAlignmentScore()) { 253 261 maxScore = tempStorage.get(1, i).getAlignmentScore(); … … 269 277 for(int i=0;i<seqCount1;i++) { 270 278 for(int j=0;j<seqCount2;j++) { 271 tempStorage1.set(j, 0, AlignmentAlgorithmFactory.create(node1.getSequence(i).getSequence(), node2.getSequence(j).getSequence() , submat, 5)); 279 AlignmentAlgorithm aa =AlignmentAlgorithmFactory.create(); 280 aa.align(node1.getSequence(i).getSequence(), node2.getSequence(j).getSequence() , submat, 5); 281 tempStorage1.set(j, 0, aa); 272 282 if(maxScore1 < tempStorage1.get(j, 0).getAlignmentScore()) { 273 283 maxScore1 = tempStorage1.get(j, 0).getAlignmentScore(); … … 280 290 for(int i=0; i<seqCount2;i++) { 281 291 for (int j=0;j<seqCount1;j++) { 282 tempStorage2.set(j, 0, AlignmentAlgorithmFactory.create(node2.getSequence(i).getSequence(),node1.getSequence(j).getSequence(),submat,5)); 292 AlignmentAlgorithm aa =AlignmentAlgorithmFactory.create(); 293 aa.align(node2.getSequence(i).getSequence(),node1.getSequence(j).getSequence(),submat,5); 294 tempStorage2.set(j, 0, aa); 283 295 if(maxScore2 < tempStorage2.get(j, 0).getAlignmentScore()) { 284 296 maxScore2 = tempStorage2.get(j, 0).getAlignmentScore();
Note: See TracChangeset
for help on using the changeset viewer.