{% extends "base.html" %}

{% import "bootstrap/wtf.html" as wtf %}
{% import "bootstrap/fixes.html" as fixes %}
{% import "bootstrap/utils.html" as util %}

{% block title %}Parser and Validator Help{% endblock %}

{% block content %}
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="{{ url_for('help.index') }}">Help</a></li>
            <li class="active">Parser and Validator</li>
        </ol>

        <div class="page-header">
            <h1>Parser and Validator Help</h1>
        </div>

        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">Definition Errors</h3>
            </div>
            <table class="table table-responsive">
                <thead>
                <tr>
                    <th>Error</th>
                    <th>Description</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>
                        <a href="http://pybel.readthedocs.io/en/latest/logging.html#pybel.parser.exc.InconsistentDefinitionError">
                            Redefined Namespace
                        </a>
                    </td>
                    <td>
                        Raised when two namespaces have the same keyword.
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="http://pybel.readthedocs.io/en/latest/logging.html#pybel.parser.exc.InconsistentDefinitionError">
                            Redefined Annotation
                        </a>
                    </td>
                    <td>
                        Raised when two annotations have the same keyword.
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">Syntax and Semantic Errors</h3>
            </div>
            <table class="table table-responsive">
                <thead>
                <tr>
                    <th>Error</th>
                    <th>Description</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>Naked Name</td>
                    <td>Raised when a <code>namespace:name</code> argument is used without a namespace. For example,
                        <code>a("Amyloid beta")</code> should be qualified with the namespace <code>CHEBI</code> as in
                        <code>a(CHEBI:"Amyloid beta")</code>.
                    </td>
                </tr>
                <tr>
                    <td>Undefined Namespace</td>
                    <td>Raised when a <code>namespace:name</code> argument uses a namespace that was not defined.</td>
                </tr>

                <tr>
                    <td>Missing Namespace Name</td>
                    <td>
                        Raised when a namespace is defined, and the name in a <code>namespace:name</code> argument
                        is not contained.
                    </td>
                </tr>
                <tr>
                    <td>Missing Namespace Regex</td>
                    <td>
                        Raised when a namespace is defined by a regular expression, and a <code>namespace:name</code>
                        argument
                        does not match.
                    </td>
                </tr>

                <tr>
                    <td>Undefined Annotation</td>
                    <td>Raised when a <code>SET {annotation} = "{value}"</code> statement uses an annotation that was
                        not defined.
                    </td>
                </tr>
                <tr>
                    <td>Missing Annotation Key</td>
                    <td>
                        Raised when trying to <code>UNSET</code> and annotation that has not been <code>SET</code>.
                    </td>
                </tr>
                <tr>
                    <td>Illegal Annotation Value</td>
                    <td>
                        Raised when an annotation is defined, and the value in a <code>SET {annotation} =
                        "{value}"</code>
                        statement is not contained.
                    </td>
                </tr>
                <tr>
                    <td>Missing Annotation Regex</td>
                    <td>
                        Raised when an is defined by a regular expression, and a <code>SET {annotation} =
                        "{value}"</code> value does not match.
                    </td>
                </tr>
                <tr>
                    <td>Citation Too Short</td>
                    <td>
                        Raised when setting a citation, but does not have the minimum fields of <code>SET Citation =
                        {type, reference}</code>.
                    </td>
                </tr>
                <tr>
                    <td>Citation Too Long</td>
                    <td>
                        Raised when setting a citation, but it has too many fields (more than {type, name, reference,
                        date, authors, comments}.)
                    </td>
                </tr>
                <tr>
                    <td>Invalid Citation Type</td>
                    <td>
                        Raised when setting a citation uses an invalid type. Valid types are:
                        <ul>
                            <li>Book</li>
                            <li>PubMed</li>
                            <li>Journal</li>
                            <li>Online Resource</li>
                            <li>URL</li>
                            <li>DOI</li>
                            <li>Other</li>
                        </ul>
                    </td>
                </tr>
                <tr>
                    <td>Invalid PubMed Identifier</td>
                    <td>
                        Raised when setting a citation with the PubMed type, but the reference is not a valid integer.

                    </td>
                </tr>
                <tr>
                    <td>Missing Citation</td>
                    <td>
                        Raised when a BEL statement is encountered, but the citation has not been set. All BEL needs
                        provenance!
                    </td>
                </tr>
                <tr>
                    <td>Missing Support</td>
                    <td>
                        Raised when a BEL statement is encountered, but the evidence/support has not been set. All BEL
                        needs provenance!
                    </td>
                </tr>
                <tr>
                    <td>Invalid Function Semantic</td>
                    <td>
                        Raised when a <code>namespace:name</code> is used in a BEL term (protein, biological process,
                        etc.) for which it is not valid. For example, a non-coding gene can not be used in a protein
                        tag.

                        <i>Note</i>: the semantics for each <code>namespace:name</code> are defined in the BEL
                        namespace files.
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>

    {% include "footer.html" %}
{% endblock %}
