[Gtdb-commits] r21 - in pkg/gt.db: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Oct 29 21:37:49 CET 2009
Author: dahinds
Date: 2009-10-29 21:37:45 +0100 (Thu, 29 Oct 2009)
New Revision: 21
Modified:
pkg/gt.db/R/sample.R
pkg/gt.db/man/mk.sample.Rd
Log:
Added test, documented that sample positions are 1-based integers.
Modified: pkg/gt.db/R/sample.R
===================================================================
--- pkg/gt.db/R/sample.R 2009-10-18 01:23:29 UTC (rev 20)
+++ pkg/gt.db/R/sample.R 2009-10-29 20:37:45 UTC (rev 21)
@@ -58,6 +58,10 @@
warning("sample positions are missing")
data$position <- NA
}
+ if (any(data$position < 1) ||
+ any(data$position != round(data$position))) {
+ stop("sample positions should be 1-based integers")
+ }
sql.exec(gt.db::.gt.db, sql, dset.id, subj.id,
data[c('sample.name','gender','position')])
}
Modified: pkg/gt.db/man/mk.sample.Rd
===================================================================
--- pkg/gt.db/man/mk.sample.Rd 2009-10-18 01:23:29 UTC (rev 20)
+++ pkg/gt.db/man/mk.sample.Rd 2009-10-29 20:37:45 UTC (rev 21)
@@ -39,7 +39,8 @@
\code{position}. This information is important because it affects how
various functions interpret genotyping data in this dataset.
Sample gender is used to determine ploidy for sex linked assays, and
- the position is used to parse arrays of packed genotype data.
+ the position is used to index arrays of packed genotype data.
+ Positions are 1-based integers.
}
\value{
If successful, the number of rows inserted or deleted from the sample
More information about the Gtdb-commits
mailing list