Hello Rafael,
Properties in BioPAX (and in RDF/OWL in general) do not have an
order. If Reactome output behaves as you describe, they are doing
something non-standard. Perhaps some one from Reactome can comment on
this?
If for some reason you still need the order: OpenRDF Sesame allows
you to write your own RDF handler, which receives the statements
directly from the RDF parser, I'm assuming in the order they appear in
the input.
I prefer Sesame to Jena, because Sesame is much more transparently
divided into components, allowing you to use some components of it
while skipping others, and to reimplement some of their interfaces. If
all you need is reading and writing RDF, you only need a small
fraction of Sesame (the parts named RIO, Model and Util, I think)
Take care
Oliver
On Wed, Jun 6, 2012 at 6:32 AM, Rafael Alcántara
<
rafael.a...@ebi.ac.uk> wrote:
> Hi.
>
> I am trying to find a workaround to a problem, perhaps some of you can help.
> Reactome's BioPAX level 2 file contains some smallMolecule instances
> with more than one XREF to ChEBI, being converted from Reactome's
> EntitySets (alternative substrates/products).
> I want to parse this file and extract the different reactions from the
> concrete substrates/products, but to that end both collections of xrefs
> (alternative substrates and alternative products) must be ordered to
> make the proper correspondence. While the BioPAX file seems to have the
> XREFs ordered, some of these Reactome EntitySets are properly assigned,
> but others are not.
>
> I see the implementation in ReferenceHelper
> (
http://biopax.sourceforge.net/paxtools-4.1.1/paxtools-core/xref/org/biopax/paxtools/impl/level2/ReferenceHelper.html#25)
> is a HashSet. That might be the reason, but I don't know how Jena is
> handling the model under the hood (I use
> JenaIOHandler().convertFromOWL(InputStream)).
>
> Any ideas are more than welcome.
> Thanks in advance,
>
> --
> Dr. Rafael Alcántara
--
Oliver Ruebenacker
Bioinformatics Consultant (
http://www.knowomics.com/wiki/Oliver_Ruebenacker)
Knowomics, The Bioinformatics Network (
http://www.knowomics.com)
SBPAX: Turning Bio Knowledge into Math Models (
http://www.sbpax.org)