Contents
  1. SnapGene BED Import Specification
  2. Coloring Features
  3. Track Offsets
  4. About the Example Files


1. SnapGene BED Import Specification
====================================
BED files consist of optional track lines, followed by feature lines.

For feature lines, there are 3 required columns and up to 9 optional columns,
each separated by a tab (\t) character. If the number of columns present goes outside this range,
SnapGene reports "Sorry, SnapGene doesn't understand the format of file myfile.bed."

SnapGene skips blank lines.

Comment lines are skipped (lines starting with #).

Feature lines are discussed below. Separate sections will discuss track lines.

Column 1: seqid (required)
Sequence identifier
Must be the same for every feature line.

Columns 2 and 3: start end (both columns are required)

Sequence bases are numbered from 0, not 1.

The end value is NOT included in the range.

Example: 1 2 specifies the second base in the sequence
Example: 1 3 specifies the second and third base in the sequence
Example: 1 1 specifies _between_ the second and third base in the sequence

Specifying a range the lies between bases makes it possible for SnapGene
to import point features.

Column 4: feature name (optional)
May not contain tab (\t) characters since those separate columns.

Column 5: score (optional; if present, columns 1-4 must also be present)
Integer between 0 and 1000, inclusive.

Column 6: directionality (optional; if present, columns 1-5 must also be present)
Forward directional (+),
reverse directional (-), or
non-directional (.)

Columns 7 and 8: thick start and end (optional; if present, columns 1-6 must also be present)
Read but ignored by SnapGene.

Column 9: color (optional; if present, columns 1-8 must also be present)

If the track line specifies "itemRgb=On" this column must be present and have the form:

  R,G,B

where R, G, B are the amounts of red, green, and blue, respectively
to include in the color. Each value is an integer from 0 through 255.

  Example: white
           255,255,255

  Example: pure red
           255,0,0

  Example: 50% gray
           127,127,127

Otherwise, you can use the above color format or just specify 0.

Columns 10-12: (optional; if present, columns 1-9 must also be present)

  Column 10: exon count
  Column 11: for each exon, its size
  Column 12: for each exon, its start location relative to column 2 (start)

  Note that for columns 11 and 12, a comma separates one exon from the next.

  Example: 1 30 0
           one exon that starts at the first base and spans 30 bases

  Example: 2 30,20 0,50
           two exons
           the first exon starts at base 0 and spans 30 bases
           the second exon starts at base 50 and spans 20 bases

  The first exon start value must be 0, which corresponds to column 2 (start).
  The last exon's start + size must equal column 3 (end) - column 2 (start).

  Exons may not overlap.


2. Coloring Features
====================
There are many ways to specify feature coloring behavior.

  Use Score
  ---------
  The first line of the file should contain a track line of the form:
    track useScore=1 color="0,60,120"
    or
    track useScore=1 color="100,50,0"
    or
    track useScore=1

  If color="0,60,120", features will display in shades of blue, depending on the value in column 5 (score).
  If color="100,50,0", features will display in shades of brown, depending on the value in column 5 (score).
  If color is missing, features will display in shades of gray, depending on the value in column 5 (score).

  The higher the score, the darker the shade.

  There are nine shades corresponding to the following score ranges:
    Range 1: 0 through 166 (lightest)
    Range 2: 167 through 277
    Range 3: 278 through 388
    Range 4: 389 through 499
    Range 5: 500 through 611
    Range 6: 612 through 722
    Range 7: 723 through 833
    Range 8: 834 through 944
    Range 9: 945 through 1000 (darkest)

  To easily turn off coloring by score, do this:
    track useScore=0

  Color By Strand
  ---------------
  The first line of the file should contain a track line of the form:
    track colorByStrand="RF,GF,BF,RR,GR,BR"

  where RF, GF, BF are the red, green, and blue values for forward directional features
  and RR, GR, BR and the red, green, and blue values for reverse directional features.

  Color By Item
  -------------
  Each feature line can specify its own color.
  The first line of the file should contain a track line of the form:
    track itemRgb=On

  Column 9 must contain R, G, B color values for all feature lines in the file.

  To easily turn off coloring by item, do this:
    track itemRgb=Off

In the event conflicting information is included on the track line, SnapGene
favors (in order) coloring by item, coloring by strand, and use score methods.


3. Track Offsets
================
Sequence positions can easily be shifted +/- a given number of bases.
To do so, the first line of the file should contain a track line of the form:
  track offset=1
  or
  track offset=-1
  or
  track offset=0

The offset may be a positive or negative integer, or zero (turns off track offsetting).

Care must be taken to ensure that when the offset is applied, all base ranges remain within the sequence.
Otherwise, SnapGene will fail to import the file.


4. About the Example Files
==========================
To import these example files you'll need to create/open a 20kbp DNA sequence.
