[Gtdb-commits] r37 - in pkg/gt.db: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Feb 21 22:00:04 CET 2010


Author: dahinds
Date: 2010-02-21 22:00:03 +0100 (Sun, 21 Feb 2010)
New Revision: 37

Modified:
   pkg/gt.db/R/hapmap.R
   pkg/gt.db/R/progress.R
   pkg/gt.db/man/load.hapmap.data.Rd
   pkg/gt.db/man/progress.bar.Rd
Log:
Minor cleanups/fixes



Modified: pkg/gt.db/R/hapmap.R
===================================================================
--- pkg/gt.db/R/hapmap.R	2010-02-21 19:50:32 UTC (rev 36)
+++ pkg/gt.db/R/hapmap.R	2010-02-21 21:00:03 UTC (rev 37)
@@ -47,7 +47,7 @@
     geno <- sub('.* QC\\S+ ', '', geno, perl=TRUE)
     sample <- strsplit(geno[1], ' ')[[1]]
     map$genotype <- .Call('do_encode_gt', as.character(map$alleles),
-                          geno[1+(1:nrow(map))])
+                          geno[1+(1:nrow(map))], PACKAGE='gt.db')
     stopifnot(all(nchar(map$genotype) == length(sample)))
     structure(map, sample=sample)
 }

Modified: pkg/gt.db/R/progress.R
===================================================================
--- pkg/gt.db/R/progress.R	2010-02-21 19:50:32 UTC (rev 36)
+++ pkg/gt.db/R/progress.R	2010-02-21 21:00:03 UTC (rev 37)
@@ -18,8 +18,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>
 #
 
-progress.bar <- function (done, total, len=options('width')-40)
+progress.bar <- function (done, total, width=getOption('width'))
 {
+    len <- width - 40
     now <- Sys.time()
     p <- try(get(".Progress", pos='package:gt.db'), silent=TRUE)
     if ((class(p) == 'try-error') || (done == 0)) {

Modified: pkg/gt.db/man/load.hapmap.data.Rd
===================================================================
--- pkg/gt.db/man/load.hapmap.data.Rd	2010-02-21 19:50:32 UTC (rev 36)
+++ pkg/gt.db/man/load.hapmap.data.Rd	2010-02-21 21:00:03 UTC (rev 37)
@@ -24,7 +24,7 @@
   International HapMap Project.
 }
 \usage{
-load.hapmap.data(files, project='HapMap', verbose=TRUE)
+load.hapmap.data(files, project.name='HapMap', verbose=TRUE)
 }
 \arguments{
   \item{files}{a vector of HapMap genotype data files.}

Modified: pkg/gt.db/man/progress.bar.Rd
===================================================================
--- pkg/gt.db/man/progress.bar.Rd	2010-02-21 19:50:32 UTC (rev 36)
+++ pkg/gt.db/man/progress.bar.Rd	2010-02-21 21:00:03 UTC (rev 37)
@@ -25,12 +25,12 @@
   elapsed time and estimated time remaining are also reported.
 }
 \usage{
-progress.bar(done, total, len = 40)
+progress.bar(done, total, width=getOption('width'))
 }
 \arguments{
   \item{done}{the amount of work already done.}
   \item{total}{the total amount of work to do.}
-  \item{len}{the length of the bar, in characters.}
+  \item{width}{the console width, in characters.}
 }
 \details{
   After writing the progress bar, the cursor is repositioned at the



More information about the Gtdb-commits mailing list