Virtuoso performance/Tests/Brainstage

Brainstage Virtuoso installation queries
The following information was reformatted for the wiki from a spreadsheet that Don Doherty (of Brainstage) sent us in May 2008. Alan R has added some commentary but otherwise the information is as provided (right, Alan?).

MeSH and related

 * Tested on Brainstage instance.       Time for Test:282 milliseconds
 * Tested on Neurocommons Banff instance.   Time for Test:418 milliseconds

Basic functionality verified

MeSH papers

 * Tested on Brainstage instance.       Time for Test:20 milliseconds
 * Tested on Neurocommons Banff instance.   Time for Test:70 milliseconds

Basic functionality verified

Wholes and parts
Note that this part of relation is obsolete - the one we used for real was http://purl.org/obo/owl/obo#part_of and we will probably shift to the RO versions for release.
 * Tested on Brainstage instance.       Time for Test:3287 milliseconds
 * Tested on Neurocommons Banff instance.   Time for Test:14708 milliseconds


 * Tested on Brainstage instance.       Time for Test:131 milliseconds
 * Tested on Neurocommons Banff instance.   Time for Test:63 milliseconds

Gene ontology

 * Tested on Brainstage instance.       Time for Test:20 milliseconds
 * Tested on Neurocommons Banff instance.   Time for Test:75 milliseconds


 * Tested on Brainstage instance.       Time for Test:11 milliseconds
 * Tested on Neurocommons Banff instance.   Time for Test:64 milliseconds

Basic functionality verified

Paper to MeSH
This query has been modified to work in v1. The original brainstage query didn't work because the scopeNote relation was being sought in the wrong named graph.


 * Tested on Brainstage instance.       Time for Test:10 milliseconds
 * Tested on Neurocommons Banff instance.   Time for Test:61 milliseconds

Basic functionality verified

Terms with 'nerve' in their name
This query has been modified from the original Brainstage version.


 * Tested on Brainstage instance. Time for Test:7708 milliseconds
 * Tested on Neurocommons Banff instance.     Time for Test:4377 milliseconds

bug 27

To be formatted
Query #10 prefix rdfs:  prefix owl:  select count(*) FROM  FROM  where { graph  { ?class  ?class2 } graph  { ?class rdfs:label ?label1. ?class2 rdfs:label ?label2} filter(str(?label2)="neurological process") } Query #10 for v1test prefix rdfs:  prefix owl:  select count(*) where { ?class  ?class2. ?class rdfs:label ?label1. ?class2 rdfs:label ?label2. filter(str(?label2)="neurological process") } Query #11 prefix dc:  prefix sc:  prefix rdfs:  select ?g ?name ?id ?chrom ?taxon ?type from  where { graph  { ?g sc:describes_gene_type ?type. ?g rdfs:label ?name. ?g sc:from_species_described_by ?taxon. ?g dc:identifier ?id. ?g sc:has_chromosome_descriptor ?chrom filter (str(?type)="http://purl.org/science/owl/sciencecommons/protein_coding") } } LIMIT 1000
 * Tested on Brainstage instance. Time for Test:4455 milliseconds
 * Tested on Neurocommons Banff instance.     Time for Test:1618 milliseconds
 * Tested on Brainstage instance. Time for Test:735 milliseconds
 * Tested on Neurocommons Banff instance.     Time for Test:7617 milliseconds

Brainstage Queries
"Notes about the Gene Queries: we put the homologene concepts into its own graph called sw.brainstage.com/homologene. As a result, we cannot run identical gene queries on the Brainstage and Neurocommons SPARQL endpoints. However, after updating the gene graph to include the homologene triples and changed the queries to match those hitting the neurocommons machine we got the identical results. (Much slower on Brainstage machine.)" -DD

Query #12: prefix dc:  prefix mesh: <http://purl.org/commons/record/mesh/> prefix sc: <http://purl.org/science/owl/sciencecommons/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> select ?genename ?gene where { graph <http://purl.org/commons/hcls/pubmesh> { ?pubmed sc:has-as-major-mesh mesh:D016229Q000235. ?article_gene sc:describes_gene_or_gene_product_mentioned_by ?article. ?article sc:identified_by_pmid ?pubmed. } graph <http://purl.org/commons/hcls/gene> { ?gene rdfs:label ?genename. ?homologous_gene_record <http://purl.org/science/owl/sciencecommons/has_homologous_gene_record> ?article_gene. ?homologous_gene_record <http://purl.org/science/owl/sciencecommons/has_homologous_gene_record> ?gene } } Query #12/13 with graph clauses removed: prefix dc: <http://purl.org/dc/elements/1.1/> prefix mesh: <http://purl.org/commons/record/mesh/> prefix sc: <http://purl.org/science/owl/sciencecommons/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> select ?genename ?gene where { { ?pubmed sc:has-as-major-mesh mesh:D016229Q000235. ?article_gene sc:describes_gene_or_gene_product_mentioned_by ?article. ?article sc:identified_by_pmid ?pubmed. } { ?gene rdfs:label ?genename. ?homologous_gene_record sc:has_homologous_gene_record ?article_gene. ?homologous_gene_record sc:has_homologous_gene_record ?gene } }

Query #13 - fails in both Banff and v1test - needs repair (see above) prefix dc: <http://purl.org/dc/elements/1.1/> prefix mesh: <http://purl.org/commons/record/mesh/> prefix sc: <http://purl.org/science/owl/sciencecommons/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> select ?genename ?gene where { graph <http://purl.org/commons/hcls/pubmesh> { ?pubmed sc:has-as-major-mesh mesh:D016229Q000235. ?article_gene sc:describes_gene_or_gene_product_mentioned_by ?article. ?article sc:identified_by_pmid ?pubmed. }  graph <http://purl.org/commons/hcls/gene>  { ?gene rdfs:label ?genename } graph <http://sw.brainstage.com/homologene> { ?homologous_gene_record sc:has_homologous_gene_record ?article_gene. ?homologous_gene_record sc:has_homologous_gene_record ?gene } } Query #13 with graph clauses removed: prefix dc: <http://purl.org/dc/elements/1.1/> prefix mesh: <http://purl.org/commons/record/mesh/> prefix sc: <http://purl.org/science/owl/sciencecommons/> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> select ?genename ?gene where { ?pubmed sc:has-as-major-mesh mesh:D016229Q000235. ?article_gene sc:describes_gene_or_gene_product_mentioned_by ?article. ?article sc:identified_by_pmid ?pubmed. ?gene rdfs:label ?genename. ?homologous_gene_record sc:has_homologous_gene_record ?article_gene. ?homologous_gene_record sc:has_homologous_gene_record ?gene. } Query #14? prefix dc: <http://purl.org/dc/elements/1.1/> prefix mesh: <http://purl.org/commons/record/mesh/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix sc: <http://purl.org/science/owl/sciencecommons/> prefix aba: <http://sw.neurocommons.org/2007/aba/> prefix tax: <http://purl.org/commons/record/taxon/> select distinct ?human_gene ?human_genename ?rat_gene ?rat_genename ?mouse_gene ?mouse_genename ?image where { graph <http://sw.neurocommons.org/2007/aba-20070226> { ?aba_gene_record aba:refersToSameGeneAs ?mouse_gene. ?aba_mouse_expression_record aba:measuresGeneIdentifiedWith ?aba_gene_record. ?aba_mouse_expression_record aba:hasSectionSeries ?section_series. ?section_series aba:hasSection ?section. ?section aba:hasImagePyramids ?pyramids. ?pyramids aba:hasImagePyramid ?pyramid. ?pyramid rdf:type aba:ExpressionImagePyramid. ?pyramid aba:hasURLTemplate ?image. }   graph <http://purl.org/commons/hcls/pubmesh> { ?pubmed sc:has-as-major-mesh mesh:D016229Q000235. ?human_gene sc:describes_gene_or_gene_product_mentioned_by ?article. ?article sc:identified_by_pmid ?pubmed. }   graph <http://purl.org/commons/hcls/gene> { ?gene rdfs:label ?genename. ?human_gene rdfs:label ?human_genename. ?rat_gene rdfs:label ?rat_genename. ?rat_gene sc:from_species_described_by <http://purl.org/commons/record/taxon/10116>. ?mouse_gene rdfs:label ?mouse_genename. ?mouse_gene sc:from_species_described_by <http://purl.org/commons/record/taxon/10090>. ?homologous_gene_record sc:has_homologous_gene_record ?human_gene. ?homologous_gene_record sc:has_homologous_gene_record ?rat_gene. ?homologous_gene_record sc:has_homologous_gene_record ?mouse_gene. }  } LIMIT 100 Query #14 with graph clauses removed? prefix dc: <http://purl.org/dc/elements/1.1/> prefix mesh: <http://purl.org/commons/record/mesh/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix sc: <http://purl.org/science/owl/sciencecommons/> prefix aba: <http://sw.neurocommons.org/2007/aba/> select distinct ?human_gene ?human_genename ?rat_gene ?rat_genename ?mouse_gene ?mouse_genename ?image where { ?aba_gene_record aba:refersToSameGeneAs ?mouse_gene. ?aba_mouse_expression_record aba:measuresGeneIdentifiedWith ?aba_gene_record. ?aba_mouse_expression_record aba:hasSectionSeries ?section_series. ?section_series aba:hasSection ?section. ?section aba:hasImagePyramids ?pyramids. ?pyramids aba:hasImagePyramid ?pyramid. ?pyramid rdf:type aba:ExpressionImagePyramid. ?pyramid aba:hasURLTemplate ?image. ?pubmed sc:has-as-major-mesh mesh:D016229Q000235. ?human_gene sc:describes_gene_or_gene_product_mentioned_by ?article. ?article sc:identified_by_pmid ?pubmed. ?gene rdfs:label ?genename. ?human_gene rdfs:label ?human_genename. ?rat_gene rdfs:label ?rat_genename. ?rat_gene sc:from_species_described_by <http://purl.org/commons/record/taxon/10116>. ?mouse_gene rdfs:label ?mouse_genename. ?mouse_gene sc:from_species_described_by <http://purl.org/commons/record/taxon/10090>. ?homologous_gene_record sc:has_homologous_gene_record ?human_gene. ?homologous_gene_record sc:has_homologous_gene_record ?rat_gene. ?homologous_gene_record sc:has_homologous_gene_record ?mouse_gene. } LIMIT 100
 * Tested on Neurocommons Banff instance.     Time for Test:137 milliseconds
 * Tested on Brainstage instance. Time for Test:12921 milliseconds

Query #15? prefix dc: <http://purl.org/dc/elements/1.1/> prefix mesh: <http://purl.org/commons/record/mesh/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix sc: <http://purl.org/science/owl/sciencecommons/> select distinct ?human_gene ?human_genename ?rat_gene ?rat_genename ?mouse_gene ?mouse_genename ?image where { graph <http://sw.neurocommons.org/2007/aba-20070226> { ?aba_gene_record <http://sw.neurocommons.org/2007/aba/refersToSameGeneAs> ?mouse_gene. ?aba_mouse_expression_record <http://sw.neurocommons.org/2007/aba/measuresGeneIdentifiedWith> ?aba_gene_record. ?aba_mouse_expression_record <http://sw.neurocommons.org/2007/aba/hasSectionSeries> ?section_series. ?section_series <http://sw.neurocommons.org/2007/aba/hasSection> ?section. ?section <http://sw.neurocommons.org/2007/aba/hasImagePyramids> ?pyramids. ?pyramids <http://sw.neurocommons.org/2007/aba/hasImagePyramid> ?pyramid. ?pyramid rdf:type <http://sw.neurocommons.org/2007/aba/ExpressionImagePyramid>. ?pyramid <http://sw.neurocommons.org/2007/aba/hasURLTemplate> ?image. }   graph <http://purl.org/commons/hcls/pubmesh> { ?pubmed sc:has-as-major-mesh mesh:D016229Q000235. ?human_gene sc:describes_gene_or_gene_product_mentioned_by ?article. ?article sc:identified_by_pmid ?pubmed. }   graph <http://purl.org/commons/hcls/gene> { ?gene rdfs:label ?genename. ?human_gene rdfs:label ?human_genename. ?rat_gene rdfs:label ?rat_genename. ?rat_gene <http://purl.org/science/owl/sciencecommons/from_species_described_by> <http://purl.org/commons/record/taxon/10116>. ?mouse_gene rdfs:label ?mouse_genename. ?mouse_gene <http://purl.org/science/owl/sciencecommons/from_species_described_by> <http://purl.org/commons/record/taxon/10090>. }   graph <http://sw.brainstage.com/homologene> { ?homologous_gene_record <http://purl.org/science/owl/sciencecommons/has_homologous_gene_record> ?human_gene. ?homologous_gene_record <http://purl.org/science/owl/sciencecommons/has_homologous_gene_record> ?rat_gene. ?homologous_gene_record <http://purl.org/science/owl/sciencecommons/has_homologous_gene_record> ?mouse_gene. } } LIMIT 100 Query #16 prefix dc: <http://purl.org/dc/elements/1.1/> prefix mesh: <http://purl.org/commons/record/mesh/> prefix sc: <http://purl.org/science/owl/sciencecommons/> select ?article ?date ?title where { graph <http://purl.org/commons/hcls/pubmesh> { ?pubmed sc:has-as-major-mesh mesh:D016229Q000235. ?article sc:identified_by_pmid ?pubmed. ?article dc:title ?title. ?article dc:date ?date } } Query #17 prefix mesh: <http://purl.org/commons/record/mesh/> prefix sc: <http://purl.org/science/owl/sciencecommons/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select distinct ?protein where { graph <http://purl.org/commons/hcls/pubmesh> { ?paper ?property mesh:D016229Q000235. ?article sc:identified_by_pmid ?paper. ?gene_record sc:describes_gene_or_gene_product_mentioned_by ?article }   graph <http://purl.org/commons/hcls/goa4> { ?ipirecord sc:describes_protein_gene_product_of_gene_described_by ?gene_record. ?gene_record rdf:type <http://purl.org/science/owl/sciencecommons/ncbi_gene_record>. ?ipirecord sc:describes_same_protein_as ?protein } } LIMIT 5 Query #18? prefix go: <http://purl.org/obo/owl/GO#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix owl: <http://www.w3.org/2002/07/owl#> prefix mesh: <http://purl.org/commons/record/mesh/> prefix sc: <http://purl.org/science/owl/sciencecommons/> prefix ro: <http://www.obofoundry.org/ro/ro.owl#> select distinct ?process ?processname where { graph <http://purl.org/commons/hcls/pubmesh> { ?paper ?p mesh:D016229Q000235. ?article sc:identified_by_pmid ?paper. ?gene sc:describes_gene_or_gene_product_mentioned_by ?article. }  graph <http://purl.org/commons/hcls/goa> { ?protein rdfs:subClassOf ?res. ?res owl:onProperty ro:has_function. ?res owl:someValuesFrom ?res2. ?res2 owl:onProperty ro:realized_as. ?res2 owl:someValuesFrom ?process. graph <http://purl.org/commons/hcls/20070416/classrelations> {      { ?process <http://purl.org/obo/owl/obo#part_of> ?go_id} union { ?process rdfs:subClassOf ?go_id} }    ?protein rdfs:subClassOf ?parent. ?parent owl:equivalentClass ?res3. ?res3 owl:hasValue ?gene. }  graph <http://purl.org/commons/hcls/gene> { ?gene rdfs:label ?genename. }  graph <http://purl.org/commons/hcls/20070416> { ?process rdfs:label ?processname. } }  LIMIT 100 The following has had the graph {...} clauses removed. Could be query #18. prefix go: <http://purl.org/obo/owl/GO#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix owl: <http://www.w3.org/2002/07/owl#> prefix mesh: <http://purl.org/commons/record/mesh/> prefix sc: <http://purl.org/science/owl/sciencecommons/> prefix ro: <http://www.obofoundry.org/ro/ro.owl#> select distinct ?process ?processname where { ?paper ?p mesh:D016229Q000235. ?article sc:identified_by_pmid ?paper. ?gene sc:describes_gene_or_gene_product_mentioned_by ?article. ?protein rdfs:subClassOf ?res. ?res owl:onProperty ro:has_function. ?res owl:someValuesFrom ?res2. ?res2 owl:onProperty ro:realized_as. ?res2 owl:someValuesFrom ?process. { ?process <http://purl.org/obo/owl/obo#part_of> ?go_id } union { ?process rdfs:subClassOf ?go_id } ?protein rdfs:subClassOf ?parent. ?parent owl:equivalentClass ?res3. ?res3 owl:hasValue ?gene. ?gene rdfs:label ?genename. ?process rdfs:label ?processname. } LIMIT 100
 * Tested on Neurocommons Banff instance.     Time for Test:184085 milliseconds
 * Tested on Brainstage instance. Time for Test:366222 milliseconds
 * Tested on Neurocommons Banff instance.     Time for Test:460 milliseconds
 * Tested on Brainstage instance. Time for Test:122 milliseconds
 * Tested on Neurocommons Banff instance. Time for Test:180257 milliseconds
 * Tested on Brainstage instance. Time for Test:2032 milliseconds
 * Tested on Neurocommons Banff instance.     Time for Test:876 milliseconds
 * Tested on Brainstage instance. Time for Test:506046 milliseconds