Changeset 1589 for branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/pal/tree/UPGMAAligningTree.java
- Timestamp:
- 07/09/14 12:13:13 (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
r1588 r1589 15 15 16 16 import java.util.ArrayList; 17 import java.util.Iterator; 17 18 import java.util.logging.Level; 18 19 19 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm;20 20 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithmFactory; 21 21 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence; 22 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated; 23 import de.ugoe.cs.autoquest.tasktrees.alignment.matrix.BinaryAlignmentStorage; 22 import de.ugoe.cs.autoquest.tasktrees.alignment.matrix.PairwiseAlignmentStorage; 24 23 import de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ObjectDistanceSubstitionMatrix; 25 24 import de.ugoe.cs.autoquest.tasktrees.alignment.matrix.UPGMAMatrix; … … 48 47 * @param m distance matrix 49 48 */ 50 public UPGMAAligningTree(ArrayList<NumberSequence> numberseqs, BinaryAlignmentStorage alignments, ObjectDistanceSubstitionMatrix submat)49 public UPGMAAligningTree(ArrayList<NumberSequence> numberseqs, PairwiseAlignmentStorage alignments, ObjectDistanceSubstitionMatrix submat) 51 50 { 52 51 if (alignments.getDistanceMatrix().size() < 2) … … 82 81 // 83 82 private ArrayList<NumberSequence> numberseqs; 84 private BinaryAlignmentStorage alignments;83 private PairwiseAlignmentStorage alignments; 85 84 private ObjectDistanceSubstitionMatrix submat; 86 85 private int numClusters; … … 216 215 int seqCount1 = node1.getSequences().size(); 217 216 int seqCount2 = node2.getSequences().size(); 218 219 /* 220 for(int i = 0; i < seqCount1; i++) { 221 for(int j = 0; j < seqCount2; j++) { 222 node1.getSequence(i).printSequence(); 223 node2.getSequence(j).printSequence(); 224 } 225 } 226 */ 217 227 218 228 219 Console.traceln(Level.INFO,"Merging node " + node1.getIdentifier() + " with " + node2.getIdentifier()); … … 237 228 alignment.addAll(node1.getSequences()); 238 229 239 BinaryAlignmentStorage tempStorage = new BinaryAlignmentStorage(seqCount1,seqCount2);230 PairwiseAlignmentStorage tempStorage = new PairwiseAlignmentStorage(seqCount1,seqCount2); 240 231 double maxScore = 0.0; 241 232 int maxIndex = 0; … … 254 245 else if(seqCount1 == 1 && seqCount2 > 1) { 255 246 alignment.addAll(node2.getSequences()); 256 BinaryAlignmentStorage tempStorage = new BinaryAlignmentStorage(seqCount1,seqCount2);247 PairwiseAlignmentStorage tempStorage = new PairwiseAlignmentStorage(seqCount1,seqCount2); 257 248 double maxScore = 0.0; 258 249 int maxIndex = 0; … … 270 261 //Align 2 groups 271 262 else if((seqCount1 > 1) && (seqCount2 > 1)){ 272 BinaryAlignmentStorage tempStorage1 = new BinaryAlignmentStorage(seqCount2,1);273 BinaryAlignmentStorage tempStorage2 = new BinaryAlignmentStorage(seqCount1,1);263 PairwiseAlignmentStorage tempStorage1 = new PairwiseAlignmentStorage(seqCount2,1); 264 PairwiseAlignmentStorage tempStorage2 = new PairwiseAlignmentStorage(seqCount1,1); 274 265 double maxScore1 = 0.0; 275 266 double maxScore2 = 0.0; … … 334 325 (oc[aj]/ocsum)*jdist; 335 326 } 327 328 329 public void printMultipleAlignment() { 330 for (Iterator<NumberSequence> it = getRoot().getSequences().iterator(); it.hasNext();) { 331 NumberSequence tmp = it.next(); 332 tmp.printSequence(); 333 } 334 } 336 335 } 337 336
Note: See TracChangeset
for help on using the changeset viewer.