aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates/populations/create-population.html
blob: b05ce375a80da598a511d1aaff15f8b9ea91de5a (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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
{%extends "populations/base.html"%}
{%from "flash_messages.html" import flash_all_messages%}
{%from "species/macro-select-species.html" import select_species_form%}
{%from "species/macro-display-species-card.html" import display_species_card%}

{%block title%}Create Population{%endblock%}

{%block pagetitle%}Create Population{%endblock%}

{%block lvl3_breadcrumbs%}
<li {%if activelink=="create-population"%}
    class="breadcrumb-item active"
    {%else%}
    class="breadcrumb-item"
    {%endif%}>
  <a href="{{url_for('species.populations.create_population',
           species_id=species.SpeciesId)}}">create population</a>
</li>
{%endblock%}


{%block contents%}
<div class="row">
  <p>The population is the next hierarchical node under Species. Data is grouped under a specific population, under a particular species.</p>
  <p>
    This page enables you to create a new population, in the case that you
    cannot find the population you want in the
    <a
      href="{{url_for('species.populations.list_species_populations',
            species_id=species.SpeciesId)}}"
      title="Population for species '{{species.FullName}}'.">
      list of species populations
    </a>
  </p>
</div>

<div class="row">
  <form method="POST"
        action="{{url_for('species.populations.create_population',
                species_id=species.SpeciesId)}}">

    <legend>Create Population</legend>

    {{flash_all_messages()}}

    <div {%if errors.population_fullname%}
         class="form-group has-error"
         {%else%}
         class="form-group"
         {%endif%}>
      <label for="txt-population-fullname" class="form-label">Full Name</label>
      {%if errors.population_fullname%}
      <small class="form-text text-danger">{{errors.population_fullname}}</small>
      {%endif%}
      <input type="text"
             id="txt-population-fullname"
             name="population_fullname"
             required="required"
             minLength="3"
             maxLength="100"
             value="{{error_values.population_fullname or ''}}"
             class="form-control" />
      <small class="form-text text-muted">
        <p>
          This is a descriptive name for your population &mdash; useful for
          humans.
        </p>
      </small>
    </div>

    <div {%if errors.population_name%}
         class="form-group has-error"
         {%else%}
         class="form-group"
         {%endif%}>
      <label for="txt-population-name" class="form-label">Name</label>
      {%if errors.population_name%}
      <small class="form-text text-danger">{{errors.population_name}}</small>
      {%endif%}
      <input type="text"
             id="txt-population-name"
             name="population_name"
             required="required"
             minLength="3"
             maxLength="30"
             value="{{error_values.population_name or ''}}"
             class="form-control" />
      <small class="form-text text-muted">
        <p>
          This is a short representative, but constrained name for your
          population.
          <br />
          The field will only accept letters ('A-Za-z'), numbers (0-9), hyphens
          and underscores. Any other character will cause the name to be
          rejected.
        </p>
      </small>
    </div>

    <div class="form-group">
      <label for="txt-population-code" class="form-label">Population Code</label>
      <input type="text"
             id="txt-population-code"
             name="population_code"
             maxLength="5"
             minLength="3"
             value="{{error_values.population_code or ''}}"
             class="form-control" />
      <small class="form-text text-muted">
        <p class="text-danger">
          <span class="glyphicon glyphicon-exclamation-sign"></span>
          What is this field is for? Confirm with Arthur and the rest.
        </p>
      </small>
    </div>

    <div {%if errors.population_description%}
         class="form-group has-error"
         {%else%}
         class="form-group"
         {%endif%}>
      <label for="txt-population-description" class="form-label">
        Description
      </label>
      {%if errors.population_description%}
      <small class="form-text text-danger">{{errors.population_description}}</small>
      {%endif%}
      <textarea
        id="txt-population-description"
        name="population_description"
        required="required"
        class="form-control"
        rows="5">{{error_values.population_description or ''}}</textarea>
      <small class="form-text text-muted">
        <p>
          This is a more detailed description for your population. This is
          useful to communicate with other researchers some details regarding
          your population, and what its about.
          <br />
          Put, here, anything that describes your population but does not go
          cleanly under metadata.
        </p>
      </small>
    </div>

    <div {%if errors.population_family%}
         class="form-group has-error"
         {%else%}
         class="form-group"
         {%endif%}>
      <label for="select-population-family" class="form-label">Family</label>
      <select id="select-population-family"
              name="population_family"
              class="form-control"
              required="required">
        <option value="">Please select a family</option>
        {%for family in families%}
        <option value="{{family}}"
                {%if error_values.population_family == family%}
                selected="selected"
                {%endif%}>{{family}}</option>
        {%endfor%}
      </select>
      <small class="form-text text-muted">
        <p>
          This is a rough grouping of the populations in GeneNetwork into lists
          of common types of populations.
        </p>
      </small>
    </div>

    <div {%if errors.population_mapping_method_id%}
         class="form-group has-error"
         {%else%}
         class="form-group"
         {%endif%}>
      <label for="select-population-mapping-methods"
             class="form-label">Mapping Methods</label>

      <select id="select-population-mapping-methods"
              name="population_mapping_method_id"
              class="form-control"
              required="required">
        <option value="">Select appropriate mapping methods</option>
        {%for mmethod in mapping_methods%}
        <option value="{{mmethod.id}}"
                {%if error_values.population_mapping_method_id == mmethod.id%}
                selected="selected"
                {%endif%}>{{mmethod.value}}</option>
        {%endfor%}
      </select>

      <small class="form-text text-muted">
        <p>Select the mapping methods that your population will support.</p>
      </small>
    </div>

    <div {%if errors.population_genetic_type%}
         class="form-group has-error"
         {%else%}
         class="form-group"
         {%endif%}>
      <label for="select-population-genetic-type"
             class="form-label">Genetic Type</label>
      <select id="select-population-genetic-type"
              name="population_genetic_type"
              class="form-control">
        <option value="">Select proper genetic type</option>
        {%for gtype in genetic_types%}
        <option value="{{gtype}}"
                {%if error_values.population_genetic_type == gtype%}
                selected="selected"
                {%endif%}>{{gtype}}</option>
        {%endfor%}
      </select>
      <small class="form-text text-muted text-danger">
        <p>
          <span class="glyphicon glyphicon-exclamation-sign"></span>
          This might be a poorly named field.
        </p>
        <p>
          It probably has more to do with the mating crosses/crossings used to
          produce the individuals in the population. I am no biologist, however,
          and I'm leaving this here to remind myself to confirm this.
        </p>
        <p>
          I still don't know what riset is.<br />
          … probably something to do with Recombinant Inbred Strains
        </p>
        <p>
          Possible resources for this:
          <ul>
            <li>https://www.informatics.jax.org/silver/chapters/3-2.shtml</li>
            <li>https://www.informatics.jax.org/silver/chapters/9-2.shtml</li>
          </ul>
        </p>
      </small>
    </div>

    <div class="form-group">
      <input type="submit"
             value="create population"
             class="btn btn-primary"  />
    </div>

  </form>
</div>
{%endblock%}

{%block sidebarcontents%}
{{display_species_card(species)}}
{%endblock%}