<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>SCRY: Enabling quantitative reasoning in SPARQL queries</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Bas Stringer</string-name>
          <email>b.stringer@vu.nl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Albert Meroño-Peñuela</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Antonis Loizou</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sanne Abeln</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jaap Heringa</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Centre for Integrative Bioinformatics, VU University Amsterdam</institution>
          ,
          <addr-line>NL</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Data Archiving and Networked Services</institution>
          ,
          <addr-line>KNAW, NL</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Knowledge Representation and Reasoning Group, VU University Amsterdam</institution>
          ,
          <addr-line>NL</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>The inability to include quantitative reasoning in SPARQL queries slows down the application of Semantic Web technology in the life sciences. SCRY, our SPARQL compatible service layer, improves this by executing services at query time and making their outputs query-accessible, generating RDF data on demand. The power of this approach is demonstrated with two use cases, where we use SCRY to calculate standard deviations and to find homologous proteins.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>More and more biological knowledge is being made available through the
Semantic Web as Linked Open Data. However, not all knowledge is easily captured or
stored in static triple repositories. This is especially true for knowledge derived
from quantitative reasoning.</p>
      <p>For example, BLAST is commonly used to predict homology, but its input
parameters and interpretation of its output vary greatly depending on the
research question. Precomputing the outcomes of all parameter combinations and
every conceivable input is practically impossible. Thus, using BLAST results in a
SPARQL query, for example to look up information about a protein’s homologs,
requires these results to be generated, analysed and incorporated at query time.
No currently available tools facilitate this effectively.</p>
      <p>Likewise, the standard deviation of a set of measurements can be used to
detect outliers. Thus, if an observation is classified as an outlier depends on the
other observations in the set. Many triplestores contain data which a simple
query can group into sets, but SPARQL does not support a straightforward
way to calculate their standard deviation. This makes it difficult to use outlier
selection in SPARQL queries.</p>
      <p>More generally, many research questions require some form of quantitative
reasoning. Such reasoning is currently poorly supported within SPARQL queries
and is often infeasible to capture through precalculation; this hinders the
application of Semantic Web technology to research questions in the life sciences.</p>
      <p>We present SCRY, the SPARQL compatible service layer, which is a lightweight
SPARQL endpoint that interprets parts of basic graph patterns as calls to user
defined services. These services are evaluated at query time, generating triples
needed to resolve the query on the fly.</p>
      <p>SCRY allows users to incorporate algorithms of arbitrary complexity within
standards-compliant SPARQL queries, and to use the generated outputs directly
within these same queries. Unlike traditional SPARQL endpoints, the RDF graph
against which SCRY resolves its queries is generated at query time, by executing
services encoded in the query’s graph patterns. Figure 1 illustrates the dataflow
of a typical query using SCRY, where its services are accessed through federated
queries from a primary endpoint.</p>
      <p>The federation-oriented design allows for easy integration with existing SPARQL
endpoints and tools. Moreover, SCRY facilitates the execution of arbitrary
services within SPARQL queries, which enables quantitative reasoning as well as
other forms of data processing and analysis. Ultimately, this allows Semantic
Web technologies to be more effectively applied to research questions in the life
sciences.</p>
      <p>We demonstrate the power of SCRY’s on-the-fly triple generation with two
use cases. First, we select outliers among GO-annotated proteins from the UniProt
SPARQL endpoint, using SCRY to calculate the standard deviation of their
sequence lengths. Second, we combine SCRY, BLAST and the Human Protein
Atlas to find homologous proteins which are expressed in the same tissues as a
query protein.</p>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>