Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# cogent.maths.stats.cai.util.cai_3

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

```from math import log, exp
from operator import mul
from cogent.maths.stats.cai.util import cu, as_rna, synonyms_to_rna, \
get_synonyms, sum_codon_freqs, norm_to_max, arithmetic_mean, \
```
```        ref_freqs_2.update({'UUU':2,'UUC':1})
gene_freqs = {'AGA':3,'AGG':1,'CCC':2,'CCA':1,'UUU':1, 'UUC':2}
obs = cai_3(ref_freqs_2, gene_freqs, average=arithmetic_mean)
family_vals = [[1,1,1,.5],[1,1,.2],[1,.5,.5]]
family_averages = map(amean, family_vals)
```
```        ref_freqs_2.update({'UUU':2,'UUC':1})
gene_freqs = {'AGA':3,'AGG':1,'CCC':2,'CCA':1,'UUU':1, 'UUC':2}
obs = cai_3(ref_freqs_2, gene_freqs, average=geometric_mean)
family_vals = [[1,1,1,.5],[1,1,.2],[1,.5,.5]]
family_averages = map(gmean, family_vals)
```
```        ref_freqs_2.update({'UUU':2,'UUC':1})
gene_freqs = {'AGA':3,'AGG':1,'CCC':2,'CCA':1,'UUU':1, 'UUC':2}
obs = cai_3(ref_freqs_2, gene_freqs, average='eyre_walker')
family_vals = [[1,1,1,.5],[1,1,.2],[1,.5,.5]]
family_averages = map(gmean, family_vals)
```
```            'CUU':42704, 'CUC':35873, 'CUA':15275, 'CUG':168885})
gene_freqs={'UUU':6, 'UUC':3, 'CUU':3, 'CUC':2, 'CUG':8}
obs = cai_3(ref_freqs, gene_freqs, average=geometric_mean)
family_vals =  [6*[1]+3*[56591./78743],\
3*[42704./168885] + 2*[35873./168885]+8*[1]]
```

```from math import log, exp
from operator import mul
from cogent.maths.stats.cai.util import cu, as_rna, synonyms_to_rna, \
get_synonyms, sum_codon_freqs, norm_to_max, arithmetic_mean, \
```
```        ref_freqs_2.update({'UUU':2,'UUC':1})
gene_freqs = {'AGA':3,'AGG':1,'CCC':2,'CCA':1,'UUU':1, 'UUC':2}
obs = cai_3(ref_freqs_2, gene_freqs, average=arithmetic_mean)
family_vals = [[1,1,1,.5],[1,1,.2],[1,.5,.5]]
family_averages = map(amean, family_vals)
```
```        ref_freqs_2.update({'UUU':2,'UUC':1})
gene_freqs = {'AGA':3,'AGG':1,'CCC':2,'CCA':1,'UUU':1, 'UUC':2}
obs = cai_3(ref_freqs_2, gene_freqs, average=geometric_mean)
family_vals = [[1,1,1,.5],[1,1,.2],[1,.5,.5]]
family_averages = map(gmean, family_vals)
```
```        ref_freqs_2.update({'UUU':2,'UUC':1})
gene_freqs = {'AGA':3,'AGG':1,'CCC':2,'CCA':1,'UUU':1, 'UUC':2}
obs = cai_3(ref_freqs_2, gene_freqs, average='eyre_walker')
family_vals = [[1,1,1,.5],[1,1,.2],[1,.5,.5]]
family_averages = map(gmean, family_vals)
```
```            'CUU':42704, 'CUC':35873, 'CUA':15275, 'CUG':168885})
gene_freqs={'UUU':6, 'UUC':3, 'CUU':3, 'CUC':2, 'CUG':8}
obs = cai_3(ref_freqs, gene_freqs, average=geometric_mean)
family_vals =  [6*[1]+3*[56591./78743],\
3*[42704./168885] + 2*[35873./168885]+8*[1]]
```