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

#BED5+ with two fields having variable number of experiment IDs and values (none zero-valued)
CREATE TABLE factorSource (
    bin smallint unsigned not null,	# used for efficient position indexing
    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 unsigned not null,	# Score from 0-1000
    expCount int unsigned not null,	# Number of experiment values
    expNums longblob not null,	# Comma separated list of experiment numbers
    expScores longblob not null,	# Comma separated list of experiment scores
              #Indices
    INDEX(name(16)),
    INDEX(chrom(14),bin)
);
