[Bioperl-l] Bio::Graphics Description layout question

Roels, Steven Steven.Roels at mpi.com
Fri Jul 16 10:33:24 EDT 2004


Nathan

>-----Original Message-----
>From: Agrin, Nathan [mailto:Nathan.Agrin at umassmed.edu]
>Sent: Friday, July 16, 2004 10:19 AM
>To: Roels, Steven; bioperl-l at bioperl.org
>Subject: RE: [Bioperl-l] Bio::Graphics Description layout question
>
>Thanks for the help,
>
>Using the -key_style=>'right' seems to work on some tests I ran, but as
>soon as I feed -key the function " sub { $des =
>$feature->each_tag_value('description'), "$description"; } " it stops
>working.  I can feed the -key something like sub { return "test" } and
>it works fine.  I've been really frustrated trying to deal with this
and
>any help is appreciated.
>

You need to handle to passed-in feature:

sub { ($des) = $_[0]->get_tag_values('description'); }

or 

sub { my $feature = shift;
      ($des) = $feature->get_tag_values('description'); }

this assumes your features always have that tag - otherwise you need to
test for it:

sub { my $feature = shift;
	( $feature->has_tag('description') ) ? 
      ($feature->get_tag_values('description'))[0] : "no_desc"; }


warning - didn't test the above, so pardon any typos :)

Hope that helps.


>
>
>-----Original Message-----
>From: Roels, Steven [mailto:Steven.Roels at mpi.com]
>Sent: Thursday, July 15, 2004 6:57 PM
>To: Agrin, Nathan; bioperl-l at bioperl.org
>Subject: RE: [Bioperl-l] Bio::Graphics Description layout question
>
>
>Nathan,
>
>I believe you need:
>
>-key_style=>'right'
>
>as an option to
>
>Bio::Graphics::Panel->new()
>
>But then you need to have:
>
>-pad_right=>$padright
>
>as well, such that $padright is big enough to fit the keys
>
>See the poddoc for Bio::Graphics::Panel...
>
>-Steve
>
>>-----Original Message-----
>>From: bioperl-l-bounces at portal.open-bio.org [mailto:bioperl-l-
>>bounces at portal.open-bio.org] On Behalf Of Agrin, Nathan
>>Sent: Thursday, July 15, 2004 1:13 PM
>>To: bioperl-l at bioperl.org
>>Subject: [Bioperl-l] Bio::Graphics Description layout question
>>
>>Is there anyway to get the bioperl graphics package to draw the
>>descriptions for the tracks to the right of the tracks?  I've seen
>>something like this done with a browser developed by JGI.  Here is the
>>link to an example:
>>
>>http://genome.jgi-psf.org/cgi-bin/dispGeneModel?db=chlre2
>><http://genome.jgi-psf.org/cgi-bin/dispGeneModel?db=chlre2&id=157911>
>>&id=157911
>>
>>Thanks,
>>Nate
>
>
>
>This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary and/or privileged.  This e-mail is intended only for the
>individual(s) to whom it is addressed, and may not be saved, copied,
>printed, disclosed or used by anyone else.  If you are not the(an)
>intended recipient, please immediately delete this e-mail from your
>computer system and notify the sender.  Thank you.




This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.




More information about the Bioperl-l mailing list