Personal tools
You are here: Home log perl
Document Actions

perl

logs about perl

1   2009-2-4 custom GBrowse GFF3

1.2   steps

  1. if the last column of a non-chromosome line has 'ID' in it, find corresponding gene id using its value and add gene_symbol as 'Alias' and description as 'description'. Escape ; and , with %3B and %2C. code is variation/src/ImproveTAIRGeneGFF.py.

  2. re-initialize and load the new GFF file into db by dazhe's init_db.pl and load.pl

  3. add following configuration into arabidopsis1.conf:

    label   = sub {
                       my $feature = shift;
                       #my @aliases = $feature->aliases;
                       my @aliases = $feature->attributes('Alias');    #2009-2-4 both above and this works
                       #my @gene_symbol = $feature->attributes('gene_symbol');
                       #2009-2-4 gene_symbol is not built into the gbrowse search engine. but Alias is.
                       return "@aliases";
                       #return "@gene_symbol";
               }
    balloon hover   = sub {
               my $feature = shift;
               my $n = $feature->name();
               my $ref = $feature->seq_id();
               my $start = $feature->start();
               my $end = $feature->end();
               my @description = $feature->attributes("description");
               #my @notes = $feature->notes;   #if the description is put under 'Note'
               return "Protein Coding Gene: $n $ref:$start..$end.  @description";
               #return "@description";
               }
    

One tricky thing is that feature->attributes("xxx") returns an array (@) and array has to be wrapped within ", i.e. "@description".

« November 2009 »
Su Mo Tu We Th Fr Sa
1234567
891011121314
15161718192021
22232425262728
2930
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: