Ignore:
Timestamp:
09/12/13 01:04:37 (11 years ago)
Author:
rkrimmel
Message:

Some tests for Smith Waterman Algorithm (temporary)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-guitar/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/commands/CMDbinaryAlignment.java

    r1304 r1307  
    1818import java.io.FilenameFilter; 
    1919import java.util.Collection; 
     20import java.util.Iterator; 
    2021import java.util.LinkedList; 
    2122import java.util.List; 
     
    2425import de.ugoe.cs.autoquest.CommandHelpers; 
    2526import de.ugoe.cs.autoquest.eventcore.Event; 
     27import de.ugoe.cs.autoquest.plugin.alignment.SmithWaterman; 
     28import de.ugoe.cs.autoquest.plugin.alignment.DifferenceSubstitutionMatrix; 
     29import de.ugoe.cs.autoquest.plugin.alignment.seqgen.RandomSequenceGenerator; 
    2630import de.ugoe.cs.util.console.Command; 
    2731import de.ugoe.cs.util.console.Console; 
     
    3640 * @version 1.0 
    3741 */ 
    38 public class CMDbinaryAligment implements Command { 
     42public class CMDbinaryAlignment implements Command { 
    3943 
    4044        /* 
     
    5660                } 
    5761 
    58                  
    5962                Collection<List<Event>> sequences = new LinkedList<List<Event>>(); 
    60                  
     63                sequences = (Collection<List<Event>>) GlobalDataContainer.getInstance() 
     64                                .getData(sequencesName); 
     65                Console.println("Number of sequences: " + sequences.size()); 
     66                for (Iterator<List<Event>> it = sequences.iterator(); it.hasNext();) { 
     67                        List<Event> ev = it.next(); 
     68                        RandomSequenceGenerator randgen = new RandomSequenceGenerator(1, 
     69                                        80, 10); 
     70                        int[] seq1 = randgen.generate(ev); 
     71                        int[] seq2 = randgen.generate(ev); 
     72                        SmithWaterman sw = new SmithWaterman(seq1, seq2, 
     73                                        new DifferenceSubstitutionMatrix(seq1, seq2)); 
     74 
     75                        sw.printDPMatrix(); 
     76                        Console.println("Number of events in sequence: " + ev.size()); 
     77                        for (Iterator<Event> foo = ev.iterator(); foo.hasNext();) { 
     78                                Event blubb = foo.next(); 
     79                                // Console.println(blubb.toString()); 
     80                        } 
     81                } 
    6182 
    6283        } 
Note: See TracChangeset for help on using the changeset viewer.