[Bioperl-l] Graphics Panel

Torsten Seemann torsten.seemann at infotech.monash.edu.au
Mon Jan 8 23:59:57 UTC 2007


Kevin,

> matter what I do with the -description option, I can't get the locus tag
> of the gene to show up properly.  Instead I always get the description
>
> sub generic_description {
>   my $feature = shift;
>   my $description = $feature->get_tag_values("locus_tag");
>   return "$description";
> }

I don't know if this is causing your problem, but be aware that
get_tag_values() is meant to be used in array context to return all
the tag values (there could be more than one). Because you are using
it in a scalar context, it would be returning the array length
(probably "1"). If you know there is only one locus_tag (most likely),
then write:

my ($description) = $feature->get_tag_values("locus_tag");
$description ||= 'no locus tag';

--Torsten



More information about the Bioperl-l mailing list