[Bioperl-l] Bio::Cluster

Hilmar Lapp hlapp@gnf.org
Tue, 6 Aug 2002 12:16:52 -0600


	return "$obj";

returns a string containing the hash reference (basically a memory 
location).

I'm not sure why you want to return a stringified hash reference to 
indicate that the slot's value is unavailable or undefined. Unless 
I'm missing something that's at least very uncommon; is there a 
reason you don't want to return undef for a slot that's undef?

	-hilmar

On Monday, August 5, 2002, at 08:34  PM, Andrew Macgregor wrote:

> Hi Andreas,
>
> Andreas Matern wrote:
>
>> The docs
>> (http://docs.bioperl.org/bioperl-live/Bio/Cluster/UniGeneI.html) say
>> that the methods cytoband and gene should return strings, however they
>> occasionally return hashes....
>>
>> Is this a bug or a feature? :)
>
> This would be a feature I guess ;) When the unigene object has a 
> value for
> gene or cytoband it returns the value but when there isn't one, it 
> returns a
> reference to the unigene object itself, that's when you get the 
> hash. So the
> hash shows up when the corresponding unigene record has no value 
> for gene or
> cytoband (and also does the same on other attributes).
>
> I'm not 100 percent on why the ref to the object is returned, 
> that's just
> something the other bioperl objects do. Perhaps someone who knows 
> better
> could let us know?
>
>> I have little experience with Parse::RecDecent so I can't fix it 
>> myself...
>> I'm using the CVS version of bioperl-live....
>
> Hopefully you'll have the version that uses regexes and not
> Parse::RecDescent. I moved away from P::RD for speed reasons. If 
> you are
> getting the live version from CVS you should have the right one.
>
> Cheers, Andrew.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
--
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------