Create RDF and JSON-LD from HCA bundles
Project description
Representing HCA Bundles as JSON-LD allows them to be easily converted to RDF and queried using SPARQL. This software, when combined with a graph or triplet store can provide semantic data models that allow for an expressive query interface.
Usage
The “bundle_to_rdf” module presents a method for converting HCA bundles to RDF ttl files.
import requests import bundle_to_rdf DSS_URL = "https://dss.dev.data.humancellatlas.org/v1" bundle_uuid = "4be0071d-b36e-4414-a7ee-7b879f60be7c" r = requests.get("{}/bundles/{}?replica=aws".format(DSS_URL, bundle_uuid)) bundle = r.json() file_name = bundle_to_rdf.bundle_to_rdf(bundle) print(file_name)
A file is created in the current working directory with a filename following the pattern: {bundle_uuid}.ttl.
This file can then be loaded into a triplet store of your choosing. For an example of usage with BlazeGraph, check out the example-usage.ipynb.
Development
This module should make as few assumptions about the DSS data model as possible. Future developments would use this module as part of a service to either create RDF that can be queried directly, or loaded into a graph store like Blazegraph or Amazon Neptune.
TODO
Add unit tests, the module currently relies on active connections to the DSS
Improve example notebook with biological use cases
Demonstrate using the SPARQL and RDF interface to demonstrate tabular representations
Integrate into a microservice for generating RDF from bundles on the fly
Contributing
Please add any issues you experience to our Github issue tracker!
This software is Open Source, Apache licensed, send in your changes!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file hca-bundle-jsonld-0.1.1.tar.gz
.
File metadata
- Download URL: hca-bundle-jsonld-0.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b3e25c2152937320501279f4a1d7f05d3795992073c9afa8257fa1778d69196 |
|
MD5 | 6649d1c333c109cf09025647aa05ba5c |
|
BLAKE2b-256 | 9f3eea501a89db84f0aff2b8d4aadf69fd5c35fd40cab7c1224f5aa601815470 |