[Seqinr-forum] kaks calculation problem

Trevor Krabbenhoft krabbent.j at gmail.com
Tue Nov 27 19:02:55 CET 2012


Dear Simon (et al.),

I apologize - my formula was incorrect and I can now confirm that the hand
calculation of Ka and Ks both yield the same answer as calling up $Ka and
$Ks from the KaKs function - I confirmed this with system.file data you
mentioned.  Sorry for the confusion.

Thank you!

Trevor



On Thu, Nov 22, 2012 at 2:30 AM, Simon Penel <simon.penel at univ-lyon1.fr>wrote:

>  Dear Trevor,
>
> I am not using seqinr on a regular basis,  so I am not sur I can help
> about this problem.
>
> Concerning the way ka ks is calculated you may find the information here:
>
>
> https://r-forge.r-project.org/scm/viewvc.php/pkg/src/kaks.c?view=markup&root=seqinr
>
> (or directely in the sources of seqinr if you download it at
> http://cran.r-project.org/web/packages/seqinr/index.html)
>
> Does the problem occurs with the example given in seqinr :
>
> s <- read.alignment(file = system.file("sequences/test.phylip", package =
> "seqinr"), format = "phylip")
> kaks(s)
>
>
> All the best,
>
> Simon
>
>
>
> Le 21/11/12 20:24, Trevor Krabbenhoft a écrit :
>
> Hello,
>
> I am looking for clarification on how Ka and Ks are calculated in the kaks
> function.  If I calculate by hand using formulas from Li 1993, i.e.:
>
> Ka = (Ao + (LoBo + L2B2))/(Lo + L2)
>
> Ks = (L2A2 + L4A4)/(L2 + L4) + B4
>
> I obtain different answers than if I pull out ka and ks using $ka and $ks
>
> e.g.,
>
> test.k<-kaks(myalignment)
> test.k$ka        #ka is different here than what I calculate by hand using
> $A0, $L0, $B0, etc.
>
> #The details are buried in the kaks function in C - is there a way to 'see'
> how it is calculating these?  Which should I use if I want to follow Li's
> method?
>
> #Thank you for any insight.
>
> #Trevor
>
>
>
>
> _______________________________________________
> Seqinr-forum mailing listSeqinr-forum at lists.r-forge.r-project.orghttps://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/seqinr-forum
>
>
>
> --
> Simon Penel
> Laboratoire de Biometrie et Biologie Evolutive
> Bat 711 - CNRS UMR 5558 - Universite Lyon 1
> 43 bd du 11 novembre 1918 69622 Villeurbanne Cedex
> Tel:   04 72 43 29 04      Fax:  04 72 43 13 88http://lbbe.univ-lyon1.fr/-Penel-Simon-.html?lang=fr
>
> ATTENTION NOUVELLE ADRESSE:simon.penel at univ-lyon1.fr
>
>
> _______________________________________________
> Seqinr-forum mailing list
> Seqinr-forum at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/seqinr-forum
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/seqinr-forum/attachments/20121127/c818457a/attachment.html>


More information about the Seqinr-forum mailing list