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

#Scored BED with P-value floating point values and integer scores (0-1000) for display.
CREATE TABLE bed5Pval (
    bin smallint not null,      # Index field
    chrom varchar(255) not null,	# Reference sequence chromosome or scaffold
    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
    score int not null,	# 0-1000 score for useScore shading
    pValue float not null,	# -log10 P-value
              #Indices
    INDEX(chrom(16),bin),
    INDEX(chrom(16),chromStart),
    INDEX(name(16))
);
