Did I find the right examples for you? yes no

# cogent.struct.knots.PairedRegionFromPairs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

```from cogent.util.dict2d import Dict2D
from cogent.struct.rna2d import Pairs
from cogent.struct.knots import PairedRegion, PairedRegionFromPairs,\
PairedRegions, PairedRegionsFromPairs, ConflictMatrix,\
opt_all, contains_true, empty_matrix,\
```
```    def test_PairedRegionFromPairs(self):
"""PairedRegionFromPairs: should handle valid input"""
p = Pairs([(3,10),(4,9),(5,8)])
pr = PairedRegionFromPairs(p, Id='A')
self.assertEqual(pr.Start, 3)
```
```        # no error checking on input pairs...
p = Pairs([(3,10),(4,9),(6,8)]) # not a real paired region
pr = PairedRegionFromPairs(p, Id='A')
self.assertEqual(pr.Start, 3)
self.assertEqual(pr.End, 10)
```

```from cogent.util.dict2d import Dict2D
from cogent.struct.rna2d import Pairs
from cogent.struct.knots import PairedRegion, PairedRegionFromPairs,\
PairedRegions, PairedRegionsFromPairs, ConflictMatrix,\
opt_all, contains_true, empty_matrix,\
```
```    def test_PairedRegionFromPairs(self):
"""PairedRegionFromPairs: should handle valid input"""
p = Pairs([(3,10),(4,9),(5,8)])
pr = PairedRegionFromPairs(p, Id='A')
self.assertEqual(pr.Start, 3)
```
```        # no error checking on input pairs...
p = Pairs([(3,10),(4,9),(6,8)]) # not a real paired region
pr = PairedRegionFromPairs(p, Id='A')
self.assertEqual(pr.Start, 3)
self.assertEqual(pr.End, 10)
```