We already have virtuoso set-up in tux02. Right now, to be able to interact with RDF, we need to have virtuoso set-up. This issue will unblock:
Note where the virtuoso data directory is mapped from the "production.sh" script as you will use this in the consequent steps:
--share=/export2/guix-containers/genenetwork/var/lib/virtuoso=/var/lib/virtuoso
time guix shell guile-dbi -m manifest.scm -- \ ./generate-ttl-files.scm --settings conn-dev.scm --output \ /export2/guix-containers/genenetwork-development/var/lib/virtuoso \ --documentation /tmp/doc-directory
cp /home/bonfacem/ttl-files/*ttl /export2/guix-containers/genenetwork/var/lib/virtuoso/
(service virtuoso-service-type (virtuoso-configuration (server-port 7892) (http-server-port 7893) (dirs-allowed "/var/lib/virtuoso")))
guix shell virtuoso-ose -- isql 7892
SQL> select * from DB.DBA.LOAD_LIST; SQL> delete from DB.DBA.load_list;
SQL> DELETE FROM rdf_quad WHERE g = iri_to_id('http://genenetwork.org');
SQL> ld_dir('/var/lib/virtuoso', '*.ttl', 'http://genenetwork.org'); SQL> rdf_loader_run(); SQL> CHECKPOINT; SQL> checkpoint_interval(60); SQL> scheduler_interval(10);
SQL> SPARQL PREFIX gn: <http://genenetwork.org/id/> PREFIX gnc: <http://genenetwork.org/category/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX gnt: <http://genenetwork.org/term/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX taxon: <http://purl.uniprot.org/taxonomy/> SELECT * WHERE { ?s skos:member gn:Mus_musculus . ?s ?p ?o . };
SPARQL_ENDPOINT="http://localhost:7893/sparql"
time python index-genenetwork create-xapian-index \ /export/data/genenetwork-xapian/ \ mysql://<user>:<password>@localhost/db_webqtl \ http://localhost:7893/sparql
guix shell xapian -- xapian-delve /export/data/genenetwork-xapian/
XAPIAN_DB_PATH="/export/data/genenetwork-xapian/"