{% extends "prose.html" %}

{% block title %}Bioregistry Downloads{% endblock %}

{% block styles %}
    {{ super() }}
    <link href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism.css" rel="stylesheet"/>
{% endblock %}

{% block scripts %}
    {{ super() }}
    <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
{% endblock %}

{% block content %}
    <h2>Downloads</h2>
    <p>
        The content of the Bioregistry's database is split into three sections. See the
        <a href="{{ url_for(".schema") }}">JSON schema</a> page for further documentation on their format.
    </p>
    <h3>Registry</h3>
    <p>
        The registry contains information about prefixes and their associated metadata. It can be downloaded as:
    </p>
    <ul>
        <li>
            <a href="https://github.com/biopragmatics/bioregistry/blob/main/src/bioregistry/data/bioregistry.json">JSON</a>
            (reference file)
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/registry/registry.json">JSON</a>
            (consensus file, auto-generated by GitHub Actions)
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/registry/registry.yml">YAML</a>
            (consensus file, auto-generated by GitHub Actions)
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/registry/registry.tsv">TSV</a>
            (consensus file, auto-generated by GitHub Actions)
        </li>
    </ul>
    <p>
        The manually curated portions of these data are available under the
        <a href="https://creativecommons.org/share-your-work/public-domain/cc0/">
            <i class="fab fa-creative-commons-zero"></i> CC0 1.0 Universal License</a>. Aggregated data are
        redistributed under their original licenses as described <a
            href="{{ url_for(".acknowledgements") }}">here</a>.
        More information about these resources can be found
        <a href="https://github.com/biopragmatics/bioregistry/tree/main/exports/registry">here</a>.
    </p>
    <h3>Metaregistry</h3>
    <p>
        The metaregistry contains information about registries and their associated metadata. It can be downloaded
        as:
    </p>
    <ul>
        <li>
            <a href="https://github.com/biopragmatics/bioregistry/blob/main/src/bioregistry/data/metaregistry.json">JSON</a>
            (reference file)
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/metaregistry/metaregistry.yml">YAML</a>
            (auto-generated by GitHub Actions)
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/metaregistry/metaregistry.tsv">TSV</a>
            (auto-generated by GitHub Actions)
        </li>
    </ul>
    <p>
        The entirety of the metaregistry is manually curated and is available under the
        <a href="https://creativecommons.org/share-your-work/public-domain/cc0/">
            <i class="fab fa-creative-commons-zero"></i> CC0 1.0 Universal License</a>.
        More information about these resources can be found
        <a href="https://github.com/biopragmatics/bioregistry/tree/main/exports/metaregistry">here</a>.
    </p>
    <h3>Cross-Registry Mappings</h3>
    <p>
        Mappings between registries (i.e., Identifiers.org uses <code>taxonomy</code> and OBO Foundry uses
        <code>NCBITaxon</code> for the same thing) are exported in the
        <a href="https://github.com/mapping-commons/sssom">Simple Standard for Sharing Ontology Mappings (SSSOM)</a>
        format.
    </p>
    <ul>
        <li>
            <a href="https://github.com/biopragmatics/bioregistry/raw/main/exports/sssom/bioregistry.sssom.tsv">SSSOM
                TSV</a>
            (auto-generated by GitHub Actions)
        </li>
    </ul>
    <p>
        The entirety of the cross-registry mappings is semi-automatically curated and is available under the
        <a href="https://creativecommons.org/share-your-work/public-domain/cc0/">
            <i class="fab fa-creative-commons-zero"></i> CC0 1.0 Universal License</a>.
        More information about these resources can be found
        <a href="https://github.com/biopragmatics/bioregistry/tree/main/exports/sssom">here</a>.
    </p>
    <h3>Collections</h3>
    <p>
        The collections contain curated lists of prefixes. They can be downloaded in bulk from:
    </p>
    <ul>
        <li>
            <a href="https://github.com/biopragmatics/bioregistry/blob/main/src/bioregistry/data/collections.json">JSON</a>
            (reference file)
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/collections/collections.yml">YAML</a>
            (auto-generated by GitHub Actions)
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/collections/collections.tsv">TSV</a>
            (auto-generated by GitHub Actions)
        </li>
    </ul>
    <p>
        The entirety of the collections is manually curated and is available under the
        <a href="https://creativecommons.org/share-your-work/public-domain/cc0/">
            <i class="fab fa-creative-commons-zero"></i> CC0 1.0 Universal License</a>.
        More information about these resources can be found
        <a href="https://github.com/biopragmatics/bioregistry/tree/main/exports/collections">here</a>.
    </p>

    <h3>Bioregistry Knowledge Graph</h3>
    <p>
        The Bioregistry exports a unified knowledge graph encoded in the Resource Description Framework (RDF)
        for integration in triple stores and linked open data settings.
        See the <a href="{{ url_for(".schema") }}">RDF schema</a> page for documentation on schema elements.
        The schema is provided in the following formats:
    </p>
    <ul>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/rdf/schema.ttl">Turtle (.ttl)</a>
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/rdf/schema.nt">N-Triples (.nt)</a>
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/rdf/schema.jsonld">JSON-LD (.jsonld)</a>
        </li>
    </ul>
    <p>
        The combine registry, metaregistry, and collections can be downloaded as RDF in the following formats:
    </p>
    <ul>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/rdf/bioregistry.ttl">Turtle (.ttl)</a>
            (auto-generated by GitHub Actions)
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/rdf/bioregistry.nt">N-Triples (.nt)</a>
            (auto-generated by GitHub Actions)
        </li>
        <!--
        <li>
            <a href="https://github.com/biopragmatics/bioregistry/blob/main/docs/_data/bioregistry.rdf">RDF/XML (.xml)</a>
            (auto-generated by GitHub Actions)
        </li>
        -->
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/rdf/bioregistry.jsonld">
                JSON-LD (.jsonld)
            </a> (auto-generated by GitHub Actions)
        </li>
    </ul>
    <p>
        The manually curated portions of these data are available under the
        <a href="https://creativecommons.org/share-your-work/public-domain/cc0/">
            <i class="fab fa-creative-commons-zero"></i> CC0 1.0 Universal License</a>. Aggregated data are
        redistributed under their original licenses as described <a href="{{ url_for(".acknowledgements") }}">here</a>.
        More information about these resources can be found
        <a href="https://github.com/biopragmatics/bioregistry/tree/main/exports/rdf">here</a>.
    </p>
    <p>
        A network-based view over the full knowledge graph is generated and uploaded to the
        <a href="{{ url_for(".resolve", prefix="ndex", identifier=ndex_uuid) }}">
            Network Data Exchange (NDEx)</a> for exploration using Cytoscape.
    </p>
    <h3>Semantic Web Contexts</h3>
    <p>
        Semantic web applications often require mappings between prefixes and URI prefixes to locally handle CURIE/URI
        conversion. The Bioregistry generates context files for the full registry for reuse:
    </p>
    <ul>
        <li>
            <a href="https://github.com/biopragmatics/bioregistry/raw/main/exports/contexts/bioregistry.context.jsonld">
                JSON-LD (.jsonld)
            </a> (auto-generated by GitHub Actions)
        </li>
        <li>
            <a href="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/contexts/bioregistry.context.ttl">
                SHACL in Turtle (.ttl)
            </a> (auto-generated by GitHub Actions)
        </li>
    </ul>
    <p>
        All context exports are available under the
        <a href="https://creativecommons.org/share-your-work/public-domain/cc0/">
            <i class="fab fa-creative-commons-zero"></i> CC0 1.0 Universal License</a>.

        In addition to the full export, the Bioregistry generates contexts for all collections as well
        as has more powerful utilities for <a
            href="https://github.com/biopragmatics/bioregistry/tree/main/exports/contexts#prescriptive-contexts">curating
        prescriptive contexts</a>. A full list of semantic web contexts generated from both collections and prescriptive
        contexts can be found
        <a href="https://github.com/biopragmatics/bioregistry/tree/main/exports/contexts">here</a>.
    </p>
    <h2>Related Downloads</h2>
    <h3>Bioregistry Regular Expression Report</h3>
    <p>
        The Bioregistry Regular Expression Report uses <a href="https://github.com/pyobo/pyobo">PyOBO</a> to check how
        consistent all of the regular expression patterns are with the actual identifiers from databases that are parsed
        by PyOBO. This contains most entries from the OBO Foundry that are still accessible as well as several
        additional resources such as HGNC, UniProt, etc. The automatically generated/updated report is available
        <a href="https://bioregistry.github.io/regex-report/">here</a>.
    </p>
{% endblock %}
