[Gtdb-commits] r51 - in pkg/gt.db: R inst/schema man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu May 20 22:50:07 CEST 2010


Author: dahinds
Date: 2010-05-20 22:50:07 +0200 (Thu, 20 May 2010)
New Revision: 51

Modified:
   pkg/gt.db/R/assay.R
   pkg/gt.db/inst/schema/mk_mysql.sql
   pkg/gt.db/inst/schema/mk_oracle.sql
   pkg/gt.db/inst/schema/mk_sqlite.sql
   pkg/gt.db/man/ls.assay.Rd
   pkg/gt.db/man/mk.assay.Rd
Log:
Added alt_name column to assay table.



Modified: pkg/gt.db/R/assay.R
===================================================================
--- pkg/gt.db/R/assay.R	2010-04-19 23:07:59 UTC (rev 50)
+++ pkg/gt.db/R/assay.R	2010-05-20 20:50:07 UTC (rev 51)
@@ -90,9 +90,10 @@
         stop("invalid probe sequence(s)", call.=FALSE)
     if (is.null(data$flags)) data$flags <- 0
     if (is.null(data$probe.seq)) data$probe.seq <- NA
-    sql <- 'insert into assay values (null,:1,:2,:3,:4,:5)'
+    if (is.null(data$alt.name)) data$alt.name <- NA
+    sql <- 'insert into assay values (null,:1,:2,:3,:4,:5,:6)'
     sql.exec(gt.db::.gt.db, sql, plat.id,
-             data[c('assay.name','flags','alleles','probe.seq')],
+             data[c('assay.name','flags','alleles','probe.seq','alt.name')],
              progress=progress)
 }
 

Modified: pkg/gt.db/inst/schema/mk_mysql.sql
===================================================================
--- pkg/gt.db/inst/schema/mk_mysql.sql	2010-04-19 23:07:59 UTC (rev 50)
+++ pkg/gt.db/inst/schema/mk_mysql.sql	2010-05-20 20:50:07 UTC (rev 51)
@@ -59,7 +59,9 @@
   flags integer,
   alleles varchar(255),
   probe_seq varchar(255),
+  alt_name varchar(255),
   constraint assay_uniq unique (platform_id, name),
+  constraint assay_alt_uniq unique (platform_id, alt_name),
   foreign key (platform_id)
     references platform(platform_id) on delete cascade
 );

Modified: pkg/gt.db/inst/schema/mk_oracle.sql
===================================================================
--- pkg/gt.db/inst/schema/mk_oracle.sql	2010-04-19 23:07:59 UTC (rev 50)
+++ pkg/gt.db/inst/schema/mk_oracle.sql	2010-05-20 20:50:07 UTC (rev 51)
@@ -59,7 +59,9 @@
   flags integer,
   alleles varchar(255),
   probe_seq varchar(255),
+  alt_name varchar(255),
   constraint assay_uniq unique (platform_id, name),
+  constraint assay_alt_uniq unique (platform_id, alt_name),
   foreign key (platform_id)
     references platform(platform_id) on delete cascade
 );

Modified: pkg/gt.db/inst/schema/mk_sqlite.sql
===================================================================
--- pkg/gt.db/inst/schema/mk_sqlite.sql	2010-04-19 23:07:59 UTC (rev 50)
+++ pkg/gt.db/inst/schema/mk_sqlite.sql	2010-05-20 20:50:07 UTC (rev 51)
@@ -59,7 +59,9 @@
   flags integer,
   alleles varchar(255),
   probe_seq varchar(255),
+  alt_name varchar(255),
   constraint assay_uniq unique (platform_id, name),
+  constraint assay_alt_uniq unique (platform_id, alt_name),
   foreign key (platform_id)
     references platform(platform_id) on delete cascade
 );

Modified: pkg/gt.db/man/ls.assay.Rd
===================================================================
--- pkg/gt.db/man/ls.assay.Rd	2010-04-19 23:07:59 UTC (rev 50)
+++ pkg/gt.db/man/ls.assay.Rd	2010-05-20 20:50:07 UTC (rev 51)
@@ -32,7 +32,7 @@
     database keys.}
 }
 \value{
-  A data frame with one row per assay, and 4 or 5 columns:
+  A data frame with one row per assay, and up to 6 columns:
   \item{assay.id}{if \code{show.ids} is set: the unique integer ID for
     this assay.}
   \item{assay.name}{the assay name.}
@@ -40,6 +40,7 @@
   \item{alleles}{a slash separated list of allele sequences.}
   \item{probe.seq}{the genomic flanking sequence for the assay, with
     the variant position denoted by an underscore (\code{'_'}).}
+  \item{alt.name}{an alternate name for the assay, if available.}
 }
 \seealso{
   \code{\link{ls.assay.position}}, \code{\link{mk.assay}}.

Modified: pkg/gt.db/man/mk.assay.Rd
===================================================================
--- pkg/gt.db/man/mk.assay.Rd	2010-04-19 23:07:59 UTC (rev 50)
+++ pkg/gt.db/man/mk.assay.Rd	2010-05-20 20:50:07 UTC (rev 51)
@@ -34,13 +34,15 @@
     the data is loaded.}
 }
 \details{
-  A data frame of assay information can provide up to four columns:
+  A data frame of assay information can provide up to five columns:
   \describe{
     \item{assay.name}{a unique name (within this platform) for the assay.}
     \item{flags}{an optional integer value composed of single-bit flags.}
     \item{alleles}{a slash separated list of valid alleles.}
     \item{probe.seq}{an optional genomic flanking sequence for the assay,
       with the variant position denoted by an underscore (\code{'_'}).}
+    \item{alt.name}{an alternate name for the assay, which must be
+      unique within this platform, if present.}
   }
 }
 \value{



More information about the Gtdb-commits mailing list