From eb781093b1bc5b950f7720170c486b3208e7b8f4 Mon Sep 17 00:00:00 2001 From: Jerven Bolleman Date: Tue, 21 May 2024 18:37:49 +0200 Subject: [PATCH] Test more things in each query using shacl --- glyconnect/1.ttl | 2 + glyconnect/2.ttl | 2 + glyconnect/3.ttl | 2 + glyconnect/4.ttl | 2 + glyconnect/5.ttl | 2 + metanetx/1.ttl | 3 + pom.xml | 24 +++-- .../examples/CreateTestWithRDF4jMethods.java | 98 ++++++++++++++++++- .../examples/ValidateSparqlExamplesTest.java | 13 ++- uniprot/10.ttl | 1 - uniprot/11.ttl | 1 - uniprot/15.ttl | 1 + uniprot/21.ttl | 1 - uniprot/27.ttl | 1 - uniprot/28.ttl | 2 +- uniprot/29.ttl | 1 - uniprot/30.ttl | 1 - uniprot/31.ttl | 1 - uniprot/32.ttl | 1 - uniprot/36.ttl | 5 - uniprot/37.ttl | 2 - uniprot/38.ttl | 2 - uniprot/39.ttl | 2 - uniprot/40.ttl | 2 - uniprot/41.ttl | 2 - uniprot/42.ttl | 1 - uniprot/43.ttl | 1 - uniprot/44.ttl | 1 - uniprot/45.ttl | 1 - uniprot/46.ttl | 1 - uniprot/47.ttl | 3 +- uniprot/48.ttl | 3 +- uniprot/49.ttl | 1 - uniprot/5.ttl | 1 - uniprot/50.ttl | 3 +- uniprot/51.ttl | 3 +- uniprot/52.ttl | 1 - uniprot/53.ttl | 1 - uniprot/54.ttl | 1 - uniprot/55.ttl | 2 +- uniprot/56.ttl | 1 - uniprot/57.ttl | 1 - uniprot/58.ttl | 1 - uniprot/59.ttl | 1 - uniprot/60.ttl | 1 - uniprot/61.ttl | 2 +- uniprot/9.ttl | 1 - uniprot/diseases_involving_enzymes.ttl | 2 +- ...istinct_extinct_organisms_in_uniprotkb.ttl | 2 +- ...ith_at_least_two_transmembrane_domains.ttl | 2 +- 50 files changed, 148 insertions(+), 64 deletions(-) diff --git a/glyconnect/1.ttl b/glyconnect/1.ttl index a9fc9220b..2ededa67d 100644 --- a/glyconnect/1.ttl +++ b/glyconnect/1.ttl @@ -1,12 +1,14 @@ prefix ex: prefix up: prefix sh: +prefix schema: prefix rdf: prefix rdfs: ex:1 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes ex: ; + schema:target ; rdfs:comment """Get all Glyconnect proteins their Uniprot reference isoform""" ; sh:select """SELECT distinct ?glycoprotein ?isoform where { diff --git a/glyconnect/2.ttl b/glyconnect/2.ttl index d2bf41a9a..af666baa5 100644 --- a/glyconnect/2.ttl +++ b/glyconnect/2.ttl @@ -2,11 +2,13 @@ prefix ex: prefix up: prefix sh: prefix rdf: +prefix schema: prefix rdfs: ex:2 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes ex: ; + schema:target ; rdfs:comment """Get all Glyconnect glycan with their graphical SNFG representation""" ; sh:select """SELECT distinct ?structure ?image where { diff --git a/glyconnect/3.ttl b/glyconnect/3.ttl index 556a2210d..be66e1511 100644 --- a/glyconnect/3.ttl +++ b/glyconnect/3.ttl @@ -2,11 +2,13 @@ prefix ex: prefix up: prefix sh: prefix rdf: +prefix schema: prefix rdfs: ex:3 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes ex: ; + schema:target ; rdfs:comment """Select all glycosylations (glycan, protein, position) with their reference articles""" ; sh:select """SELECT distinct ?glycoprotein ?isoform ?position ?structure ?image ?citation ?pmid where { diff --git a/glyconnect/4.ttl b/glyconnect/4.ttl index 6ec176e92..3a10a0307 100644 --- a/glyconnect/4.ttl +++ b/glyconnect/4.ttl @@ -2,11 +2,13 @@ prefix ex: prefix up: prefix sh: prefix rdf: +prefix schema: prefix rdfs: ex:4 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes ex: ; + schema:target ; rdfs:comment """Select all glycosylations (glycan, protein, position) with their associated disease where the name start with 'cancer'""" ; sh:select """SELECT distinct ?glycoprotein ?isoform ?position ?structure ?disease ?diseasename where { diff --git a/glyconnect/5.ttl b/glyconnect/5.ttl index 80514ca83..e40fb9ba6 100644 --- a/glyconnect/5.ttl +++ b/glyconnect/5.ttl @@ -3,9 +3,11 @@ prefix up: prefix sh: prefix rdf: prefix rdfs: +prefix schema: ex:5 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; + schema:target ; sh:prefixes ex: ; rdfs:comment """Get all Glyconnect reference papers""" ; sh:select """SELECT distinct ?citation ?pmid diff --git a/metanetx/1.ttl b/metanetx/1.ttl index f89ea5fb1..4a6bb119c 100644 --- a/metanetx/1.ttl +++ b/metanetx/1.ttl @@ -2,9 +2,12 @@ prefix ex: prefix sh: prefix rdf: prefix rdfs: +prefix schema: + ex:1 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes ex: ; + schema:target ; rdfs:comment """Retrieve the MNXref metabolite with name *N,N-dimethyl-beta-alanine*, together with molecular information.""" ; sh:select """SELECT ?metabolite ?label ?source ?formula ?charge ?inchi ?inchikey ?smiles WHERE { diff --git a/pom.xml b/pom.xml index 2dd15c5f1..fc8fbf80a 100644 --- a/pom.xml +++ b/pom.xml @@ -37,6 +37,13 @@ pom import + + org.eclipse.rdf4j + rdf4j-bom + ${rdf4j.version} + pom + import + @@ -54,43 +61,46 @@ org.eclipse.rdf4j rdf4j-rio-turtle - ${rdf4j.version} test org.eclipse.rdf4j rdf4j-model - ${rdf4j.version} test org.eclipse.rdf4j rdf4j-model-api - ${rdf4j.version} test org.eclipse.rdf4j rdf4j-model-vocabulary - ${rdf4j.version} test org.eclipse.rdf4j rdf4j-sail-model - ${rdf4j.version} test org.eclipse.rdf4j rdf4j-sail-memory - ${rdf4j.version} + test + + + org.eclipse.rdf4j + rdf4j-repository-api test org.eclipse.rdf4j rdf4j-repository-sail - ${rdf4j.version} + test + + + org.eclipse.rdf4j + rdf4j-shacl test diff --git a/src/test/java/swiss/sib/rdf/sparql/examples/CreateTestWithRDF4jMethods.java b/src/test/java/swiss/sib/rdf/sparql/examples/CreateTestWithRDF4jMethods.java index d63f3de47..6875dd17e 100644 --- a/src/test/java/swiss/sib/rdf/sparql/examples/CreateTestWithRDF4jMethods.java +++ b/src/test/java/swiss/sib/rdf/sparql/examples/CreateTestWithRDF4jMethods.java @@ -5,28 +5,58 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.StringReader; import java.nio.file.Files; import java.nio.file.Path; +import java.util.Iterator; import java.util.stream.Stream; +import org.eclipse.rdf4j.common.exception.ValidationException; +import org.eclipse.rdf4j.model.IRI; import org.eclipse.rdf4j.model.Model; +import org.eclipse.rdf4j.model.Statement; import org.eclipse.rdf4j.model.Value; import org.eclipse.rdf4j.model.impl.LinkedHashModel; import org.eclipse.rdf4j.model.impl.SimpleValueFactory; +import org.eclipse.rdf4j.model.vocabulary.RDF4J; import org.eclipse.rdf4j.model.vocabulary.SHACL; import org.eclipse.rdf4j.query.MalformedQueryException; import org.eclipse.rdf4j.query.parser.QueryParser; import org.eclipse.rdf4j.query.parser.sparql.SPARQLParserFactory; +import org.eclipse.rdf4j.repository.Repository; +import org.eclipse.rdf4j.repository.RepositoryConnection; +import org.eclipse.rdf4j.repository.RepositoryException; +import org.eclipse.rdf4j.repository.sail.SailRepository; import org.eclipse.rdf4j.rio.RDFFormat; import org.eclipse.rdf4j.rio.RDFHandlerException; import org.eclipse.rdf4j.rio.RDFParseException; import org.eclipse.rdf4j.rio.RDFParser; import org.eclipse.rdf4j.rio.Rio; import org.eclipse.rdf4j.rio.helpers.StatementCollector; +import org.eclipse.rdf4j.rio.turtle.TurtleWriter; +import org.eclipse.rdf4j.sail.memory.MemoryStore; +import org.eclipse.rdf4j.sail.shacl.ShaclSail; public class CreateTestWithRDF4jMethods { + private static final String shaclOneIdOneQuery = """ + PREFIX sh: + PREFIX schema: + + [] sh:targetClass sh:SPARQLExecutable ; + sh:property [ + sh:path [ sh:alternativePath ( sh:select sh:ask sh:describe sh:construct ) ] ; + sh:maxCount 1 ; + sh:minCount 1 + ] , [ + sh:path rdfs:comment ; + sh:maxCount 1 ; + sh:minCount 1 ] , [ + sh:path schema:target; + sh:minCount 1 ]. + """; static void testQueryValid(Path p, String projectPrefixes) { assertTrue(Files.exists(p)); @@ -40,9 +70,8 @@ static void testQueryValid(Path p, String projectPrefixes) { } assertFalse(model.isEmpty()); QueryParser parser = new SPARQLParserFactory().getParser(); - Stream.of("ask", "select", "concat", "describe") - .map(s -> model.getStatements(null, - SimpleValueFactory.getInstance().createIRI(SHACL.NAMESPACE, s), null)) + Stream.of("ask", "select", "concat", "describe").map( + s -> model.getStatements(null, SimpleValueFactory.getInstance().createIRI(SHACL.NAMESPACE, s), null)) .map(Iterable::iterator).forEach(i -> { while (i.hasNext()) { Value obj = i.next().getObject(); @@ -60,4 +89,67 @@ static void testQueryValid(Path p, String projectPrefixes) { } + /** + * Use shacl to test all the turtle files contain an rdfs:comment and one query. + * Also makes a test that all example IRIs are unique. + * + * @param paths + */ + static void testShaclContsraints(Stream paths) { + MemoryStore memoryStore = new MemoryStore(); + try { + memoryStore.init(); + + ShaclSail shaclSail = new ShaclSail(memoryStore); + Repository repo = new SailRepository(shaclSail); + try (RepositoryConnection connection = repo.getConnection(); + StringReader sr = new StringReader(shaclOneIdOneQuery)) { + // add shapes + connection.begin(); + connection.add(sr, RDFFormat.TURTLE, RDF4J.SHACL_SHAPE_GRAPH); + connection.commit(); + } catch (RDFParseException | RepositoryException | IOException e) { + fail(e); + } + try (RepositoryConnection connection = repo.getConnection()) { + paths.forEach(p -> testValidatingAFile(connection, p)); + } + repo.shutDown(); + shaclSail.shutDown(); + } finally { + memoryStore.shutDown(); + } + } + + private static void testValidatingAFile(RepositoryConnection connection, Path p) { + assertTrue(Files.exists(p)); + connection.begin(); + try { + IRI iri = connection.getValueFactory().createIRI(p.toUri().toString()); + connection.add(p.toFile(), iri); + connection.commit(); + } catch (RDFParseException | RepositoryException | IOException e) { + if (e.getCause() instanceof ValidationException ve) { + String report = validationReportAsString(ve); + fail(p.toUri() + " failed " + ve + '\n'+ report, e.getCause()); + } + fail(e); + } + assertFalse(connection.size() == 0); + } + + private static String validationReportAsString(ValidationException ve) { + Model vem = ve.validationReportAsModel(); + var boas = new ByteArrayOutputStream(); + TurtleWriter tw = new TurtleWriter(boas); + tw.startRDF(); + Iterator iterator = vem.iterator(); + while(iterator.hasNext()) { + tw.handleStatement(iterator.next()); + } + tw.endRDF(); + String report = boas.toString(); + return report; + } + } diff --git a/src/test/java/swiss/sib/rdf/sparql/examples/ValidateSparqlExamplesTest.java b/src/test/java/swiss/sib/rdf/sparql/examples/ValidateSparqlExamplesTest.java index dc110a6d4..dff8edfdb 100644 --- a/src/test/java/swiss/sib/rdf/sparql/examples/ValidateSparqlExamplesTest.java +++ b/src/test/java/swiss/sib/rdf/sparql/examples/ValidateSparqlExamplesTest.java @@ -22,6 +22,7 @@ import org.apache.jena.riot.RDFDataMgr; import org.apache.jena.riot.RiotException; import org.junit.jupiter.api.DynamicTest; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestFactory; import org.junit.jupiter.api.function.Executable; @@ -51,11 +52,21 @@ public Stream testAllWithRDF4j() throws URISyntaxException, IOExcep return testAll(tester); } + @Test + public void testUniqueIdentifierPerQueries() throws URISyntaxException, IOException { + CreateTestWithRDF4jMethods.testShaclContsraints(Files.walk(getBasePath(), 5).filter(this::isTurtleButNotPrefixFile)); + } + @TestFactory public Stream testPrefixDeclarations() throws URISyntaxException, IOException { + Path basePath = getBasePath(); + return Files.walk(basePath, 5).filter(this::isTurtleAndPrefixFile).flatMap(this::testPrefixes); + } + + private Path getBasePath() throws URISyntaxException { URL baseDir = getClass().getResource("/"); Path basePath = Paths.get(baseDir.toURI()); - return Files.walk(basePath, 5).filter(this::isTurtleAndPrefixFile).flatMap(this::testPrefixes); + return basePath; } private Stream testAll(BiFunction tester) diff --git a/uniprot/10.ttl b/uniprot/10.ttl index f8f956445..37d1bae44 100644 --- a/uniprot/10.ttl +++ b/uniprot/10.ttl @@ -5,7 +5,6 @@ prefix schema: prefix rdf: prefix faldo: prefix rdfs: -prefix schema: ex:10 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/11.ttl b/uniprot/11.ttl index b887ed260..dff509486 100644 --- a/uniprot/11.ttl +++ b/uniprot/11.ttl @@ -5,7 +5,6 @@ prefix schema: prefix rdf: prefix rdfs: prefix faldo: -prefix schema: ex:11 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/15.ttl b/uniprot/15.ttl index b97998ba9..8da500439 100644 --- a/uniprot/15.ttl +++ b/uniprot/15.ttl @@ -6,6 +6,7 @@ prefix rdf: prefix rdfs: ex:15 a sh:SPARQLExecutable, sh:SPARQLExecutable ; + schema:target ; rdfs:comment """Select all triples that relate to the EMBL CDS entry AA089367.1: """; sh:describe """DESCRIBE """ . diff --git a/uniprot/21.ttl b/uniprot/21.ttl index ec1513ef1..34a3b114d 100644 --- a/uniprot/21.ttl +++ b/uniprot/21.ttl @@ -5,7 +5,6 @@ prefix schema: prefix rdf: prefix rdfs: prefix skos: -prefix schema: ex:21 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/27.ttl b/uniprot/27.ttl index fc62fba9c..26cfe213e 100644 --- a/uniprot/27.ttl +++ b/uniprot/27.ttl @@ -4,7 +4,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:27 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/28.ttl b/uniprot/28.ttl index 978db96b5..65569be42 100644 --- a/uniprot/28.ttl +++ b/uniprot/28.ttl @@ -4,7 +4,7 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: + ex:28 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/29.ttl b/uniprot/29.ttl index c0e5cf3f9..9b48a993c 100644 --- a/uniprot/29.ttl +++ b/uniprot/29.ttl @@ -5,7 +5,6 @@ prefix schema: prefix rdf: prefix rdfs: prefix allie: -prefix schema: ex:29 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/30.ttl b/uniprot/30.ttl index 98f4fbd92..931a0ce56 100644 --- a/uniprot/30.ttl +++ b/uniprot/30.ttl @@ -5,7 +5,6 @@ prefix schema: prefix rdf: prefix rdfs: prefix taxon: -prefix schema: ex:30 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/31.ttl b/uniprot/31.ttl index ec494d629..078ff2e00 100644 --- a/uniprot/31.ttl +++ b/uniprot/31.ttl @@ -5,7 +5,6 @@ prefix schema: prefix rdf: prefix rdfs: prefix taxon: -prefix schema: ex:31 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/32.ttl b/uniprot/32.ttl index 694c21644..7a52f4772 100644 --- a/uniprot/32.ttl +++ b/uniprot/32.ttl @@ -5,7 +5,6 @@ prefix schema: prefix rdf: prefix rdfs: prefix taxon: -prefix schema: ex:32 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/36.ttl b/uniprot/36.ttl index 1f0d232ec..3c8bf7abc 100644 --- a/uniprot/36.ttl +++ b/uniprot/36.ttl @@ -4,11 +4,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix taxon: -prefix uniprotkb: -prefix orthodb: -prefix orthodbGroup: -prefix schema: ex:36 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/37.ttl b/uniprot/37.ttl index e19cebb9d..688b0a1e5 100644 --- a/uniprot/37.ttl +++ b/uniprot/37.ttl @@ -4,8 +4,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix taxon: -prefix schema: ex:37 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/38.ttl b/uniprot/38.ttl index b194d926a..0cc0774ad 100644 --- a/uniprot/38.ttl +++ b/uniprot/38.ttl @@ -4,8 +4,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix taxon: -prefix schema: ex:38 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/39.ttl b/uniprot/39.ttl index c3b794d60..aaabe8ea0 100644 --- a/uniprot/39.ttl +++ b/uniprot/39.ttl @@ -4,8 +4,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix taxon: -prefix schema: ex:39 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/40.ttl b/uniprot/40.ttl index 9981046f9..4146a79eb 100644 --- a/uniprot/40.ttl +++ b/uniprot/40.ttl @@ -4,8 +4,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix taxon: -prefix schema: ex:40 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/41.ttl b/uniprot/41.ttl index 336bd439d..42043048c 100644 --- a/uniprot/41.ttl +++ b/uniprot/41.ttl @@ -4,8 +4,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix taxon: -prefix schema: ex:41 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/42.ttl b/uniprot/42.ttl index 43e31baf7..366561ce0 100644 --- a/uniprot/42.ttl +++ b/uniprot/42.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:42 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/43.ttl b/uniprot/43.ttl index b12e5e63f..4321013f2 100644 --- a/uniprot/43.ttl +++ b/uniprot/43.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:43 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/44.ttl b/uniprot/44.ttl index b7c66574b..e2653588c 100644 --- a/uniprot/44.ttl +++ b/uniprot/44.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:44 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/45.ttl b/uniprot/45.ttl index d3bf0a6fd..7e54f191d 100644 --- a/uniprot/45.ttl +++ b/uniprot/45.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:45 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/46.ttl b/uniprot/46.ttl index 59cceea2d..d4cd6f341 100644 --- a/uniprot/46.ttl +++ b/uniprot/46.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:46 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/47.ttl b/uniprot/47.ttl index 99d52929f..752c7acec 100644 --- a/uniprot/47.ttl +++ b/uniprot/47.ttl @@ -3,12 +3,11 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:47 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; schema:target ; - rdfs:label """Find UniProt entries with a transmembrane region, with an Alanine in the 15 Aminoacid region preceding the transmembrane""" ; + rdfs:comment """Find UniProt entries with a transmembrane region, with an Alanine in the 15 Aminoacid region preceding the transmembrane""" ; sh:select """ SELECT ?protein ?from ?interestingRegion WHERE diff --git a/uniprot/48.ttl b/uniprot/48.ttl index bf9322b5c..f7fc553e4 100644 --- a/uniprot/48.ttl +++ b/uniprot/48.ttl @@ -3,12 +3,11 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:48 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; schema:target ; - rdfs:label """Retrieve glycosylation sites and glycans on human enzymes (federated with glyconnect)""" ; + rdfs:comment """Retrieve glycosylation sites and glycans on human enzymes (federated with glyconnect)""" ; sh:select """SELECT DISTINCT ?protein ?glycosite ?glycostructure ?glycoimage diff --git a/uniprot/49.ttl b/uniprot/49.ttl index 5a22c9eb3..0925ff369 100644 --- a/uniprot/49.ttl +++ b/uniprot/49.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:49 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/5.ttl b/uniprot/5.ttl index 932dd4932..5d2b2ffbc 100644 --- a/uniprot/5.ttl +++ b/uniprot/5.ttl @@ -4,7 +4,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:5 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/50.ttl b/uniprot/50.ttl index 63ae3afe7..66b1dfbec 100644 --- a/uniprot/50.ttl +++ b/uniprot/50.ttl @@ -3,12 +3,11 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:50 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; schema:target ; - rdfs:label """Where are the human genes encoding enzymes metabolizing N-acyl + rdfs:comment """Where are the human genes encoding enzymes metabolizing N-acyl sphingosines expressed in the human body (federated query, with Rhea and Bgee)""" ; sh:select """SELECT DISTINCT diff --git a/uniprot/51.ttl b/uniprot/51.ttl index d829e1018..e35b805fc 100644 --- a/uniprot/51.ttl +++ b/uniprot/51.ttl @@ -3,12 +3,11 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:51 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; schema:target ; - rdfs:label """Find all proteins linked to arachidonate (CHEBI:32395)""" ; + rdfs:comment """Find all proteins linked to arachidonate (CHEBI:32395)""" ; sh:select """ SELECT DISTINCT diff --git a/uniprot/52.ttl b/uniprot/52.ttl index 4728ba823..db36080a0 100644 --- a/uniprot/52.ttl +++ b/uniprot/52.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:52 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/53.ttl b/uniprot/53.ttl index 4d2c4c58b..c9325ab37 100644 --- a/uniprot/53.ttl +++ b/uniprot/53.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:53 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/54.ttl b/uniprot/54.ttl index 993bdbac9..ede142e59 100644 --- a/uniprot/54.ttl +++ b/uniprot/54.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:54 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/55.ttl b/uniprot/55.ttl index e2f44d26b..aeb235a29 100644 --- a/uniprot/55.ttl +++ b/uniprot/55.ttl @@ -3,7 +3,7 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: + ex:55 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/56.ttl b/uniprot/56.ttl index 2b7071ec7..b15076edf 100644 --- a/uniprot/56.ttl +++ b/uniprot/56.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:56 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/57.ttl b/uniprot/57.ttl index 5a7c9b855..aa50a7e68 100644 --- a/uniprot/57.ttl +++ b/uniprot/57.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:57 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/58.ttl b/uniprot/58.ttl index 6b273e855..463c1c80d 100644 --- a/uniprot/58.ttl +++ b/uniprot/58.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:58 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/59.ttl b/uniprot/59.ttl index 938398077..f58311fb3 100644 --- a/uniprot/59.ttl +++ b/uniprot/59.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:59 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/60.ttl b/uniprot/60.ttl index ca325521d..178c7309e 100644 --- a/uniprot/60.ttl +++ b/uniprot/60.ttl @@ -3,7 +3,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:60 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/61.ttl b/uniprot/61.ttl index cefc1dbe6..65822dff2 100644 --- a/uniprot/61.ttl +++ b/uniprot/61.ttl @@ -3,7 +3,7 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: + ex:61 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/9.ttl b/uniprot/9.ttl index 524d8bc2c..25971ffde 100644 --- a/uniprot/9.ttl +++ b/uniprot/9.ttl @@ -4,7 +4,6 @@ prefix sh: prefix schema: prefix rdf: prefix rdfs: -prefix schema: ex:9 a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/diseases_involving_enzymes.ttl b/uniprot/diseases_involving_enzymes.ttl index 0dd7b63e9..d4e829a3c 100644 --- a/uniprot/diseases_involving_enzymes.ttl +++ b/uniprot/diseases_involving_enzymes.ttl @@ -5,7 +5,7 @@ prefix schema: prefix rdf: prefix faldo: prefix rdfs: -prefix schema: + ex:diseases_involving_enzymes.ttl a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/distinct_extinct_organisms_in_uniprotkb.ttl b/uniprot/distinct_extinct_organisms_in_uniprotkb.ttl index 34a50cb9c..350d5abb9 100644 --- a/uniprot/distinct_extinct_organisms_in_uniprotkb.ttl +++ b/uniprot/distinct_extinct_organisms_in_uniprotkb.ttl @@ -5,7 +5,7 @@ prefix schema: prefix rdf: prefix faldo: prefix rdfs: -prefix schema: + ex:distinct_extinct_organisms_in_uniprotkb a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ; diff --git a/uniprot/enzymes_with_at_least_two_transmembrane_domains.ttl b/uniprot/enzymes_with_at_least_two_transmembrane_domains.ttl index 51a0762d7..56a955242 100644 --- a/uniprot/enzymes_with_at_least_two_transmembrane_domains.ttl +++ b/uniprot/enzymes_with_at_least_two_transmembrane_domains.ttl @@ -5,7 +5,7 @@ prefix schema: prefix rdf: prefix faldo: prefix rdfs: -prefix schema: + ex:enzymes_with_at_least_two_transmembrane_domains a sh:SPARQLSelectExecutable, sh:SPARQLExecutable ; sh:prefixes _:sparql_examples_prefixes ;