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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
|
{%extends "phenotypes/base.html"%}
{%from "flash_messages.html" import flash_all_messages%}
{%from "populations/macro-display-population-card.html" import display_population_card%}
{%block title%}Phenotypes{%endblock%}
{%block pagetitle%}Phenotypes{%endblock%}
{%block lvl4_breadcrumbs%}
<li {%if activelink=="edit-phenotype"%}
class="breadcrumb-item active"
{%else%}
class="breadcrumb-item"
{%endif%}>
<a href="{{url_for('species.populations.phenotypes.edit_phenotype_data',
species_id=species.SpeciesId,
population_id=population.Id,
dataset_id=dataset.Id,
xref_id=xref_id)}}">View Datasets</a>
</li>
{%endblock%}
{%block contents%}
{{flash_all_messages()}}
<div class="row">
<h2 class="heading">edit phenotype data</h2>
<p>The two (2) forms provided in this page help you update the data for the
phenotypes, and the publication information for the phenotype,
respectively.</p>
</div>
<div class="row">
<h3 class="subheading">Basic metadata</h3>
<form name="frm-phenotype-basic-metadata"
class="form-horizontal"
method="POST"
action="{{url_for(
'species.populations.phenotypes.edit_phenotype_data',
species_id=species.SpeciesId,
population_id=population.Id,
dataset_id=dataset.Id,
xref_id=xref_id)}}">
<input type="hidden" name="phenotype-id" value="{{phenotype.Id}}" />
<div class="form-group">
<label for="txt-pre-publication-description"
class="control-label col-sm-2">Pre-Publication Description</label>
<div class="col-sm-10">
<input type="text"
id="txt-pre-publication-description"
name="pre-publication-description"
class="form-control"
value="{{phenotype['Pre_publication_description'] or ''}}" />
</div>
</div>
<div class="form-group">
<label for="txt-pre-publication-abbreviation"
class="control-label col-sm-2">Pre-Publication Abbreviation</label>
<div class="col-sm-10">
<input type="text"
id="txt-pre-publication-abbreviation"
name="pre-publication-abbreviation"
class="form-control"
value="{{phenotype['Pre_publication_abbreviation'] or ''}}" />
</div>
</div>
<div class="form-group">
<label for="txt-post-publication-description"
class="control-label col-sm-2">Post-Publication Description</label>
<div class="col-sm-10">
<input type="text"
id="txt-post-publication-description"
name="post-publication-description"
class="form-control"
value="{{phenotype['Post_publication_description'] or ''}}" />
</div>
</div>
<div class="form-group">
<label for="txt-post-publication-abbreviation"
class="control-label col-sm-2">Post-Publication Abbreviation</label>
<div class="col-sm-10">
<input type="text"
id="txt-post-publication-abbreviation"
name="post-publication-abbreviation"
class="form-control"
value="{{phenotype['Post_publication_abbreviation'] or ''}}" />
</div>
</div>
<div class="form-group">
<label for="txt-original-description"
class="control-label col-sm-2">Original Description</label>
<div class="col-sm-10">
<input type="text"
id="txt-original-description"
name="original-description"
class="form-control"
value="{{phenotype['Original_description'] or ''}}" />
</div>
</div>
<div class="form-group">
<label for="txt-units"
class="control-label col-sm-2">units</label>
<div class="col-sm-10">
<input type="text"
id="txt-units"
name="units"
class="form-control"
required="required"
value="{{phenotype['Units']}}" />
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit"
name="submit"
class="btn btn-primary"
value="update basic metadata">
</div>
</div>
</form>
</div>
<div class="row">
<h3 class="subheading">phenotype data</h3>
<form id="frm-edit-phenotype-data"
class="form-horizontal"
method="POST"
action="{{url_for(
'species.populations.phenotypes.edit_phenotype_data',
species_id=species.SpeciesId,
population_id=population.Id,
dataset_id=dataset.Id,
xref_id=xref_id)}}">
<div style="max-height: 23.37em;overflow-y: scroll;">
<table class="table table-striped table-responsive table-form-table">
<thead style="position: sticky; top: 0;">
<tr>
<th>#</th>
<th>Sample</th>
<th>Value</th>
{%if population.Family in families_with_se_and_n%}
<th>Standard-Error</th>
<th>Number of Samples</th>
{%endif%}
</tr>
</thead>
<tbody>
{%for item in phenotype.data%}
<tr>
<td>{{loop.index}}</td>
<td>{{item.StrainName}}</td>
<td>
<input type="text"
name="value-new::{{item.DataId}}::{{item.StrainId}}"
value="{{item.value}}"
class="form-control" />
<input type="hidden"
name="value-original::{{item.DataId}}::{{item.StrainId}}"
value="{{item.value}}" /></td>
{%if population.Family in families_with_se_and_n%}
<td>
<input type="text"
name="se-new::{{item.DataId}}::{{item.StrainId}}"
value="{{item.error or ''}}"
data-original-value="{{item.error or ''}}"
class="form-control" />
<input type="hidden"
name="se-original::{{item.DataId}}::{{item.StrainId}}"
value="{{item.error or ''}}" /></td>
<td>
<input type="text"
name="n-new::{{item.DataId}}::{{item.StrainId}}"
value="{{item.count or ''}}"
data-original-value="{{item.count or "-"}}"
class="form-control" />
<input type="hidden"
name="n-original::{{item.DataId}}::{{item.StrainId}}"
value="{{item.count or ''}}" /></td>
{%endif%}
</tr>
{%endfor%}
</tbody>
</table>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit"
name="submit"
class="btn btn-primary"
value="update data" />
</div>
</div>
</form>
</div>
<div class="row">
<h3 class="subheading">publication information</h3>
<p>Use the form below to update the publication information for this
phenotype.</p>
<form id="frm-edit-phenotype-pub-data"
class="form-horizontal"
method="POST"
action="#">
<div class="form-group">
<label for="txt-pubmed-id" class="control-label col-sm-2">Pubmed ID</label>
<div class="col-sm-10">
<input id="txt-pubmed-id" name="pubmed-id" type="text"
class="form-control" />
<span class="form-text text-muted">
Enter your publication's PubMed ID.</span>
</div>
</div>
<div class="form-group">
<label for="txt-publication-authors" class="control-label col-sm-2">Authors</label>
<div class="col-sm-10">
<input id="txt-publication-authors" name="publication-authors"
type="text" class="form-control" />
<span class="form-text text-muted">
Enter the authors.</span>
</div>
</div>
<div class="form-group">
<label for="txt-publication-title" class="control-label col-sm-2">
Publication Title</label>
<div class="col-sm-10">
<input id="txt-publication-title" name="publication-title" type="text"
class="form-control" />
<span class="form-text text-muted">
Enter your publication's title.</span>
</div>
</div>
<div class="form-group">
<label for="txt-publication-abstract" class="control-label col-sm-2">
Publication Abstract</label>
<div class="col-sm-10">
<textarea id="txt-publication-abstract" name="publication-abstract"
class="form-control" rows="10"></textarea>
<span class="form-text text-muted">
Enter the abstract for your publication.</span>
</div>
</div>
<div class="form-group">
<label for="txt-publication-journal" class="control-label col-sm-2">Journal</label>
<div class="col-sm-10">
<input id="txt-publication-journal" name="journal" type="text"
class="form-control" />
<span class="form-text text-muted">
Enter the name of the journal where your work was published.</span>
</div>
</div>
<div class="form-group">
<label for="txt-publication-volume" class="control-label col-sm-2">Volume</label>
<div class="col-sm-10">
<input id="txt-publication-volume" name="publication-volume" type="text"
class="form-control" />
<span class="form-text text-muted">
Enter the volume in the following format …</span>
</div>
</div>
<div class="form-group">
<label for="txt-publication-pages" class="control-label col-sm-2">Pages</label>
<div class="col-sm-10">
<input id="txt-publication-pages" name="publication-pages" type="text"
class="form-control" />
<span class="form-text text-muted">
Enter the journal volume where your work was published.</span>
</div>
</div>
<div class="form-group">
<label for="select-publication-month" class="control-label col-sm-2">
Publication Month</label>
<div class="col-sm-10">
<select id="select-publication-month" name="publication-month"
class="form-control">
{%for month in monthnames%}
<option value="{{month | lower}}"
{%if current_month | lower == month | lower%}
selected="selected"
{%endif%}>{{month | capitalize}}</option>
{%endfor%}
</select>
<span class="form-text text-muted">
Select the month when the work was published.
<span class="text-danger">
This cannot be before, say 1600 and cannot be in the future!</span></span>
</div>
</div>
<div class="form-group">
<label for="txt-publication-year" class="control-label col-sm-2">Publication Year</label>
<div class="col-sm-10">
<input id="txt-publication-year" name="publication-year" type="text"
class="form-control" value="{{current_year}}" />
<span class="form-text text-muted">
Enter the year your work was published.
<span class="text-danger">
This cannot be before, say 1600 and cannot be in the future!</span>
</span>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit"
name="submit"
class="btn btn-primary not-implemented"
value="update publication" />
</div>
</div>
</form>
</div>
{%endblock%}
{%block sidebarcontents%}
{{display_population_card(species, population)}}
{%endblock%}
|