[Seqinr-commits] r1702 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Nov 7 09:10:16 CET 2009


Author: lobry
Date: 2009-11-07 09:10:16 +0100 (Sat, 07 Nov 2009)
New Revision: 1702

Modified:
   pkg/man/comp.Rd
Log:
fix the bug reported by Darren Obbard

Modified: pkg/man/comp.Rd
===================================================================
--- pkg/man/comp.Rd	2009-11-07 08:09:55 UTC (rev 1701)
+++ pkg/man/comp.Rd	2009-11-07 08:10:16 UTC (rev 1702)
@@ -12,8 +12,8 @@
 }
 \arguments{
   \item{seq}{ a DNA sequence as a vector of single chars }
-  \item{forceToLower}{ if TRUE character in seq are forced to lower case}
-  \item{ambiguous}{ if TRUE ambiguous bases in seq are handled} 
+  \item{forceToLower}{ if TRUE characters in \code{seq} are forced to lower case}
+  \item{ambiguous}{ if TRUE ambiguous bases in \code{seq} are handled} 
 }
 \value{
   a vector of characters which is the complement of the sequence,
@@ -30,26 +30,35 @@
 }
 \examples{
 ##
-## Show that comp() does not return the reverve complementary strand:
+## Show that comp() does *not* return the reverve complementary strand:
 ##
+
 c2s(comp(s2c("aaaattttggggcccc")))
+
 ##
 ## Show how to get the reverse complementary strand:
 ##
+
 c2s(rev(comp(s2c("aaaattttggggcccc"))))
+
 ##
 ## Show what happens with non allowed values:
 ##
+
 c2s(rev(comp(s2c("aaaaXttttYggggZcccc"))))
+
 ##
 ## Show what happens with ambiguous bases:
 ##
+
 allbases <- s2c("abcdghkmstvwn")
 comp(allbases) # NA are produced
 comp(allbases, ambiguous = TRUE) # No more NA
+
 ##
-## Routine sanity check:
+## Routine sanity checks:
 ##
+
 stopifnot(identical(comp(allbases, ambiguous = TRUE), s2c("tvghcdmksabwn")))
+stopifnot(identical(comp(c("A", "C", "G", "T"), forceToLower = FALSE), c("T", "G", "C", "A")))
 }
-\keyword{ manip }



More information about the Seqinr-commits mailing list