[MOBY] [MOBY-l] PubFetch - MOBY
Mark Wilkinson
markw at illuminae.com
Mon Aug 11 21:25:27 UTC 2003
On Mon, 2003-08-11 at 14:50, Vijay Narayanasamy wrote:
> 1. Is Global_Keyword a good Namespace for PubMed query? Or can we have
> "PubMed/Query"
Is there something "special" about the keywords you are sending to the
service? If not, then we shouldn't make a special namespace for them
because that just interferes with interoperability (it is exactly those
kinds of decisions that led to the problem we are now trying to solve
:-) )
The issue of whether keywords are a valid namespace *at all* is another
question altogether, which we should probably discuss on-list, as I know
that others have expressed opinions about that...
> 2. Should I return "PMID" as an Object from the PubMed for given query
> instead of "String" with "PMID" as Namespace
You should be returning: <Object namespace="PMID" id="18273823"/>
Since your object has no content it isn't a String, it is only an id
number - therefore it is represented as the base "Object" Class
> 3. I think it is a good idea to register a "PubMed/Medline" object for
> article returned from PubMed in Medline format. Like wise we can register
> "PubMed/XML" for article returned in XML format from PubMed,
> "PubMed/Summary" for article summary retrieved from PubMed ...
I agree, but make sure that PubMed/Medline inherits from text/plain and
that PubMed/XML inherits from text/xml so that renderers know how to
make sense of them.
I am planning to do the same thing with Genbank records - creating an
NCBI/GenBank Class that inherits from text/plain... we should
eventually do this with all common flatfile formats.
> 4. Also is it a good idea to have "PubMed/ID" as namespace for PubMed ID
> object instead of "PMID"?
No. The MOBY namespaces are rooted in the Gene Ontology Cross-Reference
abbreviations list. In that list, PubMed ID's are abbreviated 'PMID',
so that is what we use.
> Can a service accept more than one namespace or object as input or output
> (to have flexibility and to make better use of other services available in
> BioMOBY)?
absolutely! Read the API :-)
There are two ways to send multiple objects into a service, depending on
your intention. If you intend that the objects should be considered a
*single input* (i.e. that you will take all of them a generate a *single
object* as output), then you set up your service to accept a "Collection
Input", rather than a "Simple Input". If you intend that the client
sends you a stream of ID's, each of which should be treated as an
individual request, then you do nothing more than what you have done,
since that is the behaviour your service should be exhibiting already
(if it isn't, then it isn't following the API properly...)
the behaviour of your service is a bit confusing... If I send a single
keyword ("acetabularia"), I get many PMID's in response. If I send a
single keywork ("arabidopsis"), I get a similar number of PMID's in
response. However, if I send two keywords as a request stream, i only
get *one* PMID in response... what I *should* get, if the service is
functioning properly, is the (redundant) sum of the two lists.
Also, according to the API, if your services changes the namespace of
the data as it executes its transformation (as yours does - from
"Global_keyword" to "PMID") then you *must* return a cross-reference
block indicating the originating namespace/id. For you, it would look
something like:
<Object namespace="PMID" id="172873">
<CrossReference>
<Invocation namespace="Global_Keyword" id="arabidopsis"/>
</CrossReference>
</Object>
So... you're *close* to being MOBY compliant... but not quite :-)
Cheers! Good to see you got it working in principle!!
M
More information about the moby-l
mailing list