Did I find the right examples for you? yes no

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

src/c/o/cogent-1.5.3/tests/test_struct/test_pairs_util.py   cogent(Download)
from cogent.core.alphabet import CharAlphabet
from cogent.struct.rna2d import Pairs
from cogent.struct.pairs_util import PairsAdjustmentError,\
    adjust_base, adjust_base_structures, adjust_pairs_from_mapping,\
    delete_gaps_from_pairs, insert_gaps_in_pairs, gapped_to_ungapped,\
        s = RnaSequence(self.gapped)
        p = self.simple
        obs_seq, obs_pairs = ungapped_to_gapped(s,p)
        assert obs_seq is s
        self.assertEqualItems(obs_pairs, self.simple_g)
        s = RnaSequence(self.gapped)
        p = self.out_order
        obs_seq, obs_pairs = ungapped_to_gapped(s,p)
        assert obs_seq is s
        self.assertEqualItems(obs_pairs, self.out_order_g)
    def test_ungapped_to_gapped_simple(self):
        """ungapped_to_gapped: should work on basic case"""
        s = self.gapped
        p = self.simple
        obs_seq, obs_pairs = ungapped_to_gapped(s,p)
    def test_ungapped_to_gapped_duplicates(self):
        """ungapped_to_gapped: should work when pairs are duplicated"""
        s = self.gapped
        p = self.duplicates
        obs_seq, obs_pairs = ungapped_to_gapped(s,p)

src/p/y/pycogent-HEAD/tests/test_struct/test_pairs_util.py   pycogent(Download)
from cogent.core.alphabet import CharAlphabet
from cogent.struct.rna2d import Pairs
from cogent.struct.pairs_util import PairsAdjustmentError,\
    adjust_base, adjust_base_structures, adjust_pairs_from_mapping,\
    delete_gaps_from_pairs, insert_gaps_in_pairs, gapped_to_ungapped,\
        s = RnaSequence(self.gapped)
        p = self.simple
        obs_seq, obs_pairs = ungapped_to_gapped(s,p)
        assert obs_seq is s
        self.assertEqualItems(obs_pairs, self.simple_g)
        s = RnaSequence(self.gapped)
        p = self.out_order
        obs_seq, obs_pairs = ungapped_to_gapped(s,p)
        assert obs_seq is s
        self.assertEqualItems(obs_pairs, self.out_order_g)
    def test_ungapped_to_gapped_simple(self):
        """ungapped_to_gapped: should work on basic case"""
        s = self.gapped
        p = self.simple
        obs_seq, obs_pairs = ungapped_to_gapped(s,p)
    def test_ungapped_to_gapped_duplicates(self):
        """ungapped_to_gapped: should work when pairs are duplicated"""
        s = self.gapped
        p = self.duplicates
        obs_seq, obs_pairs = ungapped_to_gapped(s,p)