[Bioperl-l] GBroswe2 - feature details

Smithies, Russell Russell.Smithies at agresearch.co.nz
Sun Jun 7 20:32:27 UTC 2009


For the first part of your question, you can use a sub to access values in your annotations:

balloon hover = sub{my $f = shift;
			my %a = $f->attributes;
			my $name = $f->name;
			my $seq = $a{'BS_Seq'};
			return "<font size=small color=red>Motif name: $name, Sequence: $seq</font>" if defined $seq;
			return "<font size=small color=red>Motif name: $name, No sequence defined</font>";
			}


For the second bit, here's the formatting rules I'm using to create hyperlinks:

[Dbxref:DETAILS]
URL = sub {
      my ($tag,$value)=@_;
      if ($value =~ /NCBI_gi:(.+)/){
       return "http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?val=$1";
       }
      if ($value =~ /NCBI_Gene:(.+)/){
       return "http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=Retrieve&db=gene&list_uids=$1";
       }
       return;
     }

And this is what the gff looks like:
BTA10	refseq	mRNA	10011147	10176454	0	-	.	ID=NM_001076052;Name=NM_001076052;Index=1;Alias=HOMER1;Note=homer homolog 1 (Drosophila);Dbxref=NCBI_gi:115496957;Dbxref=NCBI_Gene:535311;
BTA10	refseq	mRNA	10241506	10301142	0	+	.	ID=NM_001046361;Name=NM_001046361;Index=1;Alias=PAPD4,MGC138008;Note=PAP associated domain containing 4;Dbxref=NCBI_gi:114052221;Dbxref=NCBI_Gene:533862;

Hopefully, this will get you going :-)


Russell Smithies 

Bioinformatics Applications Developer 
T +64 3 489 9085 
E  russell.smithies at agresearch.co.nz 

Invermay  Research Centre 
Puddle Alley, 
Mosgiel, 
New Zealand 
T  +64 3 489 3809   
F  +64 3 489 9174  
www.agresearch.co.nz 



> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Alper Yilmaz
> Sent: Saturday, 6 June 2009 6:51 a.m.
> To: BioPerl List
> Subject: [Bioperl-l] GBroswe2 - feature details
> 
> Dear all,
> 
> I have a question about utilizing the tag/value pairs that were used
> in 9th of GFF. If my 9th column is like this:
> 
> ID=BS_1;BS_Seq=cacatg;BS_Color=Purple;Name=AtMYC2 BS in RD22
> 
> How can I use BS_Seq, BS_Color tags, say, in a balloon? If want to
> print name and sequence of a BindingSite, what do I need to replace
> question marks below?
> 
> balloon hover = <font size=small color=red>Motif name: $name,
> Sequence: ???????</font>
> 
> 
> The manual is mentioning that it's possible to use user defined
> tag/value pairs, but I couldn't figure out how. The manual is
> mentioning:
>  [feature_type:details]
>  tag1 = formatting rule
>  tag2 = formatting rule
>  tag3 = formatting rule
> 
> can be used to adjust formatting of a tag, but I don't how this can be
> used to assign value to a tag? I tried ;
> [cis-elements:details]
> bs_seq = <b>$value</b>     (I didn't use BS_Seq, since it was
> mentioned, tags are case-insensitive)
>  OR
> $bs_seq = <b>$value</b>
> 
> but, I cannot use $bs_seq in hover link option after doing this. What
> am I doing wrong?
> 
> thanks,
> 
> Alper Yilmaz
> Post-doctoral Researcher
> Plant Biotechnology Center
> The Ohio State University
> 1060 Carmack Rd
> Columbus, OH 43210
> (614)688-4954
> www.grassius.org
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================




More information about the Bioperl-l mailing list