[moby] [MOBY-dev] Perl API: retrieveObjectDefinition call

Mark Wilkinson markw at illuminae.com
Wed Nov 2 16:12:56 UTC 2005


I think you're right - that's a much better data structure to be passing
around.

This does change the external (perl client) API, right?  :-/

Really, what the Perl client code needs is a good laundering.  The
CommonSubs.pm module is a total mess after being modified piecemeal over
the past 3 years...

I wonder if we shouldn't just start a new module (or modules) that are
named by their domain of function (RegistryIO, OntologyIO, or something
like that) and have all fresh code?  Gradually we could migrate all
functionality into these modules.  Client::Central has been around since
the 0.1 prototype of MOBY in 2001 and has never been re-written top-to-
bottom!

I'm still waiting to hear about the re-funding attempts for MOBY...
fingers crossed!  There will hopefully be a second opportunity later in
the winter, so all is not lost if we fail.  It would be great to have a
couple of extra hands dedicated to a complete code re-write.

M




On Wed, 2005-11-02 at 13:44 +0100, Pieter Neerincx wrote:
> Hi all,
> 
> Here is a question for those using the Perl API. In
> 
> 	MOBY/Client/Central.pm
> 
> we have a
> 
> 	sub retrieveObjectDefinition
> 
> which calls
> 
> 	sub _ObjectDefinitionPayload {
> 
> This produces an array for the objects, articleNames and lsids for  
> the relationships of the object whose definition is requested. I'm  
> wondering why this is an array. Currently I have to rely on the order  
> of elements in this array to figure out which element is the object,  
> which one is articleName, etc. These are the lines producing the array:
> 
> 553     push @{ $relationships{$relationshipType} },
> 554              [ $_->toString, $article, $rlsid ];
> 
> Is there any reason why this should be an array? I'd rather not have  
> to rely on the order of the elements, so are there people who have  
> any objections when I change this into a hash like in:
> 
>          push @{ $relationships{$relationshipType} },
>                   { object      => $_->toString,
>                     articleName => $article,
>                     lsid        => $rlsid };
> 
> Cheers,
> 
> Pieter
> 
> 
> 
> 
> Wageningen University and Research centre (WUR)
> Laboratory of Bioinformatics
> Transitorium (building 312) room 1034
> Dreijenlaan 3
> 6703 HA Wageningen
> The Netherlands
> phone: 0317-483 060
> fax: 0317-483 584
> mobile: 06-143 66 783
> pieter.neerincx at wur.nl
> 
> 
> 
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at biomoby.org
> http://www.biomoby.org/mailman/listinfo/moby-dev
-- 
"Ontologists do it with the edges!"

Mark Wilkinson
Asst. Professor
Dept. of Medical Genetics
University of British Columbia
PI in Bioinformatics
iCAPTURE Centre
St. Paul's Hospital
Rm. 166, 1081 Burrard St.
Vancouver, BC, V6Z 1Y6
tel: 604 682 2344 x62129
fax: 604 806 9274




More information about the MOBY-dev mailing list