[Seqinr-forum] Bug in kaks()

Darren Obbard darren.obbard at ed.ac.uk
Thu Apr 23 13:35:41 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.


-- 

Darren Obbard
Institute of Evolutionary Biology
Room 123, Ash 2, Ashworth Labs
Kings Buildings
University of Edinburgh, UK
darren.obbard at ed.ac.uk
Lab: 0131 651 3614   --  Office [Note Change!]: 0131 650 5476
Mobile: 07968 838 635   --  Home: 0131 466 0341
http://www.biology.ed.ac.uk/research/groups/obbard/

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



More information about the Seqinr-forum mailing list