{% extends "base.html" %}

{% block content %}
    <h5 class="card-header">Inspector Javert's Mapper</h5>
    <div class="card-body">
        <p class="card-text">
            This service resolves <a href="https://en.wikipedia.org/wiki/CURIE">CURIEs</a>
            to the best CURIE that's mapped to it.
        </p>
        <p>
            A summary of all of the xrefs can be found <a href="{{ url_for('.summarize') }}">here</a>.
            You can also look at a summary for a specific prefix like <a
                href="{{ url_for('.summarize_one', prefix='umls') }}"><code>UMLS</code></a>.
        </p>
        <ul>
            <li>
                Use the <code>/mappings</code> endpoint to look up equivalent entities,
                for example, <a
                    href="{{ url_for('.single_source_mappings', curie='hgnc:6893') }}"><code>hgnc:6893</code></a>.
            </li>
            <li>
                Use the <code>/mappings</code> endpoint to look up all mappings between two entities,
                for example, <a
                    href="{{ url_for('.all_mappings', source_curie='hgnc:6893', target_curie='ensembl:ENSG00000186868') }}"><code>hgnc:6893</code>
                and <code>ensembl:ENSG00000186868</code></a>.
            </li>
        </ul>
    </div>
    <table class="table">
        <thead>
        <tr>
            <th scope="col">CURIE</th>
            <th scope="col">Description</th>
        </tr>
        </thead>
        <tr>
            <td><a href="{{ url_for('.canonicalize', curie='hgnc:6893') }}">hgnc:6893</a></td>
            <td>✅ maps correct identifier to higher priority namespace (ncbigene)</td>
        </tr>
        <tr>
            <td><a href="{{ url_for('.canonicalize', curie='ncbigene:4137') }}">ncbigene:4137</a></td>
            <td>✅ already priority namespace</td>
        </tr>
        <tr>
            <td><a href="{{ url_for('.canonicalize', curie='DOID:00000') }}">DOID:00000</a></td>
            <td>❌ invalid identifier</td>
        </tr>
        <tr>
            <td><a href="{{ url_for('.canonicalize', curie='NNN:00000') }}">NNN:00000</a></td>
            <td>❌ invalid prefix</td>
        </tr>
        <tr>
            <td><a href="{{ url_for('.canonicalize', curie='wikidata:Q42') }}">wikidata:Q42</a></td>
            <td>❌ unmapped prefix</td>
        </tr>
    </table>
    <div class="card-footer text-center">
        Developed with ❤️ in 🇩🇪 by <a href="https://github.com/cthoyt">@cthoyt</a>.

        (<span class="text-muted"><a href="https://github.com/pyobo/pyobo">source code</a></span> |
        <span class="text-muted"><a
                href="https://cthoyt.com/2020/04/19/inspector-javerts-xref-database.html">blog post</a></span>)
    </div>
{% endblock %}
