Skip to main content

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!

Metadata

Release files for hca-bundle-jsonld 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hca-bundle-jsonld 0.1.2
File Size Uploaded Provenance
hca-bundle-jsonld-0.1.2.tar.gz 4.2 kB Without provenance Details

Release files / hca-bundle-jsonld-0.1.2.tar.gz

Download URL hca-bundle-jsonld-0.1.2.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
852a7e6f429fa375f4c7c5ad09ac252fc54ae92a8b295b53e15eabb3be1c0ee9
BLAKE2b-256 checksum
How to use checksums
625cedc8a14034d1a15301d4782f8b3fe2e1cd144c451f5b81d8978f1aede473
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for hca-bundle-jsonld 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page