<!DOCTYPE html>


<html>
<head>
{% load static %}
    {% load custom_tags %}
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}" />
{% 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" %}

                          <h3> Proteins from genome "{{genome}}" associated to the same reference with {{data_type}} </h3>

                        <div style="padding-top:20px;padding-bottom:20px">
                          <table class="table">
                            <tbody>
                                    <tr>
                                        <th>title</th>
                                        <td> <a href="https://www.ncbi.nlm.nih.gov/pubmed/{{pmid}}" target="_top">{{paper_data.0}} </a></td>
                                    </tr>
                                    <tr>
                                        <th>journal</th>
                                        <td> {{paper_data.1}} </td>
                                    </tr>                                       
                                    <tr>
                                        <th>year</th>
                                        <td> {{paper_data.2}} </td>
                                    </tr>
                                </tbody>
                           </table>
                        </div>




                          <table id="pmid_same_genome" class="display">
                            <thead>
                                <tr>
                                    <th></th>
                                    <th>Orthogroup</th>
                                    <th>Locus</th>
                                    <th>C</th>
                                    <th>COGn</th>
                                    <th>KO</th>
                                    <th>Pathways</th>
                                    <th>Modules</th>
                                    <th>Interpro</th>
                                    <th>Gene</th>
                                    <th>nH</th>
                                    <th>nG</th>
                                    <th>TM</th>
                                    <th>SP</th>
                                    <th>Product</th>
                                </tr>
                            </thead>
                            <tbody>

                                {%for values in locus2annot%}
                                <tr>
                                    <td>{{values.0}}</td>
                                    <td>{{values.1}}</td>
                                    <td><a href="{% url 'locusx' values.2 True %}" target="_top">{{values.2}}</a></td>
                                    <td><a href="{% url 'fam' values.2 'cog' %}" target="_top">{{locus_tag2cog_catego|keyvalue:values.2}}</a></td>
                                    {% with locus_tag2cog_name|keyvalue:values.2 as name %}
                                        {% if name == '-' %}
                                            <td>{{locus_tag2cog_name|keyvalue:values.2}}</td>
                                        {% else %}
                                            <td><a href="{% url "fam" name 'cog'%}" target="_top">{{locus_tag2cog_name|keyvalue:values.2}}</a></td>
                                        {% endif %}
                                    {%endwith%}
                                    {% with locus_tag2ko|keyvalue:values.2 as oneko %}
                                        {% if oneko == '-' %}
                                            <td>{{locus_tag2ko|keyvalue:values.2}}</td>
                                            <td>-</td>
                                            <td>-</td>
                                        {% else %}
                                            <td><a href="{% url "fam" oneko 'ko'%}" target="_top">{{locus_tag2ko|keyvalue:values.2}}</a></td>
                                            {% with ko2ko_pathways|keyvalue:oneko as name %}
                                                {% if name == '-' %}
                                                    <td>-</td>
                                                {% else %}
                                                    <td>{{name|safe}}</td>
                                                {% endif %}
                                            {%endwith%}
                                            {% with ko2ko_modules|keyvalue:oneko as name %}
                                                {% if name == '-' %}
                                                    <td>-</td>
                                                {% else %}
                                                    <td>{{name|safe}}</td>
                                                {% endif %}
                                            {%endwith%}
                                        {% endif %}


                                    {%endwith%}
                                    {% with locus2interpro|keyvalue:values.2 as interpro_data %}
                                    <td>
                                        {% for one_interpro in interpro_data %}
                                        {% if one_interpro.0 != '-' %}
                                            <a href="{% url 'fam' one_interpro.0 'interpro' %}" target="_top">{{one_interpro.0}}</a> /
                                        {%else%}
                                            {{one_interpro.0}}
                                        {%endif%}
                                            {{one_interpro.1}} </br>
                                        {% endfor %}
                                        {%endwith%}
                                    </td>
                                    <td>{{values.7}}</td>
                                    <td>{{values.8}}</td>
                                    <td>{{values.9}}</td>
                                    <td>{{values.10}}</td>
                                    <td>{{values.11}}</td>
                                    <td>{{values.12}}</td>

                                </tr>

                                {%endfor%}
                            </tbody>
                        </table>

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

                          <div id="mydiv" style="float: left"></div>
                          <svg class="chart"></svg>
                      </div>

                      <div class="tab-pane" id="tab2">
                          <div id="mydiv2" style="float: left"></div>
                          <svg class="chart2"></svg>
                      </div>

                  </div>


              </div>
          </div>
        </div>
      </div>
    </div>
  </div>


<script>

$(document).ready(function() {
$('#pmid_same_genome').DataTable( {
    "bSortClasses": false,
    dom: 'Bfrtip',
    buttons: [
        'colvis'
    ]
    } );
} );

</script>



</body>
{% include "chlamdb/style_menu.html" %}
</html>
