[Seqinr-forum] Bug in kaks()
Jean lobry
lobry at biomserv.univ-lyon1.fr
Thu Apr 23 17:48:44 CEST 2009
>Hi,
>
>there's a bug in kaks().
>
>using the test case:
>
> >seq1
>AAAGGGCCCTTT
> >seq2
>AAAGGGCCCTT-
>
>e.g.:
>
> > temp_align
>$nb
>[1] 2
>
>$nam
>[1] "seq1" "seq2"
>
>$seq
>[1] "AAAGGGCCCTTT" "AAAGGGCCCTT-"
>
>$com
>[1] NA
>
>attr(,"class")
>[1] "alignment"
>
>I get
>
> > kaks(temp_align)
>Error in kaks(temp_align) : Nombre de nt non multiple de trois.
>
>This must be in the c, since its not in the R.
>
>clearly both sequences have a multiple of 3 nts,
>
> > nchar(temp_align$seq[1])
>[1] 12
>
>And this isn't picked up by the test in the function
>
>So it must be that the underlying C has a problem with (out-of-frame?) gaps.
>
>However, the documentation says "Codons with gaps are not used for
>computations", which rather suggests that it will at least fail
>helpfully when there are gaps. If this is intended as a 'feature' then
>there should be some warning in the manual.
>
Dear Darren,
thanks for the report. This is not a bug but an intended, poorly
documented, feature.
What is checked here is that after gap removal the lenght of the
sequences should still have a multiple of 3 nucleotides.
You can use the function reverse.align() to reverse-translate
your alignment from the aa level to the nucleic level. This ensures
that your Ka Ks results are based on a codon-by-codon comparison.
I'll try to improve the documentation for release 2.0-3.
Best,
Z.
--
Jean R. Lobry (lobry at biomserv.univ-lyon1.fr)
Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - LYON I,
43 Bd 11/11/1918, F-69622 VILLEURBANNE CEDEX, FRANCE
allo : +33 472 43 27 56 fax : +33 472 43 13 88
http://pbil.univ-lyon1.fr/members/lobry/
More information about the Seqinr-forum
mailing list