# gbrowse config file for  genome maps
[GENERAL]

description = celegans_wb20050601 (Lucegene)

header = 

footer = <hr>
  <table width="100%">
  <TR>
  <TD align="LEFT" class="databody">
  For the source code for this browser, see the <a href="http://www.gmod.org">
  Generic Model Organism Database Project.</a>  For other questions, send
  mail to <a href="mailto:lstein@cshl.org">lstein@cshl.org</a>.
  </TD>
  </TR>
  </table>
  <hr>
  <pre>$Id: celegans_wb20050601.conf,v1.0 gbrowseconf.xml Exp $</pre>

# lucegene GFF adaptor
db_adaptor    = Bio::DB::GFF
db_args       = 
    -adaptor    lucegene
    -FORMAT     gff
    -LIB_NAME   celegans_wb20050601
    -INDEX_ROOT /bio/argos/ROOT/indices/lucene
    -JAVA_LIB   /bio/argos/common/perl/gbrowse/lib/java
    -DNA_LIB    /bio/argos/ROOT/indices/lucene/celegans_wb20050601
    -use_server 1
    -dbport     22222
    -LOG_FILE   /tmp/lugeneserver2.log

## mysql adaptor for same data
# adaptor     = dbi::mysqlopt
# database    = dbi:mysql:database=celegans_wb20050601;host=localhost
# user        = 
# passwd      =


default_name = i:1..50000 
default_range = 1-500000

# examples to show in the introduction
examples =  region:i i:1..50000 i ii iii iv mtdna v x 
# chromosomes = region:i i:1..50000 i ii iii iv mtdna v x 

plugins = BatchDumper TextMapDumper FeatureFastaDumper FastaDumper GFFDumper 

## option for these? transcript05 replaces transcript
aggregators =  transcript05 alignment orf

uploads = 1

## need this for  Chado segment lookup in Browser.pm _feature_get ...
reference class = region

## need options here
default features =  gene scaffold 
primary_feature = gene

# ? these are flybase-specials ?
# scale_feature = cytoband
dumpviews = FastA GenBank GFF FFF
dataviews = "Default" "Collapse All" "Expand All" 

# DAS reference server
das mapmaster = SELF

cache_overview = 360
cachedir = 360

# Web site configuration info; urk FIXME ... installer
help        = /gbrowse/
stylesheet  = /gbrowse/gbrowse.css
buttons     = /gbrowse/images/buttons
##tmpimages   = /gbrowse/tmp
tmpimages   = /tmp/gbrowse/


# max and default segment sizes for detailed view
max segment     = 1000001
default segment = 100000

# low-res boundary
low res = 200000

zoom levels = 100 200 1000 2000 5000 10000 20000 40000 100000 200000 500000 1000000

searchhelp = Search using Chromosome:base_start..end or Gene name/ID.

#panel property
pad_left    = 20
pad_right   = 30
key_style = between
key bgcolor = whitesmoke
overview bgcolor = whitesmoke
grid = 1

# put reversed features on same track or below ?
mix_strand = 1

# # where to link to when user clicks in detailed view
link    = AUTO
# # default dummy link to get popup title view
# link = sub { return "#"; }
# link = sub {
#   my $f= shift;
#   my $d= $f->primary_id() if $f->can('primary_id');
#   $d= $f->source() unless($d);
#   if ($d) { return '/cgi-bin/lookup?id='.$d; }
#   $d= $f->name();
#   if ($d) { return '/cgi-bin/lookup?name='.$d; }
#   }

# title = sub { my $f= shift;
#   return $f->class .":". $f->info . " ". $f->seq_id .':'.$f->start."..".$f->end;
#   }
title = sub { my $f= shift;
  # return $f->class .":". $f->info . " ". $f->seq_id .':'.$f->start."..".$f->end;
  my $loc= " " .$f->seq_id .':'.$f->start."..".$f->end;
  my $nm; my @na;
  @na= $f->each_tag_value('Name'); 
  if (@na>0) { $nm= shift @na; return $f->method .":". $nm . $loc; }
  @na= $f->each_tag_value('Alias'); 
  if (@na>0) { $nm= shift @na; return $f->method .":". $nm . $loc; }
  return $f->method .":". $f->name . $loc;
  }

## NOTE: this is used by TextMapDumper plugin
#  my $link  = $browser->config->code_setting($label,'dbx_link');
#  $link     = $browser->config->code_setting(general=>'dbx_link') unless defined $link;
dbx_link = sub {
  my $dbx= shift; my $f= shift; #?
  my $r='';
  foreach my $x (split(/[,;]\s*/,$dbx)) {
    my($h,$v);
    my($db,$ac)= split/:/,$x,2;
    if ($db eq 'GB_protein') { 
      $v= $ac;
      $h= 'http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Search&db=Protein&doptcmdl=GenBank&tool=GMOD&term='.$ac;
      }
    elsif ($db eq 'GB') { 
      $v= $ac;
      $h= 'http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Search&db=Nucleotide&doptcmdl=GenBank&tool=GMOD&term='.$ac;
      }
    elsif ($db eq 'GO') { 
      $v= $ac;
      $h= '/cgi-bin/goreport?id='.$ac;
      }
    if ($h && $v) { $r.= '<a href="'.$h.'">'.$v.'</a>, '; }
    else { $r.= $x.', '; }
    }
  return $r;
  }
  
  

# colors of the overview, detailed map and key
overview units   = M
overview bgcolor = lightgrey
detailed bgcolor = lightgoldenrodyellow
key bgcolor      = beige

# "automatic" classes to try when an unqualified identifier is given
automatic classes = gene

language = en

# Default glyph settings
glyph       = generic
height      = 5
bgcolor     = palegoldenrod
fgcolor     = cyan
boxcolor    = blue
label density = 20
bump density  = 50
overview label density = 160

image widths  = 450 640 800 950 1024
default width = 800

# Various places where you can insert your own HTML -- see configuration docs
html1 = 
html2 = 
html3 = 
html4 = 
html5 = 
html6 = 


### TRACK CONFIGURATION ####
# the remainder of the sections configure individual tracks
  
[binding_site]
feature  = binding_site
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = binding_site
citation = binding_site
category = "Analysis features"


[cdna_match]
feature  = cdna_match
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = cdna_match
citation = cdna_match
category = "Analysis features"


[CDS]
feature  = CDS
glyph = segments
stranded     = 1
translation  = 1frame
bgcolor = palegoldenrod
fgcolor = goldenrod
label = 1
key  = CDS
citation     = Protein coding sequence (CDS or translation)
category = '  Gene Model subfeatures'


[clone_end]
feature  = clone_end
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = clone_end
citation = clone_end
category = "Analysis features"


[clone_start]
feature  = clone_start
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = clone_start
citation = clone_start
category = "Analysis features"


[complex_substitution]
feature  = complex_substitution
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = complex_substitution
citation = complex_substitution
category = "Analysis features"


[deletion]
feature  = deletion
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = deletion
citation = deletion
category = "Analysis features"


[est_match]
feature  = est_match
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = est_match
citation = est_match
category = "Analysis features"


[exon]
feature  = exon
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = exon
citation = exon
category = "Analysis features"


[experimental_result_region]
feature  = experimental_result_region
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = experimental_result_region
citation = experimental_result_region
category = "Analysis features"


[expressed_sequence_match]
feature  = expressed_sequence_match
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = expressed_sequence_match
citation = expressed_sequence_match
category = "Analysis features"


[five_prime_UTR]
feature  = five_prime_UTR
glyph = segments
stranded     = 1
label = 1
key  = 5prime UTR
citation     = five_prime_UTR  
category = '  Gene Model subfeatures'
link = "#"


[gene]
feature       = gene transcript  
#feature       = gene mRNA
glyph         = transcript2
bgcolor       = lightblue
fgcolor       = blue
secondary     = mRNA
secondary_bgcolor = mediumblue
secondary_fgcolor = mediumblue
highlight_color = red
higlighted = 1
label = 1
label density = 50
key           = Gene Model
category = "  Genomic features"
citation     = Gene and mRNA (transcript) features  


[insertion]
feature  = insertion
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = insertion
citation = insertion
category = "Analysis features"


[inverted_repeat]
feature  = inverted_repeat
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = inverted_repeat
citation = inverted_repeat
category = "Analysis features"


[mirna]
feature  = mirna
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = mirna
citation = mirna
category = "Analysis features"


[mrna]
feature  = mrna
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = mrna
citation = mrna
category = "Analysis features"


[nc_primary_transcript]
feature  = nc_primary_transcript
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = nc_primary_transcript
citation = nc_primary_transcript
category = "Analysis features"


[nucleotide_match]
feature  = nucleotide_match
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = nucleotide_match
citation = nucleotide_match
category = "Analysis features"


[oligo]
feature  = oligo
glyph         = generic
bgcolor       = tomato
fgcolor       = tomato
height       = 4
bump          = 0
bump density  = 1
label         = 0
label density = 0
key           = Affy Oligo
citation     = oligonucleotide 
category = " Genome reagents"
link = sub { my $f= shift;
 return ($f->name())?'/cgi-bin/fbannq.html?oligo='.$f->name() : ''; }


[operon]
feature  = operon
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = operon
citation = operon
category = "Analysis features"


[pcr_product]
feature  = pcr_product
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = pcr_product
citation = pcr_product
category = "Analysis features"


[polya_signal_sequence]
feature  = polya_signal_sequence
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = polya_signal_sequence
citation = polya_signal_sequence
category = "Analysis features"


[polyA_site]
feature  = polyA_site
strand_arrow  = 1
bgcolor       = lightslategray
fgcolor       = lightslategray
key           = polyA_site 
citation     = polyA_site 
category = "  Misc. Genomic features"
link = sub {
  my $v=shift->name(); $v=~s/\-\d+.*$/\*/; $v=~s/\+/\?/g; return '/cgi-bin/lookup?name='.$v;  
 }


[processed_transcript]
feature  = processed_transcript
glyph         = processed_transcript
bgcolor       = plum
fgcolor       = plum
height       = 4
bump          = 1
label         = 0
key           = Processed transcript
citation     = processed_transcript 
category = "Analysis features"


[protein_coding_primary_transcript]
feature  = protein_coding_primary_transcript
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = protein_coding_primary_transcript
citation = protein_coding_primary_transcript
category = "Analysis features"


[protein_match]
feature  = protein_match
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = protein_match
citation = protein_match
category = "Analysis features"


[pseudogene]
feature  = pseudogene
glyph = segments
strand_arrow  = 1
fgcolor       = orange
label = 1
key           = Pseudogene
category = "  Genomic features"


[reagent]
feature  = reagent
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = reagent
citation = reagent
category = "Analysis features"


[region]
feature  = region
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = region
citation = region
category = "Analysis features"


[repeat_region]
feature   = repeat_region
bgcolor       = darkorchid
fgcolor       = darkorchid
height        = 3
connector     = solid
bump          = 1
strand_arrow  = 0
label         = 0
key           = Repeat region
citation     = repeat_region 
category = "Analysis features"
link =


[rnai_reagent]
feature  = rnai_reagent
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = rnai_reagent
citation = rnai_reagent
category = "Analysis features"


[rrna]
feature  = rrna
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = rrna
citation = rrna
category = "Analysis features"


[scrna]
feature  = scrna
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = scrna
citation = scrna
category = "Analysis features"


[sequence_variant]
feature  = sequence_variant
strand_arrow  = 1
bgcolor       = lightslategray
fgcolor       = lightslategray
key           = sequence_variant 
citation     = sequence_variant 
category = "  Misc. Genomic features"
link = sub {
  my $v=shift->name(); $v=~s/\-\d+.*$/\*/; $v=~s/\+/\?/g; return '/cgi-bin/lookup?name='.$v;  
 }


[snorna]
feature  = snorna
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = snorna
citation = snorna
category = "Analysis features"


[snp]
feature  = snp
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = snp
citation = snp
category = "Analysis features"


[snrna]
feature  = snrna
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = snrna
citation = snrna
category = "Analysis features"


[substitution]
feature  = substitution
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = substitution
citation = substitution
category = "Analysis features"


[tandem_repeat]
feature  = tandem_repeat
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = tandem_repeat
citation = tandem_repeat
category = "Analysis features"


[three_prime_UTR]
feature  = three_prime_UTR
glyph = segments
stranded     = 1
label = 1
key  = 3prime UTR
citation     = three_prime_UTR  
category = '  Gene Model subfeatures'
link = "#"


[trans_splice_acceptor_site]
feature  = trans_splice_acceptor_site
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = trans_splice_acceptor_site
citation = trans_splice_acceptor_site
category = "Analysis features"


[transcript]
feature  = transcript
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = transcript
citation = transcript
category = "Analysis features"


[translated_nucleotide_match]
feature  = translated_nucleotide_match
glyph    = segments
bgcolor  = lightslategray
fgcolor  = black
key      = translated_nucleotide_match
citation = translated_nucleotide_match
category = "Analysis features"


[transposable]
feature  = transposable_element
bgcolor       = magenta
fgcolor       = magenta
label = 1
glyph         = anchored_arrow
key           = Natural transposon
citation     = Natural transposon 
category = "  Genomic features"


[tinsert]
feature  = transposable_element_insertion_site
glyph         = pinsertion
bgcolor       = darkturquoise
fgcolor       = darkturquoise
bump          = 1
label         = 0
key           = Transgene insertion site
citation     = Transgene insertion site 
category = "  Genomic features"


[tRNA]
feature  = tRNA
glyph = transcript2
label = 1
stranded     = 1
bgcolor      = white
fgcolor      = black
curatedexon  = slateblue
fontcolor    = slateblue
key          = tRNA
category = "  Genomic features"
citation     = These are tRNA predictions made using Sean Eddy's tRNAscan program.

.
