Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(10)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_parse/test_rnaview.py   cogent(Download)
 
from cogent.util.unit_test import TestCase, main
from cogent.parse.rnaview import is_roman_numeral, is_edge, is_orientation,\
    parse_annotation, parse_uncommon_residues, parse_base_pairs,\
    parse_base_multiplets, parse_pair_counts, MinimalRnaviewParser,\
        b6 = Base('C','2','A')
        bm2 = BaseMultiplet([b4, b5, b6])
        bms = BaseMultiplets([bm1, bm2])
        self.failUnless(bms[0] is bm1)
        self.failUnless(bms[1] is bm2)
        self.assertEqual(bms[1][2].ResId, '2')
 
        #should work from tuple also
        bms = BaseMultiplets((bm1, bm2))
        b6 = Base('C','2','A')
        bm2 = BaseMultiplet([b4, b5, b6])
        bms = BaseMultiplets([bm1, bm2])
        exp_lines = [\
        "A 30 A -- A 35 G -- A 360 U;",\
        bm2 = BaseMultiplet([Base('0','284','C','273'),\
            Base('0','285','A','274'), Base('0','367','G','356')])
        bms = BaseMultiplets([bm1,bm2])
        obs = parse_base_multiplets(basic_lines)
        for o,e in zip(obs,bms):

src/p/y/pycogent-HEAD/tests/test_parse/test_rnaview.py   pycogent(Download)
 
from cogent.util.unit_test import TestCase, main
from cogent.parse.rnaview import is_roman_numeral, is_edge, is_orientation,\
    parse_annotation, parse_uncommon_residues, parse_base_pairs,\
    parse_base_multiplets, parse_pair_counts, MinimalRnaviewParser,\
        b6 = Base('C','2','A')
        bm2 = BaseMultiplet([b4, b5, b6])
        bms = BaseMultiplets([bm1, bm2])
        self.failUnless(bms[0] is bm1)
        self.failUnless(bms[1] is bm2)
        self.assertEqual(bms[1][2].ResId, '2')
 
        #should work from tuple also
        bms = BaseMultiplets((bm1, bm2))
        b6 = Base('C','2','A')
        bm2 = BaseMultiplet([b4, b5, b6])
        bms = BaseMultiplets([bm1, bm2])
        exp_lines = [\
        "A 30 A -- A 35 G -- A 360 U;",\
        bm2 = BaseMultiplet([Base('0','284','C','273'),\
            Base('0','285','A','274'), Base('0','367','G','356')])
        bms = BaseMultiplets([bm1,bm2])
        obs = parse_base_multiplets(basic_lines)
        for o,e in zip(obs,bms):