[Seqinr-commits] r2046 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 3 19:36:07 CEST 2017


Author: jeanlobry
Date: 2017-07-03 19:36:07 +0200 (Mon, 03 Jul 2017)
New Revision: 2046

Modified:
   pkg/R/kaks.R
Log:
adding the new argument rmgap to kaks

Modified: pkg/R/kaks.R
===================================================================
--- pkg/R/kaks.R	2017-07-03 17:35:32 UTC (rev 2045)
+++ pkg/R/kaks.R	2017-07-03 17:36:07 UTC (rev 2046)
@@ -1,4 +1,4 @@
-kaks <- function(x, verbose=FALSE, debug = FALSE, forceUpperCase = TRUE){
+kaks <- function(x, verbose = FALSE, debug = FALSE, forceUpperCase = TRUE, rmgap = TRUE){
     #
     # Check argument class:
     #
@@ -41,9 +41,17 @@
       }
     }
     #
+    # Choose option for gap removal
+    #
+    if(rmgap) {
+      gaprm = 0 # positions with at least one gap are removed
+    } else {
+      gaprm = 1 # only all gap positions are removed
+    }
+    #
     # Call internal C function:
     #
-    l <- .Call("kaks", x$seq, x$nb, debug, PACKAGE = "seqinr")
+    l <- .Call("kaks", x$seq, x$nb, debug, gaprm, PACKAGE = "seqinr")
     if(debug){
       cat("<--- Result l storage is --->\n")
       print(str(l))



More information about the Seqinr-commits mailing list