[Seqinr-commits] r2041 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 3 15:00:02 CEST 2017


Author: jeanlobry
Date: 2017-07-03 15:00:02 +0200 (Mon, 03 Jul 2017)
New Revision: 2041

Modified:
   pkg/man/kaks.Rd
Log:
adding a routine test to check that non-finite values are never returned by kaks() function

Modified: pkg/man/kaks.Rd
===================================================================
--- pkg/man/kaks.Rd	2017-07-03 12:58:52 UTC (rev 2040)
+++ pkg/man/kaks.Rd	2017-07-03 13:00:02 UTC (rev 2041)
@@ -98,4 +98,15 @@
  Darren <- read.alignment(file = system.file("sequences/DarrenObbard.fasta", package = "seqinr"),
   format = "fasta")
  stopifnot( all.equal(kaks(Darren)$ka[1], 0) )
+#
+# As from seqinR 3.4-0, non-finite values should never be returned for
+# Ka and Ks even for small sequences. The following test checks that this
+# is true for an alignement of the 64 codons, so that we compute Ka and
+# Ks for all possible pairs of codons.
+#
+wrd <- as.alignment(nb = 64, nam = words(), seq = words())
+res <- kaks(wrd)
+if(any(!is.finite(res$ka))) stop("Non finite value returned for Ka")
+if(any(!is.finite(res$ks))) stop("Non finite value returned for Ks")
+
 }



More information about the Seqinr-commits mailing list