[Bioperl-l] Question about accessing tags in Bio::SeqFeature::Generic

Hilmar Lapp hlapp at gmx.net
Sat Mar 26 23:55:08 EST 2005


$feature->get_tag_values() will throw an exception if the tag does not 
exist. You need to check first using $feature->has_tag().

Apparently you asked for values for tag 'tag', which is not a tag given 
your initialization example. Instead, -repname,  -repClass, etc are 
tags that you can ask the values for.

On Friday, March 25, 2005, at 10:25  AM, iluminati at earthlink.net wrote:

> Fair enough.  Here's the error message...
> ------------- EXCEPTION  -------------
> MSG: asking for tag value that does not exist tag
> STACK Bio::SeqFeature::Generic::get_tag_values 
> C:/Perl/site/lib/Bio/SeqFeature/G
> eneric.pm:501
> STACK main::L1PA1presence L1PA1presence.pm:43
> STACK toplevel ThesisScript.pl:167
>
> --------------------------------------
>  I know that it's supposed to return an array from which I can access 
> the tag values, but if I can't get the array, how can I get the tag 
> values?  Thanks for the help.
>
>
> Hilmar Lapp wrote:
>
>> *Always* provide the error message. Nobody of us has a crystal ball. 
>> 'isn't working for me' why? because of error or because you need 
>> something that it isn't designed to return?
>>
>> On Thursday, March 24, 2005, at 06:10  PM, iluminati at earthlink.net 
>> wrote:
>>
>>> I have a question about a the Bio::SeqFeature::Generic that doesn't 
>>> seem clear to me from the docs.  Here's an example of the seq 
>>> feature I'm creating...
>>>
>>> my $RepeatElement = new Bio::SeqFeature::Generic(     -start => 
>>> $L1HERVLine[6],
>>>                                            -end => $L1HERVLine[7],
>>>                                            -strand => $L1HERVLine[9],
>>>                                            -source => 'Repeat',
>>>                                            -tag =>{
>>>                                            -repName => 
>>> $L1HERVLine[10],
>>>                                            -repClass => 
>>> $L1HERVLine[11],
>>>                                            -repFamily => 
>>> $L1HERVLine[12]}
>>>                                            );
>>>
>>> Now, the feature itself creates fine.  However, it isn't clear how I 
>>> would retrieve information from the tag has.  The get_tag_value() 
>>> function isn't working for me, and I can't access the hash directly. 
>>>  What should I do to be able to access the data?  Let me know, and 
>>> thanks in advance.
>>>
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at portal.open-bio.org
>>> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>>>
>>>
>
>



More information about the Bioperl-l mailing list