[Gmod-help] Gbrowse

Scott Cain cain.cshl at gmail.com
Mon May 5 10:05:53 EDT 2008


Hi Liz,

Yes--it is not too hard to implement either.  I just requires a small
snippet of perl code in your configuration file.  For instance if you
wanted to mark some gene predictions 'confirmed' and some 'dubious', you
could add to the GFF lines for those genes flags like status=confirmed
and status=dubious.  Then in your configuration file, you would add this
(note there is nothing special about the tag 'status'--I just picked
that because I thought it sounded good):

bgcolor  = sub {
            my $feature = shift;
            my ($status) = $feature->attributes('status');
            if ($status eq 'confirmed') {
               return 'green';
            }
            else {
               return 'red';
            }
          }

See the tutorial section 2.8 for more information. It gets installed
locally when you install GBrowse, or you can look at one online at

  http://www.gmod.org/gbrowse-cgi/tutorial/tutorial.html

Scott

On Mon, 2008-05-05 at 08:56 -0500, Worthey, Elizabeth A. wrote:
> Hi. I have a quick question that I wasn’t able to find a definitive
> answer to. Is it possible to color objects within the same Gbrowse
> track differently by providing a label within the input file. For
> example could you add annotation “flags” to a predicted gene model
> track to color some genes red and others green. Thanks in advance for
> your assistance,
> 
> Liz Worthey
> 
>  
> 
> 
-- 
------------------------------------------------------------------------
Scott Cain, Ph. D.                                         cain at cshl.edu
GMOD Coordinator (http://www.gmod.org/)                     216-392-3087
Cold Spring Harbor Laboratory




More information about the Gmod-help mailing list