Did I find the right examples for you? yes no

# cogent.struct.pairs_util.gapped_to_ungapped

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

```from cogent.core.alphabet import CharAlphabet
from cogent.struct.rna2d import Pairs
from cogent.struct.pairs_util import PairsAdjustmentError,\
delete_gaps_from_pairs, insert_gaps_in_pairs, gapped_to_ungapped,\
```
```    def test_gapped_to_ungapped_simple(self):
"""gapped_to_ungapped: should work for simple case"""
s = RnaSequence(self.gapped)
p = self.simple_g
obs_seq, obs_pairs = gapped_to_ungapped(s,p)
```
```        s = RnaSequence(self.gapped)
p = Pairs(self.out_order_g)
obs_seq, obs_pairs = gapped_to_ungapped(s,p)
self.assertEqual(obs_seq, self.ungapped)
self.assertEqualItems(obs_pairs, self.out_order)
```
```        s = RnaSequence(self.gapped)
p = Pairs(self.duplicates_g)
obs_seq, obs_pairs = gapped_to_ungapped(s,p)
self.assertEqual(obs_seq, self.ungapped)
self.assertEqualItems(obs_pairs, self.duplicates)
```
```        s = RnaSequence(self.gapped)
p = Pairs(self.pseudo_g)
obs_seq, obs_pairs = gapped_to_ungapped(s,p)
self.assertEqual(obs_seq, self.ungapped)
self.assertEqualItems(obs_pairs, self.pseudo)
```

```from cogent.core.alphabet import CharAlphabet
from cogent.struct.rna2d import Pairs
from cogent.struct.pairs_util import PairsAdjustmentError,\
delete_gaps_from_pairs, insert_gaps_in_pairs, gapped_to_ungapped,\
```
```    def test_gapped_to_ungapped_simple(self):
"""gapped_to_ungapped: should work for simple case"""
s = RnaSequence(self.gapped)
p = self.simple_g
obs_seq, obs_pairs = gapped_to_ungapped(s,p)
```
```        s = RnaSequence(self.gapped)
p = Pairs(self.out_order_g)
obs_seq, obs_pairs = gapped_to_ungapped(s,p)
self.assertEqual(obs_seq, self.ungapped)
self.assertEqualItems(obs_pairs, self.out_order)
```
```        s = RnaSequence(self.gapped)
p = Pairs(self.duplicates_g)
obs_seq, obs_pairs = gapped_to_ungapped(s,p)
self.assertEqual(obs_seq, self.ungapped)
self.assertEqualItems(obs_pairs, self.duplicates)
```
```        s = RnaSequence(self.gapped)
p = Pairs(self.pseudo_g)
obs_seq, obs_pairs = gapped_to_ungapped(s,p)
self.assertEqual(obs_seq, self.ungapped)
self.assertEqualItems(obs_pairs, self.pseudo)
```