Did I find the right examples for you? yes no

All Samples(72)  |  Call(58)  |  Derive(0)  |  Import(14)

src/c/o/cogent-1.5.3/cogent/core/moltype.py   cogent(Download)
__status__ = "Production"
 
from cogent.core.alphabet import CharAlphabet, Enumeration, Alphabet, \
    AlphabetError, _make_complement_array
from cogent.util.misc import FunctionWrapper, add_lowercase, iterable, if_
                self.Alphabet = motifset
            elif max(len(motif) for motif in motifset) == 1:
                self.Alphabet = CharAlphabet(motifset, MolType=self)
            else:
                self.Alphabet = Alphabet(motifset, MolType=self)

src/p/y/pycogent-HEAD/cogent/core/moltype.py   pycogent(Download)
__status__ = "Production"
 
from cogent.core.alphabet import CharAlphabet, Enumeration, Alphabet, \
    AlphabetError, _make_complement_array
from cogent.util.misc import FunctionWrapper, add_lowercase, iterable, if_
                self.Alphabet = motifset
            elif max(len(motif) for motif in motifset) == 1:
                self.Alphabet = CharAlphabet(motifset, MolType=self)
            else:
                self.Alphabet = Alphabet(motifset, MolType=self)

src/c/o/cogent-1.5.3/cogent/core/usage.py   cogent(Download)
from cogent.core.genetic_code import GeneticCodes, GeneticCode as GenCodeClass
from cogent.core.info import Info as InfoClass
from cogent.core.alphabet import CharAlphabet
from string import upper
 
__status__ = "Production"
 
RnaBases = CharAlphabet('UCAG')
DnaBases = CharAlphabet('TCAG')
AminoAcids = CharAlphabet('ACDEFGHIKLMNPQRSTVWY*') # * denotes termination
AB = CharAlphabet('ab') #used for testing

src/p/y/pycogent-HEAD/cogent/core/usage.py   pycogent(Download)
from cogent.core.genetic_code import GeneticCodes, GeneticCode as GenCodeClass
from cogent.core.info import Info as InfoClass
from cogent.core.alphabet import CharAlphabet
from string import upper
 
__status__ = "Production"
 
RnaBases = CharAlphabet('UCAG')
DnaBases = CharAlphabet('TCAG')
AminoAcids = CharAlphabet('ACDEFGHIKLMNPQRSTVWY*') # * denotes termination
AB = CharAlphabet('ab') #used for testing

src/c/o/cogent-1.5.3/cogent/evolve/coevolution.py   cogent(Download)
from cogent.core.moltype import IUPAC_gap, IUPAC_missing
from cogent.core.profile import Profile
from cogent.core.alphabet import CharAlphabet, Alphabet
from cogent.maths.stats.distribution import binomial_exact
from cogent.maths.stats.special import ROUND_ERROR
# PROTEIN's alphabet contains U, so redefining the alphabet for now 
# rather than use PROTEIN.Alphabet. May want to revist this decision...
AAGapless = CharAlphabet('ACDEFGHIKLMNPQRSTVWY')
default_sca_alphabet = AAGapless
#AAGapless = PROTEIN.Alphabet

src/p/y/pycogent-HEAD/cogent/evolve/coevolution.py   pycogent(Download)
from cogent.core.moltype import IUPAC_gap, IUPAC_missing
from cogent.core.profile import Profile
from cogent.core.alphabet import CharAlphabet, Alphabet
from cogent.maths.stats.distribution import binomial_exact
from cogent.maths.stats.special import ROUND_ERROR
# PROTEIN's alphabet contains U, so redefining the alphabet for now 
# rather than use PROTEIN.Alphabet. May want to revist this decision...
AAGapless = CharAlphabet('ACDEFGHIKLMNPQRSTVWY')
default_sca_alphabet = AAGapless
#AAGapless = PROTEIN.Alphabet

src/c/o/cogent-1.5.3/tests/test_core/test_alphabet.py   cogent(Download)
Note: individual Alphabets are typically in MolType and are tested there.
"""
from cogent.core.alphabet import Enumeration, get_array_type, \
    uint8, uint16, uint32, array, JointEnumeration, CharAlphabet, \
    _make_translation_tables, _make_complement_array
from cogent.core.moltype import RNA
 
from cogent.util.unit_test import TestCase, main
 
DnaBases = CharAlphabet('TCAG')
 
DnaBases = CharAlphabet('TCAG')
RnaBases = CharAlphabet('UCAG')
AminoAcids = CharAlphabet('ACDEFGHIKLMNPQRSTVWY')
 
    def test_init(self):
        """CharAlphabet init should make correct translation tables"""
        r = CharAlphabet('UCAG')
        i2c, c2i = r._indices_to_chars, r._chars_to_indices
        s = array([0,0,1,0,3,2], 'b').tostring()

src/p/y/pycogent-HEAD/tests/test_core/test_alphabet.py   pycogent(Download)
Note: individual Alphabets are typically in MolType and are tested there.
"""
from cogent.core.alphabet import Enumeration, get_array_type, \
    uint8, uint16, uint32, array, JointEnumeration, CharAlphabet, \
    _make_translation_tables, _make_complement_array
from cogent.core.moltype import RNA
 
from cogent.util.unit_test import TestCase, main
 
DnaBases = CharAlphabet('TCAG')
 
DnaBases = CharAlphabet('TCAG')
RnaBases = CharAlphabet('UCAG')
AminoAcids = CharAlphabet('ACDEFGHIKLMNPQRSTVWY')
 
    def test_init(self):
        """CharAlphabet init should make correct translation tables"""
        r = CharAlphabet('UCAG')
        i2c, c2i = r._indices_to_chars, r._chars_to_indices
        s = array([0,0,1,0,3,2], 'b').tostring()

src/c/o/cogent-1.5.3/tests/test_evolve/test_coevolution.py   cogent(Download)
from cogent.util.unit_test import TestCase, main
from cogent import DNA, RNA, PROTEIN, LoadTree, LoadSeqs
from cogent.core.alphabet import CharAlphabet
from cogent.maths.stats.util import Freqs
from cogent.core.profile import Profile
from cogent.core.alphabet import CharAlphabet, Alphabet
        a = list('DCA')
        self.assertFloatEqual(probs_from_dict(d,a),[0.52,0.23,0.25])
        a = CharAlphabet('DCA')
        self.assertFloatEqual(probs_from_dict(d,a),[0.52,0.23,0.25])
 
    def test_validate_alphabet_valid(self):
        """validate_alphabet: does nothing on compatible alpabet and freqs 
        """
        validate_alphabet('AB',{'A':0.5,'B':0.5})
        validate_alphabet(CharAlphabet('AB'),{'A':0.5,'B':0.5})

src/p/y/pycogent-HEAD/tests/test_evolve/test_coevolution.py   pycogent(Download)
from cogent.util.unit_test import TestCase, main
from cogent import DNA, RNA, PROTEIN, LoadTree, LoadSeqs
from cogent.core.alphabet import CharAlphabet
from cogent.maths.stats.util import Freqs
from cogent.core.profile import Profile
from cogent.core.alphabet import CharAlphabet, Alphabet
        a = list('DCA')
        self.assertFloatEqual(probs_from_dict(d,a),[0.52,0.23,0.25])
        a = CharAlphabet('DCA')
        self.assertFloatEqual(probs_from_dict(d,a),[0.52,0.23,0.25])
 
    def test_validate_alphabet_valid(self):
        """validate_alphabet: does nothing on compatible alpabet and freqs 
        """
        validate_alphabet('AB',{'A':0.5,'B':0.5})
        validate_alphabet(CharAlphabet('AB'),{'A':0.5,'B':0.5})

  1 | 2  Next