Changeset 1586 for branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/pal/tree/UPGMAAligningTree.java
- Timestamp:
- 06/30/14 08:51:09 (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
r1585 r1586 15 15 16 16 import java.util.ArrayList; 17 import java.util.Iterator;18 17 import java.util.logging.Level; 19 18 19 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm; 20 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithmFactory; 20 21 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence; 21 22 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated; … … 228 229 int maxIndex = 0; 229 230 for(int i=0;i<seqCount1;i++) { 230 tempStorage.set(i, 1, new SmithWatermanRepeated(node1.getSequence(i).getSequence(), node2.getSequence(0).getSequence() , submat, 5));231 tempStorage.set(i, 1, AlignmentAlgorithmFactory.create(node1.getSequence(i).getSequence(), node2.getSequence(0).getSequence() , submat, 5)); 231 232 if(maxScore < tempStorage.get(i, 1).getAlignmentScore()) { 232 233 maxScore = tempStorage.get(i, 1).getAlignmentScore(); … … 234 235 } 235 236 } 237 //if(maxScore > 0) 236 238 alignment.add(tempStorage.get(maxIndex, 1).getAlignment().get(1)); 237 239 } … … 243 245 int maxIndex = 0; 244 246 for(int i=0;i<seqCount2;i++) { 245 tempStorage.set(1, i, new SmithWatermanRepeated(node2.getSequence(i).getSequence(), node1.getSequence(0).getSequence() , submat, 5));247 tempStorage.set(1, i, AlignmentAlgorithmFactory.create(node2.getSequence(i).getSequence(), node1.getSequence(0).getSequence() , submat, 5)); 246 248 if(maxScore < tempStorage.get(1, i).getAlignmentScore()) { 247 249 maxScore = tempStorage.get(1, i).getAlignmentScore(); … … 249 251 } 250 252 } 253 //if(maxScore > 0) 251 254 alignment.add(tempStorage.get(1,maxIndex).getAlignment().get(1)); 252 255 } … … 261 264 for(int i=0;i<seqCount1;i++) { 262 265 for(int j=0;j<seqCount2;j++) { 263 tempStorage1.set(j, 0, new SmithWatermanRepeated(node1.getSequence(i).getSequence(), node2.getSequence(j).getSequence() , submat, 5));266 tempStorage1.set(j, 0, AlignmentAlgorithmFactory.create(node1.getSequence(i).getSequence(), node2.getSequence(j).getSequence() , submat, 5)); 264 267 if(maxScore1 < tempStorage1.get(j, 0).getAlignmentScore()) { 265 268 maxScore1 = tempStorage1.get(j, 0).getAlignmentScore(); … … 267 270 } 268 271 } 272 //if(maxScore1 > 0) 269 273 alignment.add(tempStorage1.get(maxIndex1,0).getAlignment().get(0)); 270 274 } 271 275 for(int i=0; i<seqCount2;i++) { 272 276 for (int j=0;j<seqCount1;j++) { 273 tempStorage2.set(j, 0, new SmithWatermanRepeated(node2.getSequence(i).getSequence(),node1.getSequence(j).getSequence(),submat,5));277 tempStorage2.set(j, 0, AlignmentAlgorithmFactory.create(node2.getSequence(i).getSequence(),node1.getSequence(j).getSequence(),submat,5)); 274 278 if(maxScore2 < tempStorage2.get(j, 0).getAlignmentScore()) { 275 279 maxScore2 = tempStorage2.get(j, 0).getAlignmentScore(); … … 277 281 } 278 282 } 283 //if(maxScore2 > 0) 279 284 alignment.add(tempStorage2.get(maxIndex2,0).getAlignment().get(0)); 280 285 }
Note: See TracChangeset
for help on using the changeset viewer.