[Seqinr-commits] r2091 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 24 12:12:13 CET 2018


Author: jeanlobry
Date: 2018-02-24 12:12:13 +0100 (Sat, 24 Feb 2018)
New Revision: 2091

Modified:
   pkg/man/read.alignment.Rd
   pkg/man/read.fasta.Rd
Log:
 

Modified: pkg/man/read.alignment.Rd
===================================================================
--- pkg/man/read.alignment.Rd	2018-02-24 11:11:36 UTC (rev 2090)
+++ pkg/man/read.alignment.Rd	2018-02-24 11:12:13 UTC (rev 2091)
@@ -6,7 +6,7 @@
  These formats are used to store nucleotide or protein multiple alignments. 
 }
 \usage{
-read.alignment(file, format, forceToLower = TRUE)
+read.alignment(file, format, forceToLower = TRUE, ...)
 }
 \arguments{
   \item{file}{the name of the file which the aligned sequences are to be read from. 
@@ -17,6 +17,8 @@
   \item{forceToLower}{a logical defaulting to TRUE stating whether the returned
     characters in the sequence should be in lower case (introduced in seqinR
     release 1.1-3).}
+  \item{...}{For the \code{fasta} format, extra arguments are passed to the
+    \code{\link{read.fasta}} function.}
 }
 \details{
   \describe{
@@ -112,5 +114,19 @@
 data(msf); stopifnot(identical(msf, msf.res))
 data(fasta); stopifnot(identical(fasta, fasta.res))
 
+#
+# Example of using extra arguments from the read.fasta function, here to keep
+# whole headers for sequences names.
+#
+
+whole.header.test <- read.alignment(file = system.file("sequences/LTPs128_SSU_aligned_First_Two.fasta", 
+ package = "seqinr"), format = "fasta", whole.header = TRUE)
+whole.header.test$nam
+
+# Sould be:
+#
+# [1] "D50541\t1\t1411\t1411bp\trna\tAbiotrophia defectiva\tAerococcaceae"      
+# [2] "KP233895\t1\t1520\t1520bp\trna\tAbyssivirga alkaniphila\tLachnospiraceae"
+#
 }
 

Modified: pkg/man/read.fasta.Rd
===================================================================
--- pkg/man/read.fasta.Rd	2018-02-24 11:11:36 UTC (rev 2090)
+++ pkg/man/read.fasta.Rd	2018-02-24 11:12:13 UTC (rev 2091)
@@ -10,6 +10,7 @@
 read.fasta(file = system.file("sequences/ct.fasta.gz", package = "seqinr"), 
   seqtype = c("DNA", "AA"), as.string = FALSE, forceDNAtolower = TRUE,
   set.attributes = TRUE, legacy.mode = TRUE, seqonly = FALSE, strip.desc = FALSE,
+  whole.header = FALSE,
   bfa = FALSE, sizeof.longlong = .Machine$sizeof.longlong,
   endian = .Platform$endian, apply.mask = TRUE)
 }
@@ -32,6 +33,9 @@
    by a factor 3)}
   \item{strip.desc}{if TRUE the '>' at the beginning of the description lines is removed
   in the annotations of the sequences}
+  \item{whole.header}{if TRUE the whole header line, except the first '>' character,
+    is kept for sequence name. If FALSE, the default, the name is truncated at the first 
+    space (" ") character.}
   \item{bfa}{logical. If TRUE the fasta file is in MAQ binary format (see details). 
     Only for DNA sequences.}
   \item{sizeof.longlong}{the number of bytes in a C \code{long long} type.



More information about the Seqinr-commits mailing list