Ignore:
Timestamp:
07/14/14 23:27:01 (10 years ago)
Author:
rkrimmel
Message:

Removed parameters from alignmentalgorihm factory constructor and changed interface by adding a new align() method, which now gets all the data via parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/PairwiseAlignmentGenerator.java

    r1595 r1612  
    2121                                if (i != j) { 
    2222                                        int smithWatermanThreshold = 10; 
    23  
    24                                         alignments.set(i, j,AlignmentAlgorithmFactory.create( 
    25                                                         ns1.getSequence(), ns2.getSequence(), submat, 
    26                                                         smithWatermanThreshold)); 
     23                                        AlignmentAlgorithm aa = AlignmentAlgorithmFactory.create(); 
     24                                        aa.align(ns1.getSequence(), ns2.getSequence(), submat, 
     25                                                        smithWatermanThreshold); 
     26                                        alignments.set(i,j,aa); 
     27                                 
    2728                                         
    28                                         AlignmentAlgorithm sameSequence1 = AlignmentAlgorithmFactory.create( 
     29                                        AlignmentAlgorithm sameSequence1 = AlignmentAlgorithmFactory.create(); 
     30                                                        sameSequence1.align( 
    2931                                                        ns1.getSequence(), ns1.getSequence(), submat, 
    3032                                                        smithWatermanThreshold); 
    31                                         AlignmentAlgorithm sameSequence2 = AlignmentAlgorithmFactory.create( 
    32                                                         ns2.getSequence(), ns2.getSequence(), submat, 
     33                                        AlignmentAlgorithm sameSequence2 = AlignmentAlgorithmFactory.create(); 
     34                                                        sameSequence2.align(ns2.getSequence(), ns2.getSequence(), submat, 
    3335                                                        smithWatermanThreshold); 
    34                                         AlignmentAlgorithm randomSequence = AlignmentAlgorithmFactory.create( 
    35                                                         ns1.shuffle().getSequence(),ns2.shuffle().getSequence(),submat,smithWatermanThreshold); 
     36                                        AlignmentAlgorithm randomSequence = AlignmentAlgorithmFactory.create(); 
     37                                                        randomSequence.align(ns1.shuffle().getSequence(),ns2.shuffle().getSequence(),submat,smithWatermanThreshold); 
    3638                                         
    3739                                        // Score of the aligmnment 
    3840                                        double score = alignments.get(i,j).getAlignmentScore(); 
     41                                        /* 
    3942                                        if(score > 0) { 
    4043                                                System.out.println("Alignment: " + i + " " + j); 
     
    5255                                                System.out.println(); 
    5356                                        } 
     57                                        */ 
    5458                                        // Scores of the sequence being aligned to itself (maximum score) 
    5559                                        double sSelf1 = sameSequence1.getAlignmentScore(); 
Note: See TracChangeset for help on using the changeset viewer.