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

#Repetitive Element Alignment Auxilary Data
CREATE TABLE bigRmskAlignBed (
    chrom varchar(255) not null,	# Reference sequence chromosome or scaffold
    chromStart int unsigned not null,	# Start position of alignment on chromosome
    chromEnd int unsigned not null,	# End position of alignment on chromosome
    chromRemain int unsigned not null,	# Remaining bp in the chromosome or scaffold
    score float not null,	# alignment score (sw, bits or evalue)
    percSubst float not null,	# Base substitution percentage
    percDel float not null,	# Base deletion percentage
    percIns float not null,	# Bases insertion percentage
    strand char(1) not null,	# Strand - either + or -
    repName varchar(255) not null,	# Name of repeat
    repType varchar(255) not null,	# Type of repeat
    repSubtype varchar(255) not null,	# Subtype of repeat
    repStart int unsigned not null,	# Start in repeat sequence
    repEnd int unsigned not null,	# End in repeat sequence
    repRemain int unsigned not null,	# Remaining unaligned bp in the repeat sequence
    id int unsigned not null,	# The ID of the hit. Used to link related fragments
    calignData longblob not null,	# The alignment data stored as a single string
              #Indices
    PRIMARY KEY(chrom)
);
