src/hg/instinct/bioInt2/bioIntDb.sql 1.2

1.2 2009/03/21 19:54:10 jsanborn
added routine to set cohorts
Index: src/hg/instinct/bioInt2/bioIntDb.sql
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/bioInt2/bioIntDb.sql,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 4 -r1.1 -r1.2
--- src/hg/instinct/bioInt2/bioIntDb.sql	20 Mar 2009 06:06:31 -0000	1.1
+++ src/hg/instinct/bioInt2/bioIntDb.sql	21 Mar 2009 19:54:10 -0000	1.2
@@ -58,8 +58,24 @@
               #Indices
     PRIMARY KEY(id)
 );
 
+#All cohorts
+CREATE TABLE cohorts (
+    id int unsigned not null,	# Cohort Id
+    name varchar(255) not null,	# Cohort name
+              #Indices
+    PRIMARY KEY(id)
+);
+
+#Dataset cohort lookup
+CREATE TABLE datasetCohort (
+    dataset_id int unsigned not null,	# Dataset Id
+    cohort_id int unsigned not null,	# Cohort Id
+              #Indices
+    PRIMARY KEY(dataset_id)
+);
+
 #Lookup table linking knownGene
 CREATE TABLE geneLookup (
     id int unsigned not null,	# Unique Id
     kgId varchar(255) not null,	# Known Gene Id
@@ -136,20 +152,39 @@
               #Indices
     PRIMARY KEY(sample_id)
 );
 
+#All analyses run
+CREATE TABLE analyses (
+    id int unsigned not null,	# Analysis id
+    cohort_id int unsigned not null,	# Cohort Id
+    module varchar(255) not null,	# Analysis Module
+    result_table varchar(255) not null,	# Table containing result
+              #Indices
+    PRIMARY KEY(id)
+);
+
+#All analysis parameters
+CREATE TABLE analysisParams (
+    analysis_id int unsigned not null,	# Module Id
+    key varchar(255) not null,	# Parameter key
+    val varchar(255) not null,	# Parameter val
+              #Indices
+    PRIMARY KEY(analysis_id)
+);
+
 #All analysis features
 CREATE TABLE analysisFeatures (
-    feature_id int unsigned not null,	# Feature Id
+    id int unsigned not null,	# Feature Id
     feature_name varchar(255) not null,	# Feature Name
               #Indices
-    PRIMARY KEY(feature_id)
+    PRIMARY KEY(id)
 );
 
 #All analysis vals
 CREATE TABLE analysisVals (
     sample_id int unsigned not null,	# Sample Id
-    feature_id int unsigned not null,	# Feature Id
+    feature_id int unsigned not null,	# Analysis Feature Id
     val float not null,	# Val
     conf float not null,	# Confidence
               #Indices
     PRIMARY KEY(sample_id)