# pscreen.sql was originally generated by the autoSql program, which also 
# generated pscreen.c and pscreen.h.  This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly 
# automatic way.

#P-Screen (BDGP Gene Disruption Project) P el. insertion locations/genes
CREATE TABLE pscreen (
    bin smallint unsigned not null,   # Bin for fast index
    chrom varchar(255) not null,	# chromosome
    chromStart int unsigned not null,	# Start position in chromosome
    chromEnd int unsigned not null,	# End position in chromosome
    name varchar(255) not null,	# Name of item (mutant strain with P el. insert here)
    score int unsigned not null,	# Score from 0-1000 (placeholder! for bed 6 compat)
    strand char(1) not null,	# + or -
    stockNumber int unsigned not null,	# Mutant strain stock number, for ordering
    geneCount int unsigned not null,	# Number of genes disrupted by this insert
    geneIds longblob not null,	# IDs of genes disrupted
              #Indices
    INDEX(chrom(8),bin),
    INDEX(name(8))
);
