[GENERAL]
description   = Yeast chromosomes 1+2 (advanced)
database      = scaffolds

initial landmark = chrI:143000..180000

# bring in the special Submitter plugin for the rubber-band select menu                                           
plugins   = FastaDumper RestrictionAnnotator SequenceDumper TrackDumper Submitter
autocomplete = 1

default tracks = Genes
		   ORFs
		   tRNAs
		   CDS
		   Transp
		   Centro:overview
		   GC:region

# examples to show in the introduction
examples = chrI
	   chrII
	   chrI:80,000..120,000
	   "membrane trafficking"
	   NUT21
	   YAL063C



# "automatic" classes to try when an unqualified identifier is given
automatic classes = Symbol Gene Clone

#################################
# database definitions
#################################

[scaffolds:database]
db_adaptor    = Bio::DB::SeqFeature::Store
db_args       = -adaptor memory
                -dir    $DATABASES/yeast_scaffolds
search options = default +autocomplete

[annotations:database]
db_adaptor    = Bio::DB::SeqFeature::Store
db_args       = -adaptor memory
                -dir    $DATABASES/yeast_chr1+2
search options = default +autocomplete


# Advanced feature: custom balloons
custom balloons = [balloon]
                  delayTime = 500

                  [balloon500]
	          maxWidth  = 500
                  delayTime = 50


# Advanced feature: an example of callbacks to be run remotely
# by gbrowse_details for AJAX/iframe balloons
[TOOLTIPS]
intro = sub {
                my $args  = shift;
                my $feat  = $args->{feature};
                my $name  = $feat->display_name;
                my $type  = $feat->primary_tag;
                my $class = $feat->class;
                my $extra = join(' ',$feat->each_tag_value('Note')) if $feat->has_tag('Note');
                my $n     = $type =~ /^[AEIOU]/i ? 'n' : '';
                my $msg   = "Hello, I am $name, a$n $type of class $class";
                $msg     .= "<br>I am described as a <i><b>$extra</b></i>" if $extra;
                $msg     .= "<br>Click to see the sequence of $name";
                return "<table><tr><th bgcolor='lightsteelblue'>$name</th><tr>" .
                       "<tr><td>$msg</td></tr></table>";
           }
full_sequence = sub {
	          my $args = shift;
		  my $feat = $args->{feature};
		  my $name  = $feat->display_name;
		  my $seq = $feat->seq->seq;
		  $seq =~ s/(\S{75})/$1\n/g;
		  return "<pre style='font-size:8pt'>>$name\n$seq</pre>";
               }

# Advanced feature:
# Pop up rubberband menus for submitting selected region to search engines...
#include "detail_select_menu.conf"
#include "submitter_plugin.conf"

# Default glyph settings
[TRACK DEFAULTS]
glyph       = generic
database    = annotations
height      = 8
bgcolor     = cyan
fgcolor     = black
label density = 25
bump density  = 100
show summary  = 99999  # go into summary mode when zoomed out to 100k
# default pop-up balloon
balloon hover = <b>$name</b> is a $type spanning $ref from $start to $end. Click for more details.

### TRACK CONFIGURATION ####
# the remainder of the sections configure individual tracks

[Centro:overview]
feature       = centromere
bgcolor       = blue
glyph         = dot
fgcolor       = black
height        = 8
point         = 1
show summary  = 0   # no summary of this one
key           = Centromeres

[tRNA:overview]
feature       = tRNA
glyph         = generic
bgcolor       = lightgray
fgcolor       = black
height        = 4
stranded      = 1
description   = 1
show summary  = 0   # no summary of this one
key           = tRNAs

[GC:region]
glyph        = dna
global feature = 1
database     = scaffolds
height       = 40
gc_window    = auto
do_gc        = 1
strand       = both
fgcolor      = red
axis_color   = blue
show summary  = 0   # no summary of this one
key          = GC Content

[Genes]
feature      = gene
glyph        = segments
bgcolor      = yellow
forwardcolor = yellow
reversecolor = turquoise
label        = sub { my $f = shift;
                     my $name = $f->display_name;
                     my @aliases = sort $f->attributes('Alias');
                     $name .= " (@aliases)" if @aliases;
		     $name;
  } 
height       = 6
description  = 0
balloon hover width = 350
balloon hover = sub { my $f = shift; return join ' ',$f->notes }
balloon click width = 450
balloon click = <table>
      <tr><th rowspan="5" align="left"><img src='http://www.yeastgenome.org/images/SGD_logo.gif'/><br>
      This gene brought to you by <a href="http://www.yeastgenome.org">SGD</a>.</th>
          <th bgcolor="cyan">Gene $name</th>
      </tr>
      <tr align='left'><th><a href="/cgi-bin/gb2/gbrowse_details/yeast_advanced?feature_id=$id" target="_new">See gene details</a></th></tr>
      <tr align='left'><th><a href="http://db.yeastgenome.org/cgi-bin/locus.pl?locus=$name" target="_new">Ask SGD about $name</a></th></tr>
      <tr align='left'><th><a href="http://en.wikipedia.org/wiki/Special:Search?search=$name" target="_new">Ask Wikipedia about $name</a></th></tr>
      <tr align='left'><th><a href="http://www.google.com/search?q=$name" target="_new">Ask Google about $name</a></th></tr>
      </table>
key          = Named gene

[CDS]
feature      = gene
glyph        = cds
description  = 0
height       = 26
sixframe     = 1
label        = sub {shift->name . " reading frame"}
key          = CDS
balloon click width = 500
balloon hover width = 350
balloon hover = <b>$name</b> is a $type spanning $ref from $start to $end. Click to search Google for $name.
balloon click = http://www.google.com/search?q=$name
citation     = This track shows CDS reading frames.

[tRNAs]
feature       = tRNA
glyph         = generic
bgcolor       = lightgray
fgcolor       = black
height        = 4
stranded      = 1
description   = 1
# Note: AJAX balloons -- edit the URL if your copy of gbrowse_details is not in /gb2
balloon hover = url:../../gbrowse_details/yeast_advanced?name=$name;class=$class;remote=intro
balloon click = url:../../gbrowse_details/yeast_advanced?name=$name;class=$class;remote=full_sequence
key           = tRNAs

[Transp]
feature       = LTR_retrotransposon
glyph         = segments
bgcolor       = yellow
fgcolor       = black
height        = 5
stranded      = 1
balloon width = 375
key           = Transposons

[LTRs]
feature       = long_terminal_repeat
fgcolor       = black
glyph         = anchored_arrow
height        = 6
balloon width = 375
key           = Long Terminal Repeats

[Translation]
glyph        = translation
global feature = 1
database     = scaffolds
height       = 40
fgcolor      = purple
strand       = +1
translation  = 6frame
key          = 6-frame translation

[TranslationF]
glyph        = translation
global feature = 1
database     = scaffolds
height       = 20
fgcolor      = purple
strand       = +1
translation  = 3frame
key          = 3-frame translation (forward)

[DNA/GC Content]
glyph        = dna
global feature = 1
database     = scaffolds
height       = 40
do_gc        = 1
gc_window    = auto
strand       = both
fgcolor      = red
axis_color   = blue

[TranslationR]
glyph        = translation
global feature = 1
database     = scaffolds
height       = 20
fgcolor      = blue
strand       = -1
translation  = 3frame
key          = 3-frame translation (reverse)

[ncRNA]
feature       = RNAd rRNA:sgd snRNA:sgd snoRNA:sgd
fgcolor       = orange
glyph         = generic
description   = 1
key           = Noncoding RNAs

