<!DOCTYPE html>


<html>


<head>

    {% load static %}
    {% load static %}
    {% load custom_tags %}
    {% include "chlamdb/header.html" %}
</head>

<body>
<div class="container-fluid" id="main_container">
    <div class="row">
        <div id="wrapper">
            <div id="page-content-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    {% include "chlamdb/menu.html" %}

                    <form action='{% url "blast_profile" %}' method="post"  enctype="multipart/form-data">
                        {% csrf_token %}
                        {{ form.as_p }}
                        <input type="submit" value="Submit" />

                    </form>


                    {% if envoi %}

                    <ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
                        <li class="active"><a href="#tab3" data-toggle="tab">Profile</a></li>
                        <li><a href="#tab1" data-toggle="tab">Identity closest</a></li>
                        <li><a href="#tab2" data-toggle="tab">Locus</a></li>
                        <li><a href="#tab4" data-toggle="tab">Table</a></li>

                    </ul>


                    <div id="my-tab-content" class="tab-content">

                        <div class="tab-pane active" id="tab3">
                            <img src="{% static "/scales/scale_identity_red.png" %}" id="circos_legend"  width="160" style="position: absolute; top: 100px; left: 600px;">

                            <object type="image/svg+xml" data="{% static asset_path3 %}" id="inter_tree" style="position: relative; top: 10px; left: 10px;"></object>
                        </div>

                        <div class="tab-pane" id="tab1">

                            <img src="{% static "/scales/scale_identity_red.png" %}" id="circos_legend"  width="160" style="position: absolute; top: 100px; left: 600px;">
                            <object type="image/svg+xml" data="{% static asset_path %}" id="inter_tree"></object>
                        </div>

                        <div class="tab-pane" id="tab2">
                            <img src='{%static scale_path%}' id="circos_legend"  width="160" style="position: absolute; top: 170px; left: 600px;">

                            <object type="image/svg+xml" data="{% static asset_path2 %}" id="inter_tree" style="position: relative; top: 10px; left: 10px;"></object>
                        </div>



                        <div class="tab-pane" id="tab4">
                            <table>
                                <thead>
                                <tr>
                                    <th>Genome</th>
                                {% for label in ordered_labels_keep%}
                                    <th>{{label}}</th>
                                {% endfor %}
                                </tr>

                                </thead>
                                <tbody>
                                    {% for taxon in ordered_taxons_keep %}
                                        <tr>
                                            <th>{{taxon2genome|keyvalue:taxon}}</th>
                                            {% for label in ordered_labels_keep%}
                                                {% with locus2taxon2locus_closest|keyvalue:label as taxon2locus_closest %}
                                                {% with taxon2locus_closest|keyvalue:taxon as hitlocus %}
                                                        {%if hitlocus != None%}
                                                            <td><a href="{% url 'locusx' hitlocus True %}" target="_top">{{hitlocus}}</a></td>
                                                        {%else%}
                                                            <td></td>
                                                        {%endif%}
                                                {%endwith%}
                                                {% endwith %}
                                            {% endfor %}
                                        </tr>

                                    {% endfor %}
                                </tbody>

                            </table>


                        </div>


                    </div>
                    {% endif %}
                </div>
            </div>
        </div>
       </div>
    </div>       
</div> 

</body>
{% include "chlamdb/style_menu.html" %}
<style>
#id_category{
    width:280px;
    text-align:left;
    left:600px;

}

</style>

</html>
