[Seqinr-commits] r2096 - in pkg: . man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 3 14:41:00 CEST 2019


Author: simonpenel
Date: 2019-09-03 14:40:59 +0200 (Tue, 03 Sep 2019)
New Revision: 2096

Modified:
   pkg/DESCRIPTION
   pkg/man/ec999.Rd
   pkg/man/gb2fasta.Rd
   pkg/man/reverse.align.Rd
   pkg/man/write.fasta.Rd
Log:
fix the  bug 'checking for non-standard things in the check directory'

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2019-09-02 14:26:55 UTC (rev 2095)
+++ pkg/DESCRIPTION	2019-09-03 12:40:59 UTC (rev 2096)
@@ -1,7 +1,7 @@
 Encoding: UTF-8
 Package: seqinr
-Version: 3.4-8
-Date: 2019-09-02
+Version: 3.4-9
+Date: 2019-09-03
 Title: Biological Sequences Retrieval and Analysis
 Authors at R: c(person("Delphine", "Charif", role = "aut"),
              person("Olivier", "Clerc", role = "ctb"),

Modified: pkg/man/ec999.Rd
===================================================================
--- pkg/man/ec999.Rd	2019-09-02 14:26:55 UTC (rev 2095)
+++ pkg/man/ec999.Rd	2019-09-03 12:40:59 UTC (rev 2096)
@@ -31,6 +31,8 @@
 #
 # How to export sequences in a FASTA file:
 #
-write.fasta(ec999, names(ec999), file = "ec999.ffn")
+fname <- tempfile(pattern = "ecc999", tmpdir = tempdir(), fileext = "ffn")
+tempdir(check = FALSE)
+write.fasta(ec999, names(ec999), file = fname)
 }
 \keyword{datasets}

Modified: pkg/man/gb2fasta.Rd
===================================================================
--- pkg/man/gb2fasta.Rd	2019-09-02 14:26:55 UTC (rev 2095)
+++ pkg/man/gb2fasta.Rd	2019-09-03 12:40:59 UTC (rev 2096)
@@ -24,7 +24,10 @@
 \seealso{ \code{\link{oriloc}} }
 \examples{
   myGenBankFile <- system.file("sequences/ct.gbk.gz", package = "seqinr")
-  myFastaFileName <- "Acinetobacter_ADP1_uid61597.fasta"
+  #myFastaFileName <- "Acinetobacter_ADP1_uid61597.fasta"
+  myFastaFileName <-tempfile(pattern = "Acinetobacter_ADP1_uid61597", 
+   tmpdir = tempdir(), fileext = "fasta")
+  tempdir(check = FALSE)
   gb2fasta(myGenBankFile, myFastaFileName)
   readLines(myFastaFileName)[1:5]
   #

Modified: pkg/man/reverse.align.Rd
===================================================================
--- pkg/man/reverse.align.Rd	2019-09-02 14:26:55 UTC (rev 2095)
+++ pkg/man/reverse.align.Rd	2019-09-03 12:40:59 UTC (rev 2096)
@@ -86,15 +86,22 @@
 #
 # Call reverse.align for this example:
 #
+myOutFileName <-tempfile(pattern = "test", tmpdir = tempdir(), fileext = "revalign")
+tempdir(check = FALSE)
 
+#reverse.align(nucl.file = nucl.file, protaln.file = protaln.file,
+#                     input.format = 'clustal', out.file = 'test.revalign')
+
 reverse.align(nucl.file = nucl.file, protaln.file = protaln.file,
-                     input.format = 'clustal', out.file = 'test.revalign')
+                     input.format = 'clustal', out.file = myOutFileName)
 
 #
 # Simple sanity check against expected result:
 #
 
-res.new <- read.alignment("test.revalign", format = "fasta")
+#res.new <- read.alignment("test.revalign", format = "fasta")
+
+res.new <- read.alignment(myOutFileName, format = "fasta")
 data(revaligntest)
 stopifnot(identical(res.new, revaligntest))
 

Modified: pkg/man/write.fasta.Rd
===================================================================
--- pkg/man/write.fasta.Rd	2019-09-02 14:26:55 UTC (rev 2095)
+++ pkg/man/write.fasta.Rd	2019-09-03 12:40:59 UTC (rev 2096)
@@ -35,10 +35,12 @@
 ortho3 <- lapply(ortho, function(x) x[seq(from = 3, to = length(x), by = 3)])
 
 ## Write the 3 modified sequences to a file:
-write.fasta(sequences = ortho3, names = names(ortho3), nbchar = 80, file.out = "ortho3.fasta")
+fname <- tempfile(pattern = "ortho3", tmpdir = tempdir(), fileext = "fasta")
+#write.fasta(sequences = ortho3, names = names(ortho3), nbchar = 80, file.out = "ortho3.fasta")
+write.fasta(sequences = ortho3, names = names(ortho3), nbchar = 80, file.out = fname)
 
 ## Read them again from the same file and check that sequences are preserved:
-ortho3bis <- read.fasta("ortho3.fasta", set.attributes = FALSE)
+ortho3bis <- read.fasta(fname, set.attributes = FALSE)
 stopifnot(identical(ortho3bis, ortho3))
 }
 \keyword{ utilities }



More information about the Seqinr-commits mailing list