aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates/genotypes/list-genotypes.html
blob: 9b27540c6c5f90bea788cd8dcd52a04a084848a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{%extends "genotypes/base.html"%}
{%from "flash_messages.html" import flash_all_messages%}
{%from "populations/macro-display-population-card.html" import display_population_card%}

{%block title%}Genotypes{%endblock%}

{%block pagetitle%}Genotypes{%endblock%}

{%block lvl4_breadcrumbs%}
<li {%if activelink=="list-genotypes"%}
    class="breadcrumb-item active"
    {%else%}
    class="breadcrumb-item"
    {%endif%}>
  <a href="{{url_for('species.populations.genotypes.list_genotypes',
           species_id=species.SpeciesId,
           population_id=population.Id)}}">List genotypes</a>
</li>
{%endblock%}

{%block contents%}
{{flash_all_messages()}}

<div class="row">
  <p>
    The genotype encoding used for the "{{population.FullName}}" population from
    the "{{species.FullName}}" species is as shown in the table below.
  </p>
  <table class="table">
    <legend>Genotype Encoding</legend>

    <thead>
      <tr>
        <th>Allele Type</th>
        <th>Allele Symbol</th>
        <th>Allele Value</th>
      </tr>
    </thead>

    <tbody>
      {%for row in genocode%}
      <tr>
        <td>{{row.AlleleType}}</td>
        <td>{{row.AlleleSymbol}}</td>
        <td>{{row.DatabaseValue if row.DatabaseValue is not none else "NULL"}}</td>
      </tr>
      {%else%}
      <tr>
        <td colspan="7" class="text-info">
          <span class="glyphicon glyphicon-exclamation-sign"></span>
          There is no explicit genotype encoding defined for this population.
        </td>
      </tr>
      {%endfor%}
    </tbody>
  </table>
</div>

<div class="row text-danger">
  <h3>Some Important Concepts to Consider/Remember</h3>
  <ul>
    <li>Reference vs. Non-reference alleles</li>
    <li>In <em>GenoCode</em> table, items are ordered by <strong>InbredSet</strong></li>
  </ul>
  <h3>Possible references</h3>
  <ul>
    <li>https://mr-dictionary.mrcieu.ac.uk/term/genotype/</li>
  </ul>
</div>

<div class="row">
  <p>
    There are a total of {{total_markers}} genotype markers for this species.
  </p>
  <div class="row">
    <div class="col-md-2" style="text-align: start;">
      {%if start_from > 0%}
      <a href="{{url_for('species.populations.genotypes.list_genotypes',
               species_id=species.SpeciesId,
               population_id=population.Id,
               start_from=start_from-count,
               count=count)}}">
        <span class="glyphicon glyphicon-backward"></span>
        Previous
      </a>
      {%endif%}
    </div>
    <div class="col-md-8" style="text-align: center;">
      Displaying markers {{start_from+1}} to {{start_from + count}} of
      {{total_markers}}
    </div>
    <div class="col-md-2" style="text-align: end;">
      {%if start_from + count < total_markers%}
      <a href="{{url_for('species.populations.genotypes.list_genotypes',
               species_id=species.SpeciesId,
               population_id=population.Id,
               start_from=start_from+count,
               count=count)}}">
        Next
        <span class="glyphicon glyphicon-forward"></span>
      </a>
      {%endif%}
    </div>
  </div>
  <table class="table">
    <thead>
      <tr>
        <th title="">#</th>
        <th title="">Marker Name</th>
        <th title="Chromosome">Chr</th>
        <th title="Physical location of the marker in megabasepairs">
          Location (Mb)</th>
        <th title="">Source</th>
        <th title="">Source2</th>
    </thead>

    <tbody>
      {%for marker in markers%}
      <tr>
        <td>{{marker.sequence_number}}</td>
        <td>{{marker.Marker_Name}}</td>
        <td>{{marker.Chr}}</td>
        <td>{{marker.Mb}}</td>
        <td>{{marker.Source}}</td>
        <td>{{marker.Source2}}</td>
      </tr>
      {%else%}
      <tr>
        <td colspan="7" class="text-info">
          <span class="glyphicon glyphicon-exclamation-sign"></span>
          No markers to display!
        </td>
      </tr>
      {%endfor%}
    </tbody>
  </table>
</div>
{%endblock%}

{%block sidebarcontents%}
{{display_population_card(species, population)}}
{%endblock%}