Skip to content

Commit

Permalink
correct enc_r and encp_r's POD
Browse files Browse the repository at this point in the history
  • Loading branch information
fortune9 committed May 3, 2015
1 parent 43a4822 commit a31339f
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 102 deletions.
26 changes: 12 additions & 14 deletions lib/Bio/CUA/CUB/Calculator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -377,19 +377,18 @@ sub enc
Title : enc_r
Usage : $encValue = $self->enc_r($seq,[$minTotal]);
Function: similar to the method L</enc>, except that calculating the
missing F values using a different way, relying on the relationship
of homozygosity and degree of degeneracy.
Function: similar to the method L</enc>, except that missing F values
are estimated in a different way.
Returns : a number, or undef if failed
Args : for sequence see L</"sequence input">.
Optional argument I<minTotal> specifies minimal count
for an amino acid; if observed count is smaller than this count, this
amino acid's F will not be calculated but inferred. Deafult is 5.
Note: its difference from method L</enc> is to estimate missing Fr
using equal_ratio algorithm, that is the estimate Fx satisfying the
following equation: (1/Fx)/x=[sum(1/Fr) over r]/[sum(r) over r] where
x and r marks groups with unknown and known F values, respectively.
Note: for missing Fx of degeneracy class 'x', we first estimated the
ratio (1/Fx-1)/(x-1) by averaging the ratios of other degeneracy
classes with known F values. Then Fx is obtained by solving the simple
equation.
=cut

Expand Down Expand Up @@ -431,9 +430,8 @@ sub encp
Title : encp_r
Usage : $encpValue =
$self->encp_r($seq,[$minTotal,[$A,$T,$C,$G]]);
Function: similar to the method L</encp>, except that calculating the
missing F values using a different way, considering the
redundancy degree of each class.
Function: similar to the method L</encp>, except that missing F values
are estimated using a different way.
Returns : a number, or undef if failed
Args : for sequence see L</"sequence input">.
Expand All @@ -446,10 +444,10 @@ sub encp
default one provided when calling the method L</new>. If stil
unavailable, error occurs.
Note: its difference from method L</encp> is to estimate missing Fr
using equal_ratio algorithm, that is the estimate Fx satisfying the
following equation (1/Fx)/x=[sum(1/Fr) over r]/[sum(r) over r] where
x and r label unknown and known degeneracy groups, respectively.
Note: for missing Fx of degeneracy class 'x', we first estimated the
ratio (1/Fx-1)/(x-1) by averaging the ratios of other degeneracy
classes with known F values. Then Fx is obtained by solving the simple
equation.
=cut

Expand Down
84 changes: 42 additions & 42 deletions t/cai.out
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
CCG 0.878306878306878
ACA 0.469767441860465
CGA 0.364864864864865
CTC 0.386058981233244
TAT 0.537634408602151
CCC 1
TGC 1
GTT 0.330316742081448
AGG 0.310810810810811
TAC 1
GTG 1
ATT 0.414225941422594
AGA 0.243243243243243
CTA 0.190348525469169
AAT 0.604477611940298
TGT 0.23
CGT 0.371621621621622
GCA 0.274336283185841
TTA 0.0857908847184987
AGC 1
GCA 0.274336283185841
CTG 1
GGT 0.335616438356164
CTT 0.142091152815013
AGT 0.450184501845018
ACT 0.288372093023256
GAT 0.892857142857143
ATC 1
TGC 1
CAC 1
CCA 0.587301587301587
TCA 0.254612546125461
CTC 0.386058981233244
TTC 1
AAA 0.398576512455516
ACG 0.744186046511628
CCT 0.407407407407407
CTT 0.142091152815013
TTG 0.329758713136729
AAT 0.604477611940298
ATA 0.284518828451883
CGC 1
GAG 1
ATT 0.414225941422594
CCC 1
CGA 0.364864864864865
GTA 0.194570135746606
AGG 0.310810810810811
CGG 0.540540540540541
TCC 0.845018450184502
TAT 0.537634408602151
GAC 1
TCT 0.191881918819188
CGC 1
AAC 1
ACG 0.744186046511628
CCG 0.878306878306878
GGA 0.537671232876712
GAA 0.394927536231884
GCT 0.309734513274336
CAT 0.537688442211055
GGC 1
CAA 0.380352644836272
GCC 1
AAG 1
CGT 0.371621621621622
ACA 0.469767441860465
ACC 1
TCG 0.712177121771218
GAC 1
CAG 1
CTA 0.190348525469169
GGG 0.174657534246575
ACC 1
GCG 0.47787610619469
TCG 0.712177121771218
TAC 1
AGA 0.243243243243243
TTA 0.0857908847184987
GGT 0.335616438356164
CTG 1
GTC 0.565610859728507
TTC 1
GGC 1
GCT 0.309734513274336
GTA 0.194570135746606
TTT 0.450261780104712
GTG 1
GCC 1
CGG 0.540540540540541
AGT 0.450184501845018
GGA 0.537671232876712
AAG 1
GTC 0.565610859728507
ATC 1
ATA 0.284518828451883
TCA 0.254612546125461
CCA 0.587301587301587
CAT 0.537688442211055
TCT 0.191881918819188
AAC 1
92 changes: 46 additions & 46 deletions t/tai.out
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
ATC 0.309751434034417
ACT 0.430210325047801
GAT 0.394837476099426
CTA 0.0956261950286807
GTG 0.365200764818356
ATT 0.430210325047801
TAC 0.430210325047801
AGA 0.1434034416826
CCC 0.240917782026769
TGC 0.334608030592734
AGC 0.286806883365201
CAC 0.239005736137667
TGG 0.397705544933078
TCA 0.095640535372849
CCA 0.239039196940727
CTC 0.17208413001912
ACG 0.235181644359465
AAA 0.286806883365201
TTG 0.252390057361377
CTT 0.239005736137667
CCT 0.334608030592734
ATA 0.0956453154875717
AAT 0.338432122370937
CCG 0.315487571701721
AGG 0.189292543021033
GTT 0.286806883365201
ACA 0.286849904397706
TGT 0.197418738049713
CGA 0.478059273422562
CTC 0.17208413001912
TAT 0.253824091778203
GCA 0.09565965583174
CGT 0.478011472275335
GCG 0.173996175908222
TCG 0.221797323135755
AGA 0.1434034416826
TAC 0.430210325047801
CTG 0.413001912045889
TTA 0.191204588910134
GGT 0.394837476099426
AGC 0.286806883365201
AAT 0.338432122370937
TGT 0.197418738049713
TTC 0.382409177820268
GGC 0.669216061185469
GTC 0.206500956022945
GCC 0.413001912045889
GTG 0.365200764818356
TTT 0.225621414913958
AAA 0.286806883365201
GAT 0.394837476099426
CAC 0.239005736137667
GGT 0.394837476099426
ACT 0.430210325047801
CTT 0.239005736137667
AGT 0.169216061185469
CGG 0.152963671128107
AAG 0.713193116634799
CGC 0.344168260038241
TTG 0.252390057361377
CCT 0.334608030592734
CAA 0.191204588910134
GCC 0.413001912045889
TCC 0.275334608030593
ACG 0.235181644359465
GGC 0.669216061185469
CCG 0.315487571701721
GAA 0.286806883365201
GGA 0.286806883365201
CCC 0.240917782026769
ATT 0.430210325047801
CGG 0.152963671128107
AGG 0.189292543021033
GAG 1
ACC 0.309751434034417
ACA 0.286849904397706
TGG 0.397705544933078
AAG 0.713193116634799
CGT 0.478011472275335
GCT 0.573613766730402
GTA 0.0956309751434034
CGA 0.478059273422562
TAT 0.253824091778203
GCG 0.173996175908222
GAC 0.669216061185469
TCC 0.275334608030593
GAA 0.286806883365201
CAG 0.443594646271511
GGG 0.0917782026768642
TCG 0.221797323135755
AAC 0.573613766730402
CCA 0.239039196940727
TCA 0.095640535372849
TCT 0.382409177820268
CGC 0.344168260038241
GCT 0.573613766730402
CAG 0.443594646271511
CAA 0.191204588910134
CAT 0.141013384321224
CTA 0.0956261950286807
GGG 0.0917782026768642
ACC 0.309751434034417
TTT 0.225621414913958
ATA 0.0956453154875717
ATC 0.309751434034417
GTC 0.206500956022945

0 comments on commit a31339f

Please sign in to comment.