[Gtdb-commits] r40 - pkg/gt.db/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 27 09:02:18 CET 2010


Author: dahinds
Date: 2010-02-27 09:02:18 +0100 (Sat, 27 Feb 2010)
New Revision: 40

Modified:
   pkg/gt.db/R/hapmap.R
Log:
- Fixed dumb bugs in .read.hapmap.file()



Modified: pkg/gt.db/R/hapmap.R
===================================================================
--- pkg/gt.db/R/hapmap.R	2010-02-22 05:37:02 UTC (rev 39)
+++ pkg/gt.db/R/hapmap.R	2010-02-27 08:02:18 UTC (rev 40)
@@ -1,4 +1,3 @@
-
 #
 # Copyright (C) 2010, 23andMe, Inc.
 #
@@ -25,9 +24,9 @@
 
 .read.hapmap.file <- function(file)
 {
-    # schlep the whole file into memory: 100 MB should be enough
-    fd <- file(file)
-    filedata <- readChar(file, nchars=1e8, useBytes=TRUE)
+    # schlep the whole file into memory: 250 MB should be enough
+    fd <- file(file, "r")
+    filedata <- readChar(fd, nchars=250e6, useBytes=TRUE)
     close(fd)
 
     # parse just map information



More information about the Gtdb-commits mailing list