Did I find the right examples for you? yes no

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

src/c/o/cogent-1.5.3/cogent/evolve/coevolution.py   cogent(Download)
    for C,P in char_prob:
        alts = Freqs([(c, p) for c, p in char_prob if c!=C])
        alts.normalize()
        alts = Freqs([(c,w/(2*n)) for c,w in alts.items()])
        weights += [(C, alts)]

src/p/y/pycogent-HEAD/cogent/evolve/coevolution.py   pycogent(Download)
    for C,P in char_prob:
        alts = Freqs([(c, p) for c, p in char_prob if c!=C])
        alts.normalize()
        alts = Freqs([(c,w/(2*n)) for c,w in alts.items()])
        weights += [(C, alts)]

src/c/o/cogent-1.5.3/cogent/seqsim/sequence_generators.py   cogent(Download)
            })
        #frequencies should sum to 1 for MAGE display.
        known_bases.normalize()
        #Only append label field if there is one.
        label = self.Label or ''
                raise e
        super(PairFrequency, self).__init__(pair_freqs, pairs)
        self.normalize()
 
class BasePairFrequency(PairFrequency):
                    allowed_bases = IUPAC_RNA[b]
                    composition = Freqs(dict([(i,freqs[i]) for i in allowed_bases]))
                    composition.normalize()
                    result.append(composition.choice(random()))
            self.Current[:] = ''.join(result)

src/p/y/pycogent-HEAD/cogent/seqsim/sequence_generators.py   pycogent(Download)
            })
        #frequencies should sum to 1 for MAGE display.
        known_bases.normalize()
        #Only append label field if there is one.
        label = self.Label or ''
                raise e
        super(PairFrequency, self).__init__(pair_freqs, pairs)
        self.normalize()
 
class BasePairFrequency(PairFrequency):
                    allowed_bases = IUPAC_RNA[b]
                    composition = Freqs(dict([(i,freqs[i]) for i in allowed_bases]))
                    composition.normalize()
                    result.append(composition.choice(random()))
            self.Current[:] = ''.join(result)

src/c/o/cogent-1.5.3/cogent/core/usage.py   cogent(Download)
        result = {}
        normalized = Freqs(self)
        normalized.normalize()
        for aa, aa_freq in normalized.items():
            curr_codons = [c.upper().replace('T','U') for c in genetic_code[aa]]

src/p/y/pycogent-HEAD/cogent/core/usage.py   pycogent(Download)
        result = {}
        normalized = Freqs(self)
        normalized.normalize()
        for aa, aa_freq in normalized.items():
            curr_codons = [c.upper().replace('T','U') for c in genetic_code[aa]]

src/c/o/cogent-1.5.3/cogent/format/mage.py   cogent(Download)
    relevant = Freqs({'A':freqs.get('A',0), 'C':freqs.get('C',0), 
        'G':freqs.get('G',0), 'U':freqs.get('U',0) or  freqs.get('T',0)})
    relevant.normalize()
    return MagePoint((relevant['A'],relevant['C'],relevant['G']), Label=label,\
        Color=color, Radius=radius)

src/p/y/pycogent-HEAD/cogent/format/mage.py   pycogent(Download)
    relevant = Freqs({'A':freqs.get('A',0), 'C':freqs.get('C',0), 
        'G':freqs.get('G',0), 'U':freqs.get('U',0) or  freqs.get('T',0)})
    relevant.normalize()
    return MagePoint((relevant['A'],relevant['C'],relevant['G']), Label=label,\
        Color=color, Radius=radius)