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

#HapMap SNPs
CREATE TABLE hapmapAlleleFreq (
    chrom varchar(255) not null,	# Reference sequence chromosome or scaffold
    chromStart int unsigned not null,	# Start position
    chromEnd int unsigned not null,	# End position
    name varchar(255) not null,	# rsId or id
    score int unsigned not null,	# Minor allele frequency from 500 to 1000
    strand char(1) not null,	# Strand
    center varchar(255) not null,	# Sequencing center
    refAllele char(1) not null,	# Reference allele
    otherAllele char(1) not null,	# Variant allele
    refAlleleFreq float not null,	# Reference allele frequency (between 0.0 and 1.0)
    otherAlleleFreq float not null,	# Variant allele frequency (between 0.0 and 1.0)
    minorAlleleFreq float not null,	# Smaller of the 2 frequencies (between 0.0 and 0.5)
    totalCount int unsigned not null,	# Count of individuals
    derivedAlleleFreq float not null,	# Derived allele frequency
              #Indices
    PRIMARY KEY(chrom)
);
