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

# cogent.parse.rnaview.BaseMultiplet

All Samples(24)  |  Call(22)  |  Derive(0)  |  Import(2)

```
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,\
```
```        b2 = Base('A','35','G')
b3 = Base('A','360','U')
bm = BaseMultiplet([b1, b2, b3])
self.failUnless(bm[0] is b1)
self.failUnless(bm[2] is b3)
#should work from tuple also
bm = BaseMultiplet((b1, b2, b3))
```
```        b2 = Base('A','35','G')
b3 = Base('A','360','U')
bm = BaseMultiplet([b1, b2, b3])
exp = "A 30 A -- A 35 G -- A 360 U;"
self.assertEqual(str(bm), exp)
```
```        b2 = Base('A','35','G')
b3 = Base('A','360','U')
bm1 = BaseMultiplet([b1, b2, b3])
b4 = Base('B','12','C')
b5 = Base('B','42','U')
```

```
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,\
```
```        b2 = Base('A','35','G')
b3 = Base('A','360','U')
bm = BaseMultiplet([b1, b2, b3])
self.failUnless(bm[0] is b1)
self.failUnless(bm[2] is b3)
#should work from tuple also
bm = BaseMultiplet((b1, b2, b3))
```
```        b2 = Base('A','35','G')
b3 = Base('A','360','U')
bm = BaseMultiplet([b1, b2, b3])
exp = "A 30 A -- A 35 G -- A 360 U;"
self.assertEqual(str(bm), exp)
```
```        b2 = Base('A','35','G')
b3 = Base('A','360','U')
bm1 = BaseMultiplet([b1, b2, b3])
b4 = Base('B','12','C')
b5 = Base('B','42','U')
```