Use case: Generate semantically interoperable genome annotations in RDF using (semi-)automated approaches [1].
1. Introduction:
-
RDF graph model (serializations) & Linked Data principles
-
Genome annotations commonly store and shared via tab-delimited files in Generic Feature Format (GFF)
-
Controlled vocabularies, taxonomies & ontologies (GenBank Feature Table Definition, NCBITaxon, SO[FA], FALDO)
-
Metadata standards & PIDs (Dublin Core/DCMI, DCAT, Cool URIs or PURLs)
-
RDFication approaches:
- text file (e.g. GFF)-> RDB -> RDF (SIGA.py)
- text file -> RDF (OpenRefine+RDF, Virtuoso Sponger)
- RDB->RDF: Direct Mapping or R2RML (Virtuoso R2RML processor)
2. Install & test SIGA.py
git clone https://github.com/candYgene/siga.git
cd siga
virtualenv .sigaenv
source .sigaenv/bin/activate
pip install -r requirements.txt
- generate RDF graph (in turtle) from GFF file with tomato gene models
cd src
python SIGA.py -h
python SIGA.py db -rV ../examples/features.gff3 # GFF->RDB
ls ../examples/features.db # sqlite dbfile
python SIGA.py rdf -c config.ini -o turtle ../examples/features.db # RDB->RDF
ls ../examples/features.ttl
- investigate I/O files incl. mappings in
config.ini
3. Install & test OpenRefine (OR) with RDF extension
docker pull fusepool/openrefine
docker run -p 3333:3333 -d fusepool/openrefine
- download an example OR project file on tomato quantitative trait loci (QTLs)
git clone https://github.com/candYgene/pbg-ld.git
cd pbg-ld/data && tar xvzf sgn-ld.tar.gz
cd other
ls tomato_QTLs.openrefine.tar.gz
-
open
http://localhost:3333/in your favourite web browser -
import the project file: Import_Project->Project File->Import Project
-
look at the tabulated data and the corresponding RDF data model: RDF button (upper-left corner)->Edit RDF skeleton
4. Install & test OpenLink Virtuoso Universal Server
docker pull candygene/docker-virtuoso
docker run -p 8890:8890 -d candygene/docker-virtuoso
-
open the admin console (Conductor) in your web browser and login (
dbafor both account and password) -
upload RDF graphs: Linked_Data->Quad Store Upload->File and Named Graph URI
- tomato gene models:
siga/examples/features.ttlwithhttp://solgenomics.net/genome/Solanum_lycopersicumgraph URI - tomato QTLs:
pbg-ld/data/rdf/tomato_QTLs.ttl.gzwithhttp://europepmc.org/articlesgraph URI
- tomato gene models:
-
query RDF graphs via SPARQL endpoint
SELECT *
FROM <http://solgenomics.net/genome/Solanum_lycopersicum>
WHERE { ?s ?p ?o }
SELECT *
FROM <http://europepmc.org/articles>
WHERE { ?s ?p ?o }
References