Did I find the right examples for you? yes no

All Samples(534)  |  Call(498)  |  Derive(0)  |  Import(36)

src/c/o/cogent-1.5.3/cogent/struct/knots.py   cogent(Download)
from random import choice
from numpy import sum, average, zeros
from cogent.struct.rna2d import Pairs
from cogent.util.dict2d import Dict2D
 
        self.Length = Length
        self.Id = Id
        self.Pairs = Pairs()
        for i in range(self.Length):
            self.Pairs.append((self.Start+i, self.End-i)) 
        raise ValueError("PairedRegion should contain at least one pair")
    # preprocess
    raw_pairs = Pairs(pairs)
    if raw_pairs.hasConflicts():
        raise ValueError("Cannot handle pairs with conflicts")
            in the result. The resulting Pairs object is sorted.
        """
        result = Pairs()
        for pr in self:
            result.extend(pr.Pairs)
        ID 1, etc.
    """
    p = Pairs(pairs)
    if not p:
        return PairedRegions()

src/p/y/pycogent-HEAD/cogent/struct/knots.py   pycogent(Download)
from random import choice
from numpy import sum, average, zeros
from cogent.struct.rna2d import Pairs
from cogent.util.dict2d import Dict2D
 
        self.Length = Length
        self.Id = Id
        self.Pairs = Pairs()
        for i in range(self.Length):
            self.Pairs.append((self.Start+i, self.End-i)) 
        raise ValueError("PairedRegion should contain at least one pair")
    # preprocess
    raw_pairs = Pairs(pairs)
    if raw_pairs.hasConflicts():
        raise ValueError("Cannot handle pairs with conflicts")
            in the result. The resulting Pairs object is sorted.
        """
        result = Pairs()
        for pr in self:
            result.extend(pr.Pairs)
        ID 1, etc.
    """
    p = Pairs(pairs)
    if not p:
        return PairedRegions()

src/c/o/cogent-1.5.3/cogent/struct/pairs_util.py   cogent(Download)
from string import strip
from numpy import array, sqrt, searchsorted, flatnonzero, take, sum
from cogent.struct.rna2d import Pairs
from cogent.parse.fasta import MinimalFastaParser
 
    if not isinstance(offset, int):
        raise PairsAdjustmentError("adjust_base: offset should be integer")
    result = Pairs()
    for x, y in pairs:
        if x is not None:
        want to degap it, use a mapping from gapped to ungapped.
    """
    result = Pairs()
    for x,y in pairs:
        if x is None:
    """
    if not gap_list:
        result = Pairs()
        result.extend(pairs)
        return result
 
    g = array(gap_list)
    result = Pairs()

src/p/y/pycogent-HEAD/cogent/struct/pairs_util.py   pycogent(Download)
from string import strip
from numpy import array, sqrt, searchsorted, flatnonzero, take, sum
from cogent.struct.rna2d import Pairs
from cogent.parse.fasta import MinimalFastaParser
 
    if not isinstance(offset, int):
        raise PairsAdjustmentError("adjust_base: offset should be integer")
    result = Pairs()
    for x, y in pairs:
        if x is not None:
        want to degap it, use a mapping from gapped to ungapped.
    """
    result = Pairs()
    for x,y in pairs:
        if x is None:
    """
    if not gap_list:
        result = Pairs()
        result.extend(pairs)
        return result
 
    g = array(gap_list)
    result = Pairs()

src/c/o/cogent-1.5.3/cogent/parse/comrna.py   cogent(Download)
"""
from cogent.util.transform import make_trans
from cogent.struct.rna2d   import Pairs
from cogent.struct.knots   import opt_single_random
from string                import index
                key = tuple(block[-1])
 
    winner = Pairs(key)
    indx = tmp_list.index(winner)-1
    result.append([tmp_list[indx],winner]) #adds the most common structure first
    del frequency[key]
    for i in frequency.keys(): #rest of structures added
        i = Pairs(i)
            pairs.extend(zip(oL,cL.__reversed__()))
 
        yield Pairs(pairs),Fseq
 
 

src/p/y/pycogent-HEAD/cogent/parse/comrna.py   pycogent(Download)
"""
from cogent.util.transform import make_trans
from cogent.struct.rna2d   import Pairs
from cogent.struct.knots   import opt_single_random
from string                import index
                key = tuple(block[-1])
 
    winner = Pairs(key)
    indx = tmp_list.index(winner)-1
    result.append([tmp_list[indx],winner]) #adds the most common structure first
    del frequency[key]
    for i in frequency.keys(): #rest of structures added
        i = Pairs(i)
            pairs.extend(zip(oL,cL.__reversed__()))
 
        yield Pairs(pairs),Fseq
 
 

src/c/o/cogent-1.5.3/cogent/parse/nupack.py   cogent(Download)
#!/usr/bin/env python
 
from string                import strip,split,atof
from cogent.util.transform import make_trans
from cogent.struct.rna2d   import Pairs,ViennaStructure
    for line in lines:
        if line.startswith('Error'):#Error no structure found
            result = [Pairs([])] #return empty pairs list
            return result
        if line.startswith('Sequence and a Minimum Energy Structure'):

src/p/y/pycogent-HEAD/cogent/parse/nupack.py   pycogent(Download)
#!/usr/bin/env python
 
from string                import strip,split,atof
from cogent.util.transform import make_trans
from cogent.struct.rna2d   import Pairs,ViennaStructure
    for line in lines:
        if line.startswith('Error'):#Error no structure found
            result = [Pairs([])] #return empty pairs list
            return result
        if line.startswith('Sequence and a Minimum Energy Structure'):

src/c/o/cogent-1.5.3/cogent/parse/bpseq.py   cogent(Download)
from __future__ import division
from string import strip
from cogent.struct.rna2d import Vienna, Pairs
from cogent.struct.knots import opt_single_random
from cogent.core.info import Info
    #create dictionary/list for sequence and structure
    seq_dict = {}
    pairs = Pairs()
 
    for line in residue_lines:

src/c/o/cogent-1.5.3/cogent/parse/cmfinder.py   cogent(Download)
#!/usr/bin/env python
 
from cogent.util.transform import make_trans
from cogent.struct.rna2d   import wuss_to_vienna, Pairs
from cogent.parse.rfam     import RfamParser

  1 | 2 | 3 | 4  Next