def setUp(self):
    """Set up some genome alignment blocks and genome alignments for tests."""
    self.block1 = GenomeAlignmentBlock([Sequence("s1.c1", "TCTCGC-A", 11, 18),
                                        Sequence("s2.c1", "ACTGGC--", 25, 31),
                                        Sequence("s3.c2", "ACTGCCTA", 5, 13),
                                        Sequence("s4.c1", "ACT-GCTA", 58, 65)],
                                       "s1")
    self.block2 = GenomeAlignmentBlock([Sequence("s1.c2", "C------G", 21, 23),
                                        Sequence("s2.c2", "CGGTCAGG", 85, 94),
                                        Sequence("s3.c2", "-GGTC-GG", 1, 7),
                                        Sequence("s4.c3", "-GGCCAGG", 3, 11)],
                                       "s1")
    self.block3 = GenomeAlignmentBlock([Sequence("s1.c1", "CA-TAGC-G", 20, 26),
                                        Sequence("s2.c1", "CAGTAGC-G", 38, 35),
                                        Sequence("s3.c2", "C-GT-GCAG", 5, 13),
                                        Sequence("s4.c1", "CACT-GC-G", 58,
                                                 65)],
                                       "s1")
    self.block4 = GenomeAlignmentBlock([Sequence("s1.c1", "CG-TCGA", 51, 57),
                                        Sequence("s2.c1", "CGCT-GA", 38, 35),
                                        Sequence("s3.c2", "AGGTCGC", 5, 13),
                                        Sequence("s4.c1", "CGCT-GA", 58, 65)],
                                       "s1")
    # this block defines an ambiguous alignment of part of block1
    self.block1p = GenomeAlignmentBlock([Sequence("s1.c1", "GCACGCT", 15, 22),
                                         Sequence("s2.c8", "GCAC-CT", 25, 31),
                                         Sequence("s3.c8", "GC-CGCT", 5, 13),
                                         Sequence("s4.c8", "GC--GCT", 58, 65)],
                                        "s1")

    self.ga1 = GenomeAlignment([self.block1, self.block2])
    self.ga2 = GenomeAlignment([self.block1, self.block2, self.block1p])
def setUp ( self ) : self . block1 = GenomeAlignmentBlock ( [ Sequence ( "s1.c1" , "TCTCGC-A" , 11 , 18 ) , Sequence ( "s2.c1" , "ACTGGC--" , 25 , 31 ) , Sequence ( "s3.c2" , "ACTGCCTA" , 5 , 13 ) , Sequence ( "s4.c1" , "ACT-GCTA" , 58 , 65 ) ] , "s1" ) self . block2 = GenomeAlignmentBlock ( [ Sequence ( "s1.c2" , "C------G" , 21 , 23 ) , Sequence ( "s2.c2" , "CGGTCAGG" , 85 , 94 ) , Sequence ( "s3.c2" , "-GGTC-GG" , 1 , 7 ) , Sequence ( "s4.c3" , "-GGCCAGG" , 3 , 11 ) ] , "s1" ) self . block3 = GenomeAlignmentBlock ( [ Sequence ( "s1.c1" , "CA-TAGC-G" , 20 , 26 ) , Sequence ( "s2.c1" , "CAGTAGC-G" , 38 , 35 ) , Sequence ( "s3.c2" , "C-GT-GCAG" , 5 , 13 ) , Sequence ( "s4.c1" , "CACT-GC-G" , 58 , 65 ) ] , "s1" ) self . block4 = GenomeAlignmentBlock ( [ Sequence ( "s1.c1" , "CG-TCGA" , 51 , 57 ) , Sequence ( "s2.c1" , "CGCT-GA" , 38 , 35 ) , Sequence ( "s3.c2" , "AGGTCGC" , 5 , 13 ) , Sequence ( "s4.c1" , "CGCT-GA" , 58 , 65 ) ] , "s1" ) self . block1p = GenomeAlignmentBlock ( [ Sequence ( "s1.c1" , "GCACGCT" , 15 , 22 ) , Sequence ( "s2.c8" , "GCAC-CT" , 25 , 31 ) , Sequence ( "s3.c8" , "GC-CGCT" , 5 , 13 ) , Sequence ( "s4.c8" , "GC--GCT" , 58 , 65 ) ] , "s1" ) self . ga1 = GenomeAlignment ( [ self . block1 , self . block2 ] ) self . ga2 = GenomeAlignment ( [ self . block1 , self . block2 , self . block1p ] )
Set up some genome alignment blocks and genome alignments for tests.