[Bioperl-l] undef SeqFeature tag values

Hilmar Lapp hlapp at gmx.net
Fri Aug 24 23:02:43 UTC 2007

You're supposed to call has_tag() first before you can assume that  
you can call get_tag_values() w/o an exception. That was the original  


On Aug 24, 2007, at 6:36 PM, Chris Fields wrote:

> One thing I am noticing with the rollback to tag as strings is that
> tags with an undefined value are not set; I'm assuming when tags were
> Bio::AnnotationI they were instantiated regardless with an undef
> value.  When attempting to call an undef tag with get_tag_values() I
> get:
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: asking for tag value that does not exist signalPeptideLength
> STACK: Error::throw
> STACK: Bio::Root::Root::throw /Users/cjfields/src/featann_rollback/
> bioperl-live/blib/lib/Bio/Root/Root.pm:357
> STACK: Bio::SeqFeature::Generic::get_tag_values /Users/cjfields/src/
> featann_rollback/bioperl-live/blib/lib/Bio/SeqFeature/Generic.pm:499
> STACK: t/targetp.t:189
> -----------------------------------------------------------
> I personally think of this as a feature (why set a tag at all if it
> is undef?).  However, are there any circumstances where we might want
> this behavior?  Do we want to simply return w/o a value if a tag name
> isn't found (i.e. remove the exception)?
> chris
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :

More information about the Bioperl-l mailing list