|
|
|
APPENDIX A Satellog
MySQL Database commands ######################################## # MySQL Commands for Sattelog Database # ######################################## The following document has all of the commands
needed to recreate the Satellog database from scratch. Broadly speaking, the tables can be divided
into two classes: those that must be
populated manually prior to running repeatalyzer.pl and those populated
automatically when repeatalyzer.pl is run.
Some comments are provided after each create table command to briefly
expain what data the table holds. See
the Satellog manuscript for further details. ####################### # DROP TABLE COMMANDS # ####################### DROP TABLE
affy; DROP TABLE
build_info; DROP TABLE
ugcount; DROP TABLE
ugstats; DROP TABLE
ens_db; DROP TABLE
gc; DROP TABLE
go; DROP TABLE
mim; DROP TABLE
pdb; DROP TABLE
repeats; DROP TABLE
transcripts; # Following tables are not automatically generated # Are you sure you need to drop them? DROP TABLE
linkage; DROP TABLE
rep_stats; DROP TABLE
rep_class; DROP TABLE
GeneNote; DROP TABLE
disease; DROP TABLE
unigene; ######################### # CREATE TABLE COMMANDS # ######################### CREATE TABLE build_info ( ens_db
VARCHAR(50) NOT NULL PRIMARY
db_name VARCHAR(50) NOT NULL,
date_run DATETIME ); CREATE TABLE repeats ( rep_id chr
VARCHAR(4), start end period
TINYINT UNSIGNED, unit
VARCHAR(16), class_id
seq
VARCHAR(255), length pvalue
DECIMAL(8,6) NULL ); CREATE INDEX r_total ON repeats
(rep_id,chr,start,end,period,unit,seq,length); CREATE INDEX r_common ON repeats
(rep_id,period,unit,length); CREATE INDEX r_chr ON repeats
(chr,start,end,period,unit,length); CREATE INDEX r_total_period ON repeats
(rep_id,period); CREATE INDEX r_total_unit ON repeats (rep_id,unit); CREATE INDEX r_total_length ON repeats
(rep_id,length); CREATE INDEX r_co_ords ON repeats
(rep_id,chr,start,end); CREATE INDEX rapid ON repeats (period, length); CREATE INDEX r_length_class ON repeats (class,
length); ########### # ugcount # ########### CREATE TABLE ugcount ( count_id
rep_id cluster
VARCHAR(20), sequence
VARCHAR(20), length ); CREATE INDEX ug_hits ON ugcount
(rep_id,cluster,sequence,length); CREATE INDEX length ON count (rep_id,length); CREATE TABLE ugstats ( count_id
rep_id count min max mean
DECIMAL(8,2) NOT NULL, sd
DECIMAL(8,2) NULL ); CREATE INDEX ug_stats ON ugstats
(rep_id,count,min,max,mean,sd); CREATE INDEX sd ON ugstats (rep_id,sd); CREATE TABLE transcripts ( ts_id rep_id ens_ts VARCHAR(15), gene_location VARCHAR(20), pep VARCHAR(150) NULL, ens_id
); CREATE INDEX t_common ON transcripts
(rep_id,gene_location,pep,ens_id); CREATE INDEX t_pep ON transcripts
(rep_id,gene_location); CREATE INDEX t_gene ON transcripts (rep_id,ens_id); CREATE TABLE gc ( rep_id 100_bp
DECIMAL(7,6) NOT NULL, 500_bp
DECIMAL(7,6) NOT NULL, 1000_bp
DECIMAL(7,6) NOT NULL ); CREATE INDEX gc_100 ON gc (rep_id,100_bp); CREATE INDEX gc_500 ON gc (rep_id,500_bp); CREATE INDEX gc_1000 ON gc (rep_id,1000_bp); CREATE TABLE ens_db ( ens_id ens_name
VARCHAR(15) NOT NULL, name
VARCHAR(15) NULL, description
TEXT NULL, chr start end strand ); CREATE INDEX ens_common ON ens_db
(ens_id,ens_name,name); CREATE INDEX ens_lookup ON ens_db (ens_name,ens_id); CREATE TABLE go ( go_id ens_id go_value
VARCHAR(50) NOT NULL ); CREATE INDEX go_go_value ON go (ens_id,go_value); CREATE TABLE pdb ( pdb_id ens_id domain
VARCHAR(20) NOT NULL ); CREATE INDEX pdb_domain ON pdb (ens_id,domain); CREATE TABLE mim ( mim_id ens_id mim_value
VARCHAR(20) NOT NULL ); CREATE INDEX mim_mim_value ON mim
(ens_id,mim_value); CREATE TABLE affy ( affy_id ens_id g_id ); CREATE INDEX affy_id_ref ON affy (ens_id,g_id); # Following tables are not automatically generated CREATE TABLE linkage ( link_id disease
VARCHAR(10) NOT NULL, band
VARCHAR(25), marker VARCHAR(50), chr pstart start
end qend ref score
DECIMAL(3,2), type
VARCHAR(10), p_value
DECIMAL(11,8), notes
TEXT ); CREATE TABLE rep_stats ( class_id
chr
VARCHAR(4), length ); CREATE INDEX stats_search ON rep_stats
(class_id,length); CREATE INDEX stats_search_chr ON rep_stats
(chr,class_id,length); CREATE TABLE GeneNote ( g_id id_ref
VARCHAR(15) NOT NULL, value
DECIMAL(10,1) NOT NULL, call tissue
VARCHAR(15) NOT NULL, array number ); CREATE INDEX g_lookup ON GeneNote (id_ref,g_id); CREATE INDEX g_all ON GeneNote
(g_id,id_ref,value,call,tissue,array,number); CREATE INDEX g_common ON GeneNote
(g_id,call,tissue); CREATE TABLE rep_class ( class_id
class
TEXT ); CREATE INDEX rc_search ON rep_class (class (20)
ASC,rep_class_id); CREATE TABLE disease ( disease_id
rep_id short_name
VARCHAR(15), full_name
VARCHAR(100), name
VARCHAR(15), ens_name VARCHAR(15) NOT NULL, norm_min norm_max dis_min dis_max locus anticipation
VARCHAR(2) ); CREATE TABLE unigene ( cluster_id
cluster
VARCHAR(20), chr
VARCHAR(4), start end blatscore
identity
DECIMAL(4,1) ); CREATE INDEX unigene_look_up ON unigene
(cluster_id,cluster,chr,start,end); CREATE TABLE class_stats ( class length pvalue
DECIMAL(9,8) ); CREATE INDEX class_stats_look_up ON class_stats
(class,length,pvalue); CREATE TABLE repeats_in_linkage ( rep_id disease
VARCHAR(10) NOT NULL, link_id ); CREATE INDEX rep_link ON repeats_in_linkage
(rep_id,link_id); CREATE INDEX rep_link_disease ON repeats_in_linkage
(rep_id,disease,link_id); LOAD INTO TABLE repeats_in_linkage IGNORE 1 LINES; CREATE TABLE go_terms ( go_value
VARCHAR(50) NOT NULL PRIMARY go_term
VARCHAR(200), go_class
VARCHAR(1) ); LOAD INTO TABLE go_terms; ^ top
|
|
|