[MOBY-l] Quick survey of opinions on query structure

Simon Twigger simont at mcw.edu
Fri Feb 7 20:56:24 UTC 2003


Are we going to be limited to simple <Object> tags as described here or  
can the object be arbitrarily complicated? For example, Im trying to  
write a PubMed query service, Id like to pass in a variety of  
information to the query - keywords, date, author, journal, etc. Should  
these be a collection of discrete objects or a single  
litdb_query_object?

For example:
<MOBY>
	<Object namespace="journal_name" id="J.biol. chem."/>
	<Object namespace="author/name" id="smith, j"/>
	<Object namespace="date" id="2002"/>
</MOBY>

or can I create a complex lit_db_query object:

(Not sure how this would fit into an existing MOBY Object tag...)

<MOBY>
	<Object type="litdb_query">
		<litdb_query db="pubmed">
			<journal>J.Biol.Chem</journal>
			<authors>
				<author>Smith, j</author>
			</authors>
			<date>2002</date>
		</litdb_query>
	</Object>
</MOBY>

Presumably as long as the service knows what its getting it can handle  
either approach, the latter more complex object seems more flexible as  
I'd like to be able to use this for passing information that goes  
beyond namespace/Id pairs. I want to use a moby service to pass mass  
spec DTA files into SEQUEST - this would need an object along the lines  
of:

<MOBY>
	<Object namespace="dta">
		<data peptide_mass="1000" peptide_charge="2">
			<peak mz_ratio="123" intensity="456">
			<peak mz_ratio ="789" intensity="543">
			<peak mz_ratio ="153" intensity="723">
			...
		</data>
	</Object>
</MOBY>

Im not sure how easy its going to be if we have just option 1 or 2. I  
think we need an option 3 - pass in whatever object you like as long as  
the service understands it. This could range from the simple case - a  
single object tag with namespace and ID all the way up to a complex XML  
document.

Simon.


On Wednesday, Feb 5, 2003, at 09:12 America/Chicago, Mark Wilkinson  
wrote:

> Hi all,
>
> Off-list Lukas and I have been having a friendly argument about how  
> MOBY
> collection objects should be structured.
>
> <moby:background>To date, all existing services have been "simple", in
> that they take only one copy of one object type as their input, and
> generate one copy of one object type as their output.  Arguments about
> passing parameters aside for another day, this is obviously too
> simplistic for some services, which might require e.g. a GO id and a
> taxonomy object, together, to execute the
> transformation.</moby:background>
>
> So, the most simple query is currently structured this way:
>
> <MOBY>
> 	<Object namespace="foo" id="bar"/>
> </MOBY>
>
> A series of simple queries is currently structured in this way:
>
> <MOBY>
> 	<Object namespace="foo" id="bar1"/>
> 	<Object namespace="foo" id="bar2"/>
> 	<Object namespace="oof" id="rab"/>
> 	...
> </MOBY>
>
>
> When Damian and I originally discussed the idea of multi-component
> queries in Bethesda we had tossed around the idea that we would have a
> special "Collection" XML tag to group together objects that were
> components of a single query.  Since then, Lukas and I have been going
> back and forth about whether or not this is the most sensible idea.
>
> Here is what the SOAP payload looks like under the two proposals (as I
> understand them - Lukas, please correct me if I am misrepresenting your
> view):
>
> 1)  'MOBY' element used to group the objects by query:
> 	
> 	<MOBY>
> 		<Object id="namespace1" id="123"/>
> 		<Object id="namespace2" id="456"/>
> 	</MOBY>
> 	<MOBY>
> 		<Object id="namespace1" id="147"/>
> 		<Object id="namespace2" id="988"/>
> 	</MOBY>
> 	...
>
> 2)  'Collection' element used to group the objects by query:
>
> 	<MOBY>
> 		<Collection>
> 			<Object id="namespace1" id="123"/>
> 			<Object id="namespace2" id="456"/>
> 		</Collection>
>
> 		<Collection>
> 			<Object id="namespace1" id="147"/>
> 			<Object id="namespace2" id="988"/>
> 		</Collection>
> 	</MOBY>
>
>
>
> Keeping in mind that we are not yet married to any given structure, I'd
> like to get others opinions on the matter.
>
> Arguments for model 1:  <MOBY> tags are used for what they were  
> intended
> - that is, to define the input to a query.  (As such, the current
> structure for multiple queries is incorrect and should be modified such
> that each query in the list has its own <MOBY> tag).  This reduces the
> complexity of the query structure, and ensures that the query structure
> is consistent from one query to another (versus model 2 where the
> <Collection> tags are only used if the query is a complex one). Lukas,
> do you want to add more arguments here?
>
> Arguments against model 1:  There is no document root in the SOAP
> payload, thus a "fake" one would have to be added before the payload is
> passed to an XML parser.
>
> Arguments for model 2:  There is a document root, and all MOBY
> transactions are enclosed in a single MOBY element.  Thus the SOAP
> payload can be passed verbatim to an XML parser.
>
> There is also a straw-man I can throw out at you all - that being the
> following case:
>
>
> 	<MOBY>
> 		<Collection>
> 			<Object id="namespace1" id="123"/>
> 			<Object id="namespace2" id="456"/>
> 		</Collection>
>
> 		<Object id="namespace1" id="147"/>
>
> 		<Collection>
> 			<Object id="namespace1" id="123"/>
> 			<Object id="namespace2" id="455"/>
> 		</Collection>
>
> 	</MOBY>
>
> where there is a mixture of Collection-queries and simple queries in  
> teh
> same message.  This should never be the case, because the service
> signatures are sufficiently different that a single MOBY service could
> not be registered to deal with both of these query formats... hence it
> is a straw man (at the moment).
>
> Anyway, I'd like to get others opinions on this before I do much more
> coding, as it is ~functionally irrelevant which one we chose, but we
> need to nail it down in the spec so that people can code their services
> properly.
>
> Mark
>
>
> --  
> =======================================================================
>                                     |--==\
> Mark Wilkinson                       \==-|
> Bioinformatics Consultant             \=/        0010010010100101110010
> Illuminae Media                       /-\
> 727 6th Ave. N.                      /-==|       0010100100111101010010
> Saskatoon, SK, Canada               |==-/
> S7K 2S8                              \=/         0100100100010010010101
> +1 (306) 373 3841                     /\
> markw at illuminae.com                  /=-\        1101001010100101010101
>                                     |--==\
> =======================================================================
>
> _______________________________________________
> moby-l mailing list
> moby-l at biomoby.org
> http://biomoby.org/mailman/listinfo/moby-l
>
>
------------------------------------------------------------------------ 
--------------------------
Simon Twigger, Ph.D.
Assistant Professor, Bioinformatics Research Center

Medical College of Wisconsin
8701 Watertown Plank Road,
Milwaukee, WI, 53226
tel. 414-456-8802, fax 414-456-6595



More information about the moby-l mailing list