Did I find the right examples for you? yes no

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

src/c/o/cogent-1.5.3/cogent/parse/ct.py   cogent(Download)
from string              import split,atof
from cogent.struct.rna2d import Pairs
from cogent.struct.pairs_util  import adjust_base
 
__author__ = "Shandy Wikman"
        if count==1 or new_struct(line):#first line or new struct line.
            if count > 1:
                struct = adjust_base(struct,-1)
                struct = Pairs(struct).directed()
                struct.sort()
                struct.append(pair) 
    #structs are one(1) based, adjust to zero based
    struct = adjust_base(struct,-1)
    struct = Pairs(struct).directed()
    struct.sort()

src/p/y/pycogent-HEAD/cogent/parse/ct.py   pycogent(Download)
from string              import split,atof
from cogent.struct.rna2d import Pairs
from cogent.struct.pairs_util  import adjust_base
 
__author__ = "Shandy Wikman"
        if count==1 or new_struct(line):#first line or new struct line.
            if count > 1:
                struct = adjust_base(struct,-1)
                struct = Pairs(struct).directed()
                struct.sort()
                struct.append(pair) 
    #structs are one(1) based, adjust to zero based
    struct = adjust_base(struct,-1)
    struct = Pairs(struct).directed()
    struct.sort()

src/c/o/cogent-1.5.3/cogent/parse/ilm.py   cogent(Download)
#!/usr/bin/env python
 
from cogent.struct.rna2d      import Pairs
from cogent.struct.knots      import opt_single_random
from cogent.struct.pairs_util import adjust_base
            pairs.append(line) 
 
    pairs = adjust_base(pairs,-1)
    tmp = Pairs(pairs).directed()
    tmp.sort()

src/c/o/cogent-1.5.3/cogent/parse/column.py   cogent(Download)
from string import split
from cogent.struct.rna2d import Pairs
from cogent.struct.pairs_util import adjust_base
 
__author__ = "Shandy Wikman"
        if line.startswith('; ******'): #structure part ends
            record = False
            struct =  adjust_base(struct,-1)
            struct = Pairs(struct).directed()#remove duplicates
            struct.sort()

src/p/y/pycogent-HEAD/cogent/parse/ilm.py   pycogent(Download)
#!/usr/bin/env python
 
from cogent.struct.rna2d      import Pairs
from cogent.struct.knots      import opt_single_random
from cogent.struct.pairs_util import adjust_base
            pairs.append(line) 
 
    pairs = adjust_base(pairs,-1)
    tmp = Pairs(pairs).directed()
    tmp.sort()

src/p/y/pycogent-HEAD/cogent/parse/column.py   pycogent(Download)
from string import split
from cogent.struct.rna2d import Pairs
from cogent.struct.pairs_util import adjust_base
 
__author__ = "Shandy Wikman"
        if line.startswith('; ******'): #structure part ends
            record = False
            struct =  adjust_base(struct,-1)
            struct = Pairs(struct).directed()#remove duplicates
            struct.sort()

src/c/o/cogent-1.5.3/cogent/parse/foldalign.py   cogent(Download)
#!/usr/bin/env python
 
from string import split
from cogent.struct.rna2d  import Pairs,ViennaStructure
from cogent.struct.pairs_util import adjust_base

src/p/y/pycogent-HEAD/cogent/parse/foldalign.py   pycogent(Download)
#!/usr/bin/env python
 
from string import split
from cogent.struct.rna2d  import Pairs,ViennaStructure
from cogent.struct.pairs_util import adjust_base

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,\
        offset = -1
        expected = [(0,20),(1,14),(2,12),(3,10),(4,9),(5,8)]
        obs_pairs = adjust_base(pairs, offset)
        self.assertEqual(obs_pairs, expected)
 
        offset = -1
        expected = [(0,20),(1,14),(2,12),(3,10),(4,9),(5,8)]
        obs_pairs = adjust_base(pairs, offset)
        self.assertEqual(obs_pairs, expected)
 

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,\
        offset = -1
        expected = [(0,20),(1,14),(2,12),(3,10),(4,9),(5,8)]
        obs_pairs = adjust_base(pairs, offset)
        self.assertEqual(obs_pairs, expected)
 
        offset = -1
        expected = [(0,20),(1,14),(2,12),(3,10),(4,9),(5,8)]
        obs_pairs = adjust_base(pairs, offset)
        self.assertEqual(obs_pairs, expected)