DataCollection and IDMapper

4 views
Skip to first unread message

Egon Willighagen

unread,
Mar 6, 2012, 12:36:39 PM3/6/12
to bridgedb...@googlegroups.com
Hi all,

one of the things for our DataCollection plans was to have it extend
the IDMapper interface...:

https://github.com/egonw/BridgeDb/commits/10-implementsIDMapper

But when doing this I realized that a DataCollection should be
independent from whatever backend is being used... I don't have a
solution for this yet...

For example, mapID() actually works at a IDMapper level, but the
DataCollections are kind of independent of that... or, a
DataCollection should be constructed on top of an IDMapper ...

In fact, there is public Set<Xref> mapID(Xref ref, DataSource...
tgtDataSources) ... the list of sources here reflects *to* which
sources is mapped, the DataCollection defines *from* which sources can
be mapped... so, that's not inconsistent...

Thus, the constructor of DataCollection could become:

public DataCollection(URI identifier, IDMapper)

and use the passed IDMapper as source of mappings... does that make sense?

Otherwise, we need to define expected behavior for the IDMapper
methods. Below are what I think is the right thing, some questions,
and all up for discussion :)

1.Set<Xref> mapID(Xref ref, DataSource... tgtDataSources)

This method will expand the Xref for all equivalent Xref's as defined
by the DataCollection, for each do mapping, and return the whole lot.

2. boolean xrefExists(Xref xref)

This method will also expand the Xref and return true if any of the
equivalent Xrefs is found in the IDMapper.

3. Set<Xref> freeSearch(String text, int limit)

This method should run on all DataSource's anyway, so expanding will
not have any benefit.

4. IDMapperCapabilities getCapabilities(), close(), isConnected()

I think these just get passes to the underlying IDMapper.

Does that also make sense to others?

Egon

--
Dr E.L. Willighagen
Postdoctoral Researcher
Department of Bioinformatics - BiGCaT
Maastricht University (http://www.bigcat.unimaas.nl/)
Homepage: http://egonw.github.com/
LinkedIn: http://se.linkedin.com/in/egonw
Blog: http://chem-bla-ics.blogspot.com/
PubList: http://www.citeulike.org/user/egonw/tag/papers

Christian brenninkmeijer

unread,
Mar 7, 2012, 2:06:25 AM3/7/12
to bridgedb...@googlegroups.com
Hi Egon,
I think fundementally a DataCollection is just a collection of
DataSource(s) between which someone one says that Mappings can be
generated based on rules.

So most of the IDMapper functionality will be based on this Set of
DataSources.

I will put together a working example of what I am thinking.

And send this out to you later today.


--
Christian Brenninkmeijer
University of Manchester
MyGrid team

Egon Willighagen

unread,
Mar 7, 2012, 9:43:57 AM3/7/12
to bridgedb...@googlegroups.com
On Wed, Mar 7, 2012 at 8:06 AM, Christian brenninkmeijer
<"Christian"@mygrid.org.uk> wrote:
> Hi Egon,
> I think fundementally a DataCollection is just a collection of DataSource(s)
> between which someone one says that Mappings can be generated based on
> rules.
>
> So most of the  IDMapper functionality will be based on this Set of
> DataSources.

Thanks for clarifying this over Skype chat!

What I understood from that is that this DataCollection IDMapper will
be used in parallel, effectively mapping the various collected
DataSources. I like that idea, and regret not seeing that as such in
the first place :)

I will shortly start working on Jahn's patches for transitivity...
(his patch is available from my GitHub account).

Reply all
Reply to author
Forward
0 new messages