Post-compositional descriptions

2 views
Skip to first unread message

Hilmar Lapp

unread,
May 1, 2009, 1:31:04 PM5/1/09
to OBD Development
We need to convert the (I believe upon data loading) generated labels
of post-composed terms to human-consumable versions for display.

The current way to do this is based on trying to parse apart the uid
and to query for the labels of the terms taking part in the
composition and then putting together the results somehow.

I suspect there is a better way to do this that involved the OBD API
(maybe for CompositionalDescription?), but the level of documentation
is a bit overwhelming :)

An example for the kind of uid we find in the database and for what we
want to turn it into is below. Any hints for how one might best go
about this that is not based on running regular expressions against
the uid?

-hilmar

Begin forwarded message:

From: Cartik Kothari <cartik....@duke.edu>
Date: May 1, 2009 10:12:40 AM EDT
To: Hilmar Lapp <hl...@duke.edu>
Subject: Post composition example

Hi Hilmar,

Here is an example of a post composed term. The UID is

"PATO:0000407^OBO_REL:inheres_in(TAO:0000356^OBO_REL:part_of(TAO:
0001237))"

The quality UID for this term is "PATO:0000407" . Label is "flat"
Entity is "TAO:0000356^OBO_REL:part_of(TAO:0001237)". The label field
is NULL

This entity UID is to be translated to

gill raker (part of (ceratobranchial bone))

This is what the resolve label method in the OBDSQLShard class returns

Cartik

--
===========================================================
: Hilmar Lapp -:- Durham, NC -:- hlapp at duke dot edu :
===========================================================


Chris Mungall

unread,
May 1, 2009, 2:47:11 PM5/1/09
to obd...@googlegroups.com

You shouldn't need to do any parsing. If you see skolem IDs like this
in the database, they should always be accompanied by the
compositional description. At the SQL level, you should see two or
more intersection links hanging off of these.

Or, at the API level you should be able to do

cd = shard.getCompositionalDescription("PATO:
0000407^OBO_REL:inheres_in(TAO:0000356^OBO_REL:part_of(TAO:0001237))")

This gives you back one of these:
http://www.berkeleybop.org/obd/docs/org/obd/model/CompositionalDescription.html

This is all assuming the skolem IDs are in the database via the OBD
API and not via your own inserts.

(If that's the case then we can use the OBO API to parse them)

Hilmar Lapp

unread,
May 1, 2009, 3:10:46 PM5/1/09
to obd...@googlegroups.com

On May 1, 2009, at 2:47 PM, Chris Mungall wrote:

> Or, at the API level you should be able to do
>
> cd = shard.getCompositionalDescription("PATO:
> 0000407^OBO_REL:inheres_in(TAO:0000356^OBO_REL:part_of(TAO:0001237))")
>
> This gives you back one of these:
> http://www.berkeleybop.org/obd/docs/org/obd/model/CompositionalDescription.html

Great - that's what I hoped. However, this API is undocumented and
frankly doesn't give off much hint for which methods one would call to
get the pieces. Do you have a recipe-like sequence of API calls, or
which calls can be expected to return which piece of the above string?

> This is all assuming the skolem IDs are in the database via the OBD
> API and not via your own inserts.

They are in the database via the obd data loader (which probably makes
it go through the OBD API but I haven't looked into the innards of
that).

-hilmar

Reply all
Reply to author
Forward
0 new messages