[Seqinr-commits] r1729 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 6 18:33:13 CET 2010


Author: lobry
Date: 2010-03-06 18:33:12 +0100 (Sat, 06 Mar 2010)
New Revision: 1729

Modified:
   pkg/R/read.alignment.R
Log:
No more File argument

Modified: pkg/R/read.alignment.R
===================================================================
--- pkg/R/read.alignment.R	2010-03-06 10:01:43 UTC (rev 1728)
+++ pkg/R/read.alignment.R	2010-03-06 17:33:12 UTC (rev 1729)
@@ -1,12 +1,13 @@
 #
 # Read files of aligned sequences in various formats
 #
-read.alignment <- function(file, format, forceToLower = TRUE, File = NULL)
+read.alignment <- function(file, format, forceToLower = TRUE)
 {
-  if(!is.null(File)){
-    file <- File
-    warning("argument File is deprecated, use file instead")
-  }
+  #
+  # Check that we have read permission on the file:
+  #
+  if(file.access(file, mode = 4) != 0) stop(paste("File", file, "is not readable"))
+
   ali <- switch( format,
 	fasta = .Call("read_fasta_align", file, PACKAGE = "seqinr"), 
 	mase = .Call("read_mase", file, PACKAGE = "seqinr"),



More information about the Seqinr-commits mailing list