scout-browser 4.102.0__py3-none-any.whl → 4.103.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scout/adapter/mongo/case.py +26 -122
- scout/adapter/mongo/clinvar.py +91 -25
- scout/adapter/mongo/event.py +0 -47
- scout/adapter/mongo/variant_loader.py +7 -3
- scout/build/variant/variant.py +1 -0
- scout/commands/load/variants.py +1 -1
- scout/commands/update/user.py +87 -49
- scout/constants/__init__.py +3 -0
- scout/constants/clinvar.py +10 -0
- scout/constants/variant_tags.py +18 -0
- scout/demo/NIST.trgt.stranger.vcf.gz +0 -0
- scout/demo/NIST.trgt.stranger.vcf.gz.tbi +0 -0
- scout/demo/__init__.py +1 -0
- scout/models/clinvar.py +86 -0
- scout/parse/variant/coordinates.py +5 -1
- scout/parse/variant/gene.py +5 -9
- scout/parse/variant/genotype.py +66 -42
- scout/parse/variant/variant.py +2 -0
- scout/server/app.py +71 -2
- scout/server/blueprints/alignviewers/templates/alignviewers/igv_viewer.html +2 -0
- scout/server/blueprints/cases/controllers.py +1 -1
- scout/server/blueprints/cases/templates/cases/case_report.html +19 -2
- scout/server/blueprints/cases/templates/cases/utils.html +8 -29
- scout/server/blueprints/clinvar/controllers.py +233 -53
- scout/server/blueprints/clinvar/form.py +38 -1
- scout/server/blueprints/clinvar/static/form_style.css +8 -1
- scout/server/blueprints/clinvar/templates/clinvar/clinvar_onc_submissions.html +200 -0
- scout/server/blueprints/clinvar/templates/clinvar/clinvar_submissions.html +3 -2
- scout/server/blueprints/clinvar/templates/clinvar/components.html +198 -0
- scout/server/blueprints/clinvar/templates/clinvar/multistep_add_onc_variant.html +187 -0
- scout/server/blueprints/clinvar/templates/clinvar/multistep_add_variant.html +9 -348
- scout/server/blueprints/clinvar/templates/clinvar/scripts.html +193 -0
- scout/server/blueprints/clinvar/views.py +90 -13
- scout/server/blueprints/institutes/controllers.py +44 -5
- scout/server/blueprints/institutes/forms.py +1 -0
- scout/server/blueprints/institutes/templates/overview/gene_variants.html +15 -6
- scout/server/blueprints/institutes/templates/overview/institute_sidebar.html +28 -2
- scout/server/blueprints/institutes/templates/overview/utils.html +1 -1
- scout/server/blueprints/institutes/views.py +17 -4
- scout/server/blueprints/mme/templates/mme/mme_submissions.html +2 -2
- scout/server/blueprints/omics_variants/templates/omics_variants/outliers.html +2 -2
- scout/server/blueprints/variant/controllers.py +1 -1
- scout/server/blueprints/variant/templates/variant/cancer-variant.html +2 -1
- scout/server/blueprints/variant/templates/variant/components.html +0 -1
- scout/server/blueprints/variant/templates/variant/sv-variant.html +2 -1
- scout/server/blueprints/variant/templates/variant/variant.html +2 -2
- scout/server/blueprints/variant/templates/variant/variant_details.html +32 -24
- scout/server/blueprints/variants/templates/variants/cancer-variants.html +5 -3
- scout/server/blueprints/variants/templates/variants/str-variants.html +4 -1
- scout/server/blueprints/variants/templates/variants/sv-variants.html +3 -3
- scout/server/blueprints/variants/templates/variants/utils.html +4 -0
- scout/server/blueprints/variants/templates/variants/variants.html +4 -4
- scout/server/extensions/clinvar_extension.py +2 -2
- scout/server/templates/layout.html +1 -1
- {scout_browser-4.102.0.dist-info → scout_browser-4.103.0.dist-info}/METADATA +1 -1
- {scout_browser-4.102.0.dist-info → scout_browser-4.103.0.dist-info}/RECORD +59 -53
- {scout_browser-4.102.0.dist-info → scout_browser-4.103.0.dist-info}/WHEEL +0 -0
- {scout_browser-4.102.0.dist-info → scout_browser-4.103.0.dist-info}/entry_points.txt +0 -0
- {scout_browser-4.102.0.dist-info → scout_browser-4.103.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,200 @@
|
|
1
|
+
{% extends "layout.html" %}
|
2
|
+
{% from "overview/institute_sidebar.html" import institute_actionbar %}
|
3
|
+
{% from "clinvar/components.html" import update_submission_status_form %}
|
4
|
+
|
5
|
+
{% block title %}
|
6
|
+
{{ super() }} - {{ institute.display_name }}
|
7
|
+
{% endblock %}
|
8
|
+
|
9
|
+
{% block top_nav %}
|
10
|
+
{{ super() }}
|
11
|
+
<li class="nav-item">
|
12
|
+
<a class="nav-link" href="{{ url_for('cases.index') }}">Institutes</a>
|
13
|
+
</li>
|
14
|
+
<li class="nav-item">
|
15
|
+
<a class="nav-link" href="{{ url_for('overview.cases', institute_id=institute._id) }}">{{ institute.display_name }}</a>
|
16
|
+
</li>
|
17
|
+
<li class="nav-item active d-flex align-items-center">
|
18
|
+
<span class="navbar-text">Clinvar oncogenicity submissions</span>
|
19
|
+
</li>
|
20
|
+
{% endblock %}
|
21
|
+
|
22
|
+
|
23
|
+
{% macro submissions_macro(submissions) %}
|
24
|
+
<div class="container-float">
|
25
|
+
<h3 class="mt-3">Oncogenicity submissions</h3>
|
26
|
+
<br>
|
27
|
+
{% if submissions %}
|
28
|
+
<div style="overflow-y: auto; height: 1000px;">
|
29
|
+
{% for status in ['open', 'closed', 'submitted'] %}
|
30
|
+
{% for submission in submissions|sort(attribute='status') %}
|
31
|
+
{% if submission.status==status %}
|
32
|
+
{{ submission_panel(submission) }}
|
33
|
+
{% endif %}
|
34
|
+
{% endfor %}
|
35
|
+
{% endfor %}
|
36
|
+
</div>
|
37
|
+
{% else %}
|
38
|
+
<p>No ClinVar submissions found. You can create one by choosing one or more pinned variants on a case page and clicking the button "Submit to ClinVar".</p>
|
39
|
+
{% endif %}
|
40
|
+
</div>
|
41
|
+
{% endmacro %}
|
42
|
+
|
43
|
+
{% macro submission_panel(subm_obj) %}
|
44
|
+
<div class="accordion accordion-flush" id="accordionFlushSubmissions">
|
45
|
+
<div class="accordion-item">
|
46
|
+
<h2 class="accordion-header" id="header-{{subm_obj._id}}">
|
47
|
+
<a class="accordion-button collapsed {% if subm_obj.status=='open' %} link-primary {% elif subm_obj.status=='submitted' %} link-success {% else %} link-secondary {% endif%}" type="button" data-bs-toggle="collapse" data-bs-target="#flush-{{subm_obj._id}}" aria-expanded="false" aria-controls="flush-{{subm_obj._id}}" style="text-decoration: none;">
|
48
|
+
Submission <strong>{{subm_obj._id}} - ({{subm_obj.status|upper}})</strong> / Created {% if subm_obj.created_by %} by <strong>{{subm_obj.created_by}}</strong>{% endif %} on <strong>{{subm_obj.created_at.strftime('%Y-%m-%d')}}</strong> / Last updated: <strong>{{subm_obj.updated_at.strftime('%d-%m-%Y, %T')}}</strong>
|
49
|
+
</a>
|
50
|
+
</h2>
|
51
|
+
<div id="flush-{{subm_obj._id}}" class="accordion-collapse collapse" aria-labelledby="header-{{subm_obj._id}}" data-bs-parent="#accordionFlushSubmissions">
|
52
|
+
<div class="accordion-body">
|
53
|
+
<div class="row">
|
54
|
+
{{ update_submission_status_form(institute, subm_obj) }}
|
55
|
+
</div>
|
56
|
+
<div class="row">
|
57
|
+
<table>
|
58
|
+
<caption></caption>
|
59
|
+
<tr><th></th></tr>
|
60
|
+
<tr>
|
61
|
+
<form id="updateName_{{subm_obj._id}}" action="{{ url_for('clinvar.clinvar_update_submission', institute_id=institute._id, submission=subm_obj._id) }}" method="POST">
|
62
|
+
<td style="width: 10%"><label for="clinvar_id">Submission ID</label></td>
|
63
|
+
<td style="width: 25%"> <input type="text" class="form-control" name="clinvar_id" pattern="SUB[0-9]+" placeholder="ex: SUB1234567" value="{{ subm_obj.clinvar_subm_id or ""}}"></td>
|
64
|
+
<td style="width: 20%"><button type="submit" class="btn btn-sm btn-primary form-control" name="update_submission" value="register_id">Update ID manually</button></td>
|
65
|
+
</form>
|
66
|
+
{% if subm_obj.status == 'open' and show_submit %}
|
67
|
+
<form id="useApi_{{subm_obj._id}}" action="{{ url_for('clinvar.clinvar_update_submission', institute_id=institute._id, submission=subm_obj._id) }}" method="POST">
|
68
|
+
{{ submit_modal() }}
|
69
|
+
<td style="width: 20%"><button type="button" class="btn btn-sm btn-success form-control" name="update_submission" value="api_submit" data-bs-toggle="modal" data-bs-target="#submitModal">Submit to ClinVar</button></td>
|
70
|
+
</form>
|
71
|
+
{% endif %}
|
72
|
+
{% if subm_obj.status == 'submitted' %} <!--Submission status query -->
|
73
|
+
<form id="statusApi_{{subm_obj._id}}" action="{{ url_for('clinvar.clinvar_submission_status', submission_id=subm_obj.clinvar_subm_id) }}" method="POST">
|
74
|
+
{{ action_modal("status", subm_obj._id) }}
|
75
|
+
<td style="width: 20%"><button type="button" class="btn btn-sm btn-secondary form-control" name="status_enquiry" value="api_status" data-bs-toggle="modal" data-bs-target="#statusModal_{{subm_obj._id}}">Submission status enquiry</button></td>
|
76
|
+
</form>
|
77
|
+
<form id="deleteApi_{{subm_obj._id}}" action="{{ url_for('clinvar.clinvar_submission_delete', submission_id=subm_obj.clinvar_subm_id) }}" method="POST">
|
78
|
+
{{ action_modal("remove", subm_obj._id) }}
|
79
|
+
<td style="width: 20%"><button type="button" class="btn btn-sm btn-danger form-control" name="_enquiry" value="api_status" data-bs-toggle="modal" data-bs-target="#removeModal_{{subm_obj._id}}">Delete submission from ClinVar</button></td>
|
80
|
+
</form>
|
81
|
+
{% endif %}
|
82
|
+
</tr>
|
83
|
+
</table>
|
84
|
+
</div>
|
85
|
+
<div> <!--variant data div -->
|
86
|
+
<h4>Variant data:</h4>
|
87
|
+
{% if subm_obj.oncogenicitySubmission and subm_obj.oncogenicitySubmission | length > 0 %}
|
88
|
+
<table class="table table-striped">
|
89
|
+
<caption></caption>
|
90
|
+
<thead>
|
91
|
+
<tr>
|
92
|
+
<th>Case</th>
|
93
|
+
<th>Variant</th>
|
94
|
+
<th>Classification</th>
|
95
|
+
<th>Last evaluated</th>
|
96
|
+
<th>Comment</th>
|
97
|
+
<th>Citation</th>
|
98
|
+
<th>Variant</th>
|
99
|
+
<th>Associated conditions</th>
|
100
|
+
<th>Observations</th>
|
101
|
+
<th></th>
|
102
|
+
</tr>
|
103
|
+
</thead>
|
104
|
+
<tbody>
|
105
|
+
{% for onc_var in subm_obj.oncogenicitySubmission %}
|
106
|
+
<tr>
|
107
|
+
<td><a href="{{ url_for('cases.case', institute_id=onc_var.institute_id, case_name=onc_var.case_name) }}" target="_blank">{{onc_var.case_name}}</a></td>
|
108
|
+
<td><a href="{{ url_for('variant.cancer_variant', institute_id=onc_var.institute_id, case_name=onc_var.case_name, variant_id=onc_var.variant_id) }}" target="_blank">link</a></td>
|
109
|
+
<td>{{onc_var.oncogenicityClassification.oncogenicityClassificationDescription}}</td>
|
110
|
+
<td>{{onc_var.oncogenicityClassification.dateLastEvaluated}}</td>
|
111
|
+
<td>{{onc_var.oncogenicityClassification.comment}}</td>
|
112
|
+
<td>{{render_dict_array(onc_var.oncogenicityClassification.citation)}}</td>
|
113
|
+
<td>{{render_dict_array(onc_var.variantSet.variant)}}</td>
|
114
|
+
<td>{{render_dict_array(onc_var.conditionSet.condition)}}</td>
|
115
|
+
<td>{{render_dict_array(onc_var.observedIn)}}</td>
|
116
|
+
<td>
|
117
|
+
<form id="delete_onc_var_item_{{subm_obj._id}}_{{onc_var.variant_id}}" action="{{ url_for('clinvar.clinvar_delete_onc_variant', submission=subm_obj._id) }}" method="POST">
|
118
|
+
<button type="submit" name="delete_object" value="{{onc_var.variant_id}}" class="btn btn-danger btn-xs"><span class="fa fa-trash" aria-hidden="true"></span></button>
|
119
|
+
</form>
|
120
|
+
</td>
|
121
|
+
</tr>
|
122
|
+
{% endfor %}
|
123
|
+
</tbody>
|
124
|
+
</table>
|
125
|
+
{% else %}
|
126
|
+
<p>This submission is open but has no variants yet.</p>
|
127
|
+
{% endif %}
|
128
|
+
</div> <!--variant data div end -->
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
{% endmacro %}
|
134
|
+
|
135
|
+
{% macro render_dict_array(list_of_dicts) %}
|
136
|
+
{% for item in list_of_dicts %}
|
137
|
+
{% for key, value in item.items() %}
|
138
|
+
{{key}} : {{value}}<br>
|
139
|
+
{% endfor %}
|
140
|
+
{% endfor %}
|
141
|
+
{% if list_of_dicts|length > 1%}<br>{% endif %}
|
142
|
+
{% endmacro %}
|
143
|
+
|
144
|
+
{% macro action_modal(action_type, subm_id) %}
|
145
|
+
<div class="modal fade" id="{{action_type}}Modal_{{subm_id}}" tabindex="-1">
|
146
|
+
<div class="modal-dialog">
|
147
|
+
<div class="modal-content">
|
148
|
+
<div class="modal-header">
|
149
|
+
<h5 class="modal-title">Submission {{action_type}}</h5>
|
150
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
151
|
+
</div>
|
152
|
+
<div class="modal-body">
|
153
|
+
<label for="apiKey">Submitter's <a href="https://www.ncbi.nlm.nih.gov/clinvar/docs/api_http/" target="_blank" rel="noopener">API key</a></label>
|
154
|
+
<input type="password" class="form-control" name="apiKey" id="apiKey" placeholder="64 alphanumeric characters" value="{{institute.clinvar_key or ''}}" required>
|
155
|
+
</div>
|
156
|
+
<div class="modal-footer">
|
157
|
+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
158
|
+
<button type="submit" name="{{action_type}}" value="{{action_type}}" class="btn btn-primary">Submission {{action_type}} enquiry</button>
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
</div>
|
163
|
+
{% endmacro %}
|
164
|
+
|
165
|
+
{% macro submit_modal() %}
|
166
|
+
<div class="modal fade" id="submitModal" tabindex="-1">
|
167
|
+
<div class="modal-dialog">
|
168
|
+
<div class="modal-content">
|
169
|
+
<div class="modal-header">
|
170
|
+
<h5 class="modal-title">ClinVar API submission</h5>
|
171
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
172
|
+
</div>
|
173
|
+
<div class="modal-body">
|
174
|
+
<label for="apiKey">Submitter's <a href="https://www.ncbi.nlm.nih.gov/clinvar/docs/api_http/" target="_blank" rel="noopener">API key</a></label>
|
175
|
+
<input type="password" class="form-control" name="apiKey" id="apiKey" placeholder="64 alphanumeric characters" value="{{institute.clinvar_key or ''}}" required>
|
176
|
+
</div>
|
177
|
+
<div class="modal-footer">
|
178
|
+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
179
|
+
<button type="submit" name="update_submission" value="submit" class="btn btn-primary">Submit variants</button>
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
{% endmacro %}
|
185
|
+
|
186
|
+
{% block content_main %}
|
187
|
+
<div class="container-float">
|
188
|
+
<div class="row" id="body-row"> <!--sidebar and main container are on the same row-->
|
189
|
+
{{ institute_actionbar(institute, "shared") }} <!-- This is the sidebar -->
|
190
|
+
<div class="col">
|
191
|
+
{{ submissions_macro(submissions) }}
|
192
|
+
</div>
|
193
|
+
</div> <!-- end of div id body-row -->
|
194
|
+
</div>
|
195
|
+
{% endblock %}
|
196
|
+
|
197
|
+
{% block scripts %}
|
198
|
+
{{ super() }}
|
199
|
+
|
200
|
+
{% endblock %}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
{% extends "layout.html" %}
|
2
2
|
{% from "overview/institute_sidebar.html" import institute_actionbar %}
|
3
3
|
{% from "clinvar/clinvar_howto.html" import clinvar_howto_modal %}
|
4
|
+
{% from "clinvar/components.html" import update_submission_status_form %}
|
4
5
|
|
5
6
|
{% block title %}
|
6
7
|
{{ super() }} - {{ institute.display_name }}
|
@@ -15,14 +16,14 @@
|
|
15
16
|
<a class="nav-link" href="{{ url_for('overview.cases', institute_id=institute._id) }}">{{ institute.display_name }}</a>
|
16
17
|
</li>
|
17
18
|
<li class="nav-item active d-flex align-items-center">
|
18
|
-
<span class="navbar-text">Clinvar submissions</span>
|
19
|
+
<span class="navbar-text">Clinvar germline submissions</span>
|
19
20
|
</li>
|
20
21
|
{% endblock %}
|
21
22
|
|
22
23
|
|
23
24
|
{% macro submissions_macro(submissions) %}
|
24
25
|
<div class="container-float">
|
25
|
-
<h3 class="mt-3">ClinVar submissions page
|
26
|
+
<h3 class="mt-3">ClinVar submissions page</h3><a data-bs-target="#howto" href="#" data-bs-toggle="modal">howto</a><br>
|
26
27
|
<!-- Modal -->
|
27
28
|
{{ clinvar_howto_modal() }}
|
28
29
|
<!-- Modal end -->
|
@@ -0,0 +1,198 @@
|
|
1
|
+
{% macro update_submission_status_form(institute, subm_obj) %}
|
2
|
+
<form id="updateStatus_{{subm_obj._id}}" action="{{ url_for('clinvar.clinvar_update_submission', institute_id=institute._id, submission=subm_obj._id) }}" method="POST">
|
3
|
+
<nav aria-label="breadcrumb">
|
4
|
+
<ol class="breadcrumb align-items-center">
|
5
|
+
<li class="breadcrumb-item">
|
6
|
+
<a id="download_clinvar_json" href="{{ url_for('clinvar.clinvar_download', submission=subm_obj._id) }}" class="btn btn-primary btn-xs text-white" target="_blank" rel="noopener">
|
7
|
+
Download submission json file
|
8
|
+
</a>
|
9
|
+
</li>
|
10
|
+
{% if subm_obj.status=='open'%}
|
11
|
+
<li class="breadcrumb-item"><button type="submit" name="update_submission" value="closed" class="btn btn-warning btn-xs">Close submission</button></li>
|
12
|
+
{% else %}
|
13
|
+
<li class="breadcrumb-item"><button type="submit" name="update_submission" value="open" class="btn btn-primary btn-xs">Re-open submission</button></li>
|
14
|
+
{% endif %}
|
15
|
+
{% if subm_obj.status != 'submitted' %}
|
16
|
+
<li class="breadcrumb-item"><button type="submit" name="update_submission" value="submitted" class="btn btn-success btn-xs">Mark as submitted</button></li>
|
17
|
+
{% endif %}
|
18
|
+
<li class="breadcrumb-item"><button type="submit" name="update_submission" value="delete" class="btn btn-danger btn-xs">Delete submission from Scout</button></li>
|
19
|
+
</ol>
|
20
|
+
</nav>
|
21
|
+
</form>
|
22
|
+
{% endmacro %}
|
23
|
+
|
24
|
+
|
25
|
+
{% macro hgvs_choices(tx_hgvs)%}
|
26
|
+
<!-- Transcripts & HGVS:(optional) -->
|
27
|
+
{{ tx_hgvs.label(class="fw-bold, text-dark") }}
|
28
|
+
|
29
|
+
<span class="text-danger" data-bs-toggle='tooltip' title="If you do not provide any HGVS expression, chromosome coordinates will be used to describe this variant instead (automatic). HGVS expressions were validated using VariantValidator"><strong>?</strong></span>
|
30
|
+
<span class="badge bg-primary float-end"><a class="text-white" href="https://variantvalidator.org/service/validate/" target="_blank" rel="noopener">VariantValidator</a></span>
|
31
|
+
<br><br>
|
32
|
+
|
33
|
+
<table style="width:100%; table-layout: auto; border-collapse: collapse;">
|
34
|
+
<caption></caption>
|
35
|
+
<tr><th></th></tr>
|
36
|
+
{% for item_row in tx_hgvs | batch(3) %}
|
37
|
+
<tr>
|
38
|
+
{% for item in item_row %}
|
39
|
+
{% set ns = namespace(label='', validated=false, mane_select=false, mane_plus_clinical=false) %}
|
40
|
+
{% if "_validated_" in item.label.text %}
|
41
|
+
{% set ns.validated = true %}
|
42
|
+
{% endif %}
|
43
|
+
{% if "_mane-select_" in item.label.text %}
|
44
|
+
{% set ns.mane_select = true %}
|
45
|
+
{% endif %}
|
46
|
+
{% if "_mane-plus-clinical_" in item.label.text %}
|
47
|
+
{% set ns.mane_plus_clinical = true %}
|
48
|
+
{% endif %}
|
49
|
+
|
50
|
+
{% set ns.label = item.label.text | replace("_validated_", "") | replace("_mane-select_", "") %}
|
51
|
+
|
52
|
+
<td style="width: 3%; text-align: right; vertical-align: baseline;">
|
53
|
+
<input type="radio" name="tx_hgvs" value="{{ ns.label }}"
|
54
|
+
{% if ns.mane_select %}checked{% endif %}>
|
55
|
+
</td>
|
56
|
+
|
57
|
+
<td style="width: 30%; text-align: left; ">
|
58
|
+
<p class="text-dark"
|
59
|
+
{% if ns.label|length > 50 %}
|
60
|
+
data-bs-toggle="tooltip" title="{{ns.label}}">{{ ns.label|truncate(25,true,'..') }}
|
61
|
+
{% else %}
|
62
|
+
>{{ ns.label }}
|
63
|
+
{% endif %}
|
64
|
+
{% if ns.mane_select %}
|
65
|
+
<span class='badge bg-dark'>MANE SELECT</span>
|
66
|
+
{% endif %}
|
67
|
+
{% if ns.mane_plus_clinical %}
|
68
|
+
<span class='badge bg-dark'>MANE PLUS CLINICAL</span>
|
69
|
+
{% endif %}
|
70
|
+
{% if ns.validated %}
|
71
|
+
<em class="fa fa-check text-success" aria-hidden="true" data-bs-toggle="tooltip" title="Verified by VariantValidator"></em>
|
72
|
+
{% endif %}
|
73
|
+
</p>
|
74
|
+
</td>
|
75
|
+
{% endfor %}
|
76
|
+
</tr>
|
77
|
+
{% endfor %}
|
78
|
+
</table>
|
79
|
+
{% endmacro %}
|
80
|
+
|
81
|
+
{% macro condition_identifiers(var_form) %}
|
82
|
+
<div class="row">
|
83
|
+
<div class="col-6" id="clinvar_condition_container">
|
84
|
+
{{ var_form.condition_type.label(class="fw-bold, text-dark")}}<span class="text-danger" data-bs-toggle='tooltip' title="Required field."><strong>*</strong></span>
|
85
|
+
|
86
|
+
<select class="form-control, btn-secondary" name="condition_type" id="condition_type">
|
87
|
+
{% for dbtype, _ in var_form.condition_type.choices %}
|
88
|
+
<option value="{{dbtype}}">{{dbtype}}</option>
|
89
|
+
{% endfor %}
|
90
|
+
</select>
|
91
|
+
|
92
|
+
<br><br>
|
93
|
+
{{ var_form.conditions.label(class="fw-bold, text-dark")}} <span class="text-danger" data-bs-toggle='tooltip' title="Required field. Include data from ONE DATABASE TYPE ONLY (i.e. only OMIM terms, only HPO terms etc). If multiple conditions are submitted for a variant, this indicates that the variant was interpreted for the combination of conditions in the same individual(s). i.e. this variant causes both condition A and condition B in the same individual. This scenario is most common for a new disease or syndrome that does not yet have a name and is described by several clinical features. If you want to indicate that the variant has been interpreted for more than one condition, please submit these as separate records."><strong>*?</strong></span>
|
94
|
+
<select class="select2" id="condition_tags" name="conditions" multiple="true" style="width:100%;">
|
95
|
+
{% if var_form.omim_terms.choices %}
|
96
|
+
{% for term, _ in var_form.omim_terms.choices %}
|
97
|
+
<option value="{{term}}" selected>{{term}}</option>
|
98
|
+
{% endfor %}
|
99
|
+
{% elif var_form.orpha_terms.choices %}
|
100
|
+
{% for term, _ in var_form.orpha_terms.choices %}
|
101
|
+
<option value="{{term}}" selected>{{term}}</option>
|
102
|
+
{% endfor %}
|
103
|
+
{% elif var_form.hpo_terms.choices %}
|
104
|
+
{% for term, _ in var_form.hpo_terms.choices %}
|
105
|
+
<option value="{{term}}" selected>{{term}}</option>
|
106
|
+
{% endfor %}
|
107
|
+
{% endif %}
|
108
|
+
</select>
|
109
|
+
|
110
|
+
<div class="mt-3">
|
111
|
+
{{ var_form.multiple_condition_explanation.label(class="fw-bold, text-dark")}} <span class="text-danger" data-bs-toggle='tooltip' title="Required if you provide more than one condition ID."><strong>?</strong></span>
|
112
|
+
<select name="multiple_condition_explanation" id="multiple_condition_explanation" class="form-control, btn-secondary">
|
113
|
+
<option selected value>-</option>
|
114
|
+
{% for choice, _ in var_form.multiple_condition_explanation.choices %}
|
115
|
+
<option value="{{choice}}">{{choice}}</option>
|
116
|
+
{% endfor %}
|
117
|
+
</select>
|
118
|
+
</div>
|
119
|
+
|
120
|
+
|
121
|
+
</div>
|
122
|
+
<div class="col-6">
|
123
|
+
{{ var_form.omim_terms.label(class="fw-bold, text-dark" )}}<br>
|
124
|
+
<ul class="list-group">
|
125
|
+
{% for term in var_form.omim_terms %}
|
126
|
+
<li class="list-group-item">{{ term.label }}</li>
|
127
|
+
{% else %}
|
128
|
+
<span class="text-dark">N/A</span>
|
129
|
+
{% endfor %}
|
130
|
+
</ul>
|
131
|
+
<br><br>
|
132
|
+
{{ var_form.orpha_terms.label(class="fw-bold, text-dark") }}<br>
|
133
|
+
<ul class="list-group">
|
134
|
+
{% for term in var_form.orpha_terms %}
|
135
|
+
<li class="list-group-item">{{ term.label }}</li>
|
136
|
+
{% else %}
|
137
|
+
<span class="text-dark">N/A</span>
|
138
|
+
{% endfor %}
|
139
|
+
</ul>
|
140
|
+
<br><br>
|
141
|
+
{{ var_form.hpo_terms.label(class="fw-bold, text-dark" )}}<br>
|
142
|
+
<ul class="list-group">
|
143
|
+
{% for term in var_form.hpo_terms %}
|
144
|
+
<li class="list-group-item">{{ term.label }}</li>
|
145
|
+
{% else %}
|
146
|
+
N/A
|
147
|
+
</ul>
|
148
|
+
{% endfor %}
|
149
|
+
</div>
|
150
|
+
</div>
|
151
|
+
{% endmacro %}
|
152
|
+
|
153
|
+
{% macro observations(cdata_forms, var_type) %}
|
154
|
+
<ul class="list-group">
|
155
|
+
{% for cdata in cdata_forms %}
|
156
|
+
{{ cdata.linking_id() }} {# Hidden field #}
|
157
|
+
<li class="list-group-item bg-white">
|
158
|
+
<div class="row align-items-start">
|
159
|
+
<div class="col-md-2 mb-3">
|
160
|
+
<label class="form-label fw-bold text-dark d-block">{{ cdata.include_ind.label.text }}</label>
|
161
|
+
<div class="form-check pt-1">
|
162
|
+
{{ cdata.include_ind(class="form-check-input", id="include_ind_" ~ loop.index) }}
|
163
|
+
</div>
|
164
|
+
</div>
|
165
|
+
<div class="col-md-2 mb-3">
|
166
|
+
<label class="form-label fw-bold text-dark">{{ cdata.individual_id.label.text }}</label>
|
167
|
+
{{ cdata.individual_id(class="form-control bg-white", readonly=true) }}
|
168
|
+
</div>
|
169
|
+
<div class="col-md-2 mb-3">
|
170
|
+
<label class="form-label fw-bold text-dark">{{ cdata.affected_status.label.text }}</label>
|
171
|
+
{{ cdata.affected_status(class="form-select") }}
|
172
|
+
</div>
|
173
|
+
<div class="col-md-2 mb-3">
|
174
|
+
<label class="form-label fw-bold text-dark">{{ cdata.allele_of_origin.label.text }}</label>
|
175
|
+
{{ cdata.allele_of_origin(class="form-select") }}
|
176
|
+
</div>
|
177
|
+
<div class="col-md-2 mb-3">
|
178
|
+
<label class="form-label fw-bold text-dark">{{ cdata.collection_method.label.text }}</label>
|
179
|
+
{{ cdata.collection_method(class="form-select") }}
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
{% if var_type == "cancer" %}
|
184
|
+
<div class="row align-items-start">
|
185
|
+
<div class="col-md-2 offset-md-6 mb-3">
|
186
|
+
<label class="form-label fw-bold text-dark">{{ cdata.somatic_allele_fraction.label.text }}</label>
|
187
|
+
{{ cdata.somatic_allele_fraction(class="form-control") }}
|
188
|
+
</div>
|
189
|
+
<div class="col-md-2 mb-3">
|
190
|
+
<label class="form-label fw-bold text-dark">{{ cdata.somatic_allele_in_normal.label.text }}</label>
|
191
|
+
{{ cdata.somatic_allele_in_normal(class="form-control") }}
|
192
|
+
</div>
|
193
|
+
</div>
|
194
|
+
{% endif %}
|
195
|
+
</li>
|
196
|
+
{% endfor %}
|
197
|
+
</ul>
|
198
|
+
{% endmacro %}
|
@@ -0,0 +1,187 @@
|
|
1
|
+
{% extends "bootstrap_global.html" %}
|
2
|
+
{% from "clinvar/components.html" import condition_identifiers, hgvs_choices, observations %}
|
3
|
+
|
4
|
+
{% block css %}
|
5
|
+
{{ super() }}
|
6
|
+
<link rel="stylesheet" href="{{ url_for('clinvar.static', filename='form_style.css') }}"/>
|
7
|
+
<link href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" rel="stylesheet" integrity="sha512-nMNlpuaDPrqlEls3IX/Q56H36qvBASwb3ipuo3MxeWbsQB1881ox0cRv7UPTgBlriqoynt35KjEwgGUeUXIPnw==" crossorigin="anonymous" referrerpolicy="no-referrer"/>
|
8
|
+
<link href="https://cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.2.0/dist/select2-bootstrap-5-theme.min.css" rel="stylesheet" />
|
9
|
+
{% endblock %}
|
10
|
+
|
11
|
+
{% block head %}
|
12
|
+
{{ super() }}
|
13
|
+
{% endblock head %}
|
14
|
+
|
15
|
+
{% block content %}
|
16
|
+
{% if variant_data.var_obj.category in ["snv", "cancer"]%}
|
17
|
+
{% set var_category = 'snv' %}
|
18
|
+
{% else %}
|
19
|
+
{% set var_category = 'sv' %}
|
20
|
+
{% endif %}
|
21
|
+
<div class="container-fluid">
|
22
|
+
<!-- MultiStep Form -->
|
23
|
+
<div class="row d-flex justify-content-center">
|
24
|
+
<div class="col-md-10">
|
25
|
+
<form id="clinVarAdd" method="POST" action="{{ url_for('clinvar.clinvar_onc_save', institute_id=institute._id, case_name=case.display_name) }}" id="{{variant_data.var_id}}_form">
|
26
|
+
<!-- progressbar -->
|
27
|
+
<ul id="progressbar" class="steps-5">
|
28
|
+
<li class="active">Start</li>
|
29
|
+
<li>Oncogenicity classification</li>
|
30
|
+
<li>Observation Data</li>
|
31
|
+
<li>Variant Details</li>
|
32
|
+
<li>Associated conditions</li>
|
33
|
+
|
34
|
+
</ul>
|
35
|
+
|
36
|
+
<!-- hidden fields -->
|
37
|
+
{{ variant_data.var_form.csrf_token }}
|
38
|
+
|
39
|
+
<!-- fieldsets -->
|
40
|
+
<fieldset data-step="1">
|
41
|
+
<legend class="text-dark">ClinVar oncogenic submission form</legend>
|
42
|
+
<br><br>
|
43
|
+
<p class="text-dark">
|
44
|
+
Use this form to add a variant to an oncogenicity submission object. The submission will be formatted as a JSON document, ready to be sent to ClinVar via their API.<br>
|
45
|
+
</p>
|
46
|
+
<a href="{{url_for('cases.case',institute_id=institute._id, case_name=case.display_name)}}" class="previous action-button-previous" style="text-decoration: none;">Back to Case</a>
|
47
|
+
<input type="button" name="next" class="next action-button" value="Start"/>
|
48
|
+
</fieldset>
|
49
|
+
|
50
|
+
<fieldset data-step="2">
|
51
|
+
<legend class="text-dark">Oncogenicity classification</legend>
|
52
|
+
<br><br>
|
53
|
+
<div class="mb-3">
|
54
|
+
{{ variant_data.var_form.onc_classification.label }}
|
55
|
+
{{ variant_data.var_form.onc_classification }}
|
56
|
+
</div>
|
57
|
+
<br><br>
|
58
|
+
<div class="mb-3 col-md-2 offset-md-5">
|
59
|
+
{{ variant_data.var_form.last_evaluated.label }}
|
60
|
+
{{ variant_data.var_form.last_evaluated }}
|
61
|
+
</div>
|
62
|
+
|
63
|
+
<div class="mb-3 col-md-6 offset-md-3">
|
64
|
+
{{ variant_data.var_form.clinsig_comment.label }} <span data-bs-toggle='tooltip' title="Optional, but highly encouraged. Free text describing the rationale for the classification."><strong>*</strong></span>
|
65
|
+
{{ variant_data.var_form.clinsig_comment(rows=4, class="form-control") }}
|
66
|
+
</div>
|
67
|
+
<br><br>
|
68
|
+
<div class="mb-3">
|
69
|
+
{{ variant_data.var_form.assertion_method_cit_db.label }}
|
70
|
+
{{ variant_data.var_form.assertion_method_cit_db }}
|
71
|
+
<span class="text-danger" data-bs-toggle='tooltip' title="This citation is specific to this variant only. Leave blanc if unsure. Note the whole submission, containing one or more variants, will be already containing the following citation reference: 'Horak P. et al. Standards for the classification of pathogenicity of somatic variants in cancer (oncogenicity): Joint recommendations of Clinical Genome Resource (ClinGen), Cancer Genomics Consortium (CGC), and Variant Interpretation for Cancer Consortium (VICC). Genet Med. 2022 (PubMed:36063163)'."><strong>?</strong></span>
|
72
|
+
<span data-bs-toggle='tooltip' title="Optional field"><strong>*</strong></span>
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<div class="mb-3 col-md-6 offset-md-3">
|
76
|
+
{{ variant_data.var_form.assertion_method_cit_id.label(
|
77
|
+
id="citation_tooltip",
|
78
|
+
**{'data-bs-toggle': 'tooltip', 'title': 'Original tooltip text'}
|
79
|
+
) }}
|
80
|
+
{{ variant_data.var_form.assertion_method_cit_id }}
|
81
|
+
</div>
|
82
|
+
|
83
|
+
<input type="button" name="previous" class="previous action-button-previous" value="Previous"/>
|
84
|
+
<input type="button" name="next" class="next action-button" value="Next"/>
|
85
|
+
</fieldset>
|
86
|
+
|
87
|
+
<fieldset data-step="5">
|
88
|
+
<legend class="text-dark">Variant Details</legend>
|
89
|
+
|
90
|
+
{{variant_data.var_form.gene_symbol.label(class="fw-bold, text-dark")}} <span class="text-danger" data-bs-toggle='tooltip' title="Gene symbol should be provided only to indicate the gene-disease relationship supporting the variant interpretation. Gene symbol is not expected for SVs, except to make a statement that a specific gene within the variant has a relationship to the interpreted condition."><strong>?</strong></span>
|
91
|
+
{{variant_data.var_form.gene_symbol(class="bg-white")}}
|
92
|
+
|
93
|
+
<!-- Cancer SNVs only. Collect coordinates if user doesn't provide any HGVS choice-->
|
94
|
+
{% if variant_data.var_obj.category == 'cancer' %}
|
95
|
+
{{ variant_data.var_form.chromosome() }}
|
96
|
+
{{ variant_data.var_form.start() }}
|
97
|
+
{{ variant_data.var_form.stop() }}
|
98
|
+
{{ variant_data.var_form.alt() }}
|
99
|
+
{{ variant_data.var_form.assembly() }}
|
100
|
+
{% endif %}
|
101
|
+
|
102
|
+
{{ hgvs_choices(variant_data.var_form.tx_hgvs) }}
|
103
|
+
|
104
|
+
<br><br>
|
105
|
+
<!-- Cancer SNV - end -->
|
106
|
+
|
107
|
+
<input type="button" name="previous" class="previous action-button-previous" value="Previous"/>
|
108
|
+
<input type="button" name="next" class="next action-button" value="Next"/>
|
109
|
+
</fieldset>
|
110
|
+
|
111
|
+
|
112
|
+
<fieldset data-step="4">
|
113
|
+
<legend class="text-dark">Associated Conditions</legend>
|
114
|
+
<h3 class="fs-subtitle">The condition must be provided as a database identifier. Assigning a condition name if the database identifier can't be found is not yet supported.</h3>
|
115
|
+
|
116
|
+
{{ condition_identifiers(variant_data.var_form) }}
|
117
|
+
|
118
|
+
<br>
|
119
|
+
<input type="button" name="previous" class="previous action-button-previous" value="Previous"/>
|
120
|
+
<input type="button" name="next" class="next action-button" value="Next"/>
|
121
|
+
</fieldset>
|
122
|
+
|
123
|
+
|
124
|
+
<fieldset data-step="5">
|
125
|
+
<legend class="text-dark">Observation Data</legend>
|
126
|
+
|
127
|
+
{{ observations(variant_data.cdata_forms, variant_data.var_obj.category) }}
|
128
|
+
|
129
|
+
<input type="button" name="previous" class="previous action-button-previous" value="Previous"/>
|
130
|
+
<input type="submit" name="submit" class="submit action-button" value="Add to submission"/>
|
131
|
+
</fieldset>
|
132
|
+
|
133
|
+
</form>
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
<!-- /.MultiStep Form -->
|
137
|
+
</div>
|
138
|
+
{% endblock %}
|
139
|
+
|
140
|
+
{% block scripts %}
|
141
|
+
{{ super() }}
|
142
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js" integrity="sha512-0QbL0ph8Tc8g5bLhfVzSqxe9GERORsKhIn1IrpxDAgUsbBGz/V7iSav2zzW325XGd1OMLdL4UiqRJj702IeqnQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
143
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.14.0-beta3/js/bootstrap-select.min.js" integrity="sha512-yrOmjPdp8qH8hgLfWpSFhC/+R9Cj9USL8uJxYIveJZGAiedxyIxwNw4RsLDlcjNlIRR4kkHaDHSmNHAkxFTmgg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
144
|
+
<script src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js" integrity="sha512-2ImtlRlf2VVmiGZsjm9bEyhjGW4dU7B6TNwh/hx/iSByxNENtj3WVE6o/9Lj4TJeVXPi4bnOIMXFIJJAeufa0A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
145
|
+
{% include "clinvar/scripts.html" %}
|
146
|
+
<script>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
document.querySelector('form').addEventListener('keydown', function(e) {
|
151
|
+
if (e.key === 'Enter' && e.target.tagName !== 'TEXTAREA') {
|
152
|
+
e.preventDefault();
|
153
|
+
}
|
154
|
+
});
|
155
|
+
|
156
|
+
//Function definition for keeping the tooltip updated for each citation database option
|
157
|
+
function updateTooltip(){
|
158
|
+
let selectedDBId = $("#assertion_method_cit_db option:selected").text();
|
159
|
+
switch (selectedDBId) {
|
160
|
+
case "PubMed":
|
161
|
+
tooltipText = "PubMed ID (PMID) is written as digits only, e.g. 21084639"
|
162
|
+
break
|
163
|
+
case "DOI":
|
164
|
+
tooltipText = "DOI ID is written including prefix, forward slash, and suffix, e.g. 10.1038/gim.2015.30"
|
165
|
+
break
|
166
|
+
case "BookShelf":
|
167
|
+
tooltipText = "Bookshelf ID including the prefix, e.g. NBK1384"
|
168
|
+
break
|
169
|
+
case "pmc":
|
170
|
+
tooltipText = "PubMedCentral ID (pmc) is written as digits only, e.g. 4544753"
|
171
|
+
break
|
172
|
+
default:
|
173
|
+
return
|
174
|
+
}
|
175
|
+
const $el = $("#citation_tooltip");
|
176
|
+
$el.attr("data-bs-original-title", tooltipText).tooltip("dispose").tooltip("show");
|
177
|
+
}
|
178
|
+
|
179
|
+
//Add eventhandler for change of the DB id, keeping the tooltip updated
|
180
|
+
$(function () {
|
181
|
+
$("#assertion_method_cit_db").change(function () {
|
182
|
+
updateTooltip()
|
183
|
+
})
|
184
|
+
});
|
185
|
+
|
186
|
+
</script>
|
187
|
+
{% endblock %}
|