description-extractor.html 9.97 KB
Newer Older
Vermaat's avatar
Vermaat committed
1
2
3
4
5
6
7
{% extends "base.html" %}

{% set active_page = "description-extractor" %}
{% set page_title = "Variant Description Extractor" %}

{% block content %}

8
9
10
11
<p class="alert alert-warning">
Please note that this is an experimental service and we are currently limiting
input sequences to 1000bp.
</p>
Vermaat's avatar
Vermaat committed
12
13

<p>
Vermaat's avatar
Vermaat committed
14
15
16
Extract the HGVS variant description from a reference sequence and an observed
sequence. For now, we require the user to fill in two sequences. After the
testing phase, we plan to use the underlying algorithm for:
Vermaat's avatar
Vermaat committed
17
18
19
20
</p>

<ul>
  <li>
Jeroen Laros's avatar
Jeroen Laros committed
21
    Disambiguation in the name checker. This will enable full support for complex variants.
Vermaat's avatar
Vermaat committed
22
23
  </li>
  <li>
Jeroen Laros's avatar
Jeroen Laros committed
24
    Comparison of two reference sequences. Useful for migrating a variant description to an other reference sequence.
Vermaat's avatar
Vermaat committed
25
26
27
28
29
30
  </li>
  <li>
    Implementation of a Reference Sequence Editor.
  </li>
</ul>

31
32
33
34
35
36
37
<p>
The algorithm is implemented in
the <a href="https://github.com/mutalyzer/description-extractor">HGVS variant
description extractor</a>. To apply it on longer input sequences than accepted
on this page, you can download that package and run it locally.
</p>

Jeroen Laros's avatar
Jeroen Laros committed
38
<p>
Vermaat's avatar
Vermaat committed
39
Please supply a reference sequence and an observed sequence.
Jeroen Laros's avatar
Jeroen Laros committed
40
41
</p>

42
43
44
45
46
47
48
49
<form enctype="multipart/form-data" action="{{ url_for('.description_extractor') }}" method="post" class="form" id="invoer">
  <div class="row">
    <h4>Reference input</h4>
    <div class="col-md-6">
      <div class="form-group" id="input-methods">
        <div class="radio">
          <label>
            <input type="radio" name="reference_method" value="raw_method" class="input-select" data-context="select-form1" data-for="reference_raw_method" {{ 'checked' if reference_method == 'raw_method' or not reference_method }}>
50
            Enter a sequence (FASTA, FASTQ, or plain text).
51
52
53
54
55
          </label>
        </div>
        <div class="radio">
          <label>
            <input type="radio" name="reference_method" value="file_method" class="input-select" data-context="select-form1" data-for="reference_file_method" {{ 'checked' if reference_method == 'file_method' }}>
56
            Upload a file (FASTA, FASTQ, or plain text).
57
58
59
60
61
          </label>
        </div>
        <div class="radio">
          <label>
            <input type="radio" name="reference_method" value="refseq_method" class="input-select" data-context="select-form1" data-for="reference_refseq_method" {{ 'checked' if reference_method == 'refseq_method' }}>
62
            Enter a RefSeq accession number.
63
64
65
66
67
68
69
70
71
72
          </label>
        </div>
      </div>
    </div>

    <div id="select-form1">
      <div class="col-md-6">
        <div class="subform" id="reference_raw_method" style="display: {{ '' if reference_method == 'raw_method' or not reference_method else 'none' }}">
          <div class="form-group">
            <label for="reference_sequence">Reference sequence</label>
Vermaat's avatar
Vermaat committed
73
            <textarea  name="reference_sequence" id="reference_sequence" class="form-control form-pre" placeholder="Reference sequence">{{ reference_sequence }}</textarea>
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
            <p>Example: <code class="example-input" data-for="reference_sequence">ATGATGATCAGATACAGTGTGATACAGGTAGTTAGACAA</code></p>
          </div>
        </div>
      </div>
      <div class="col-md-6">
        <div class="subform" id="reference_file_method" style="display: {{ 'none' if reference_method != 'file_method' }}">
          <div class="form-group">
            <label for="reference_file">Reference file</label>
            <input type="file" name="reference_file" id="reference_file">
          </div>
        </div>
      </div>
      <div class="col-md-6">
        <div class="subform" id="reference_refseq_method" style="display: {{ 'none' if reference_method != 'refseq_method' }}">
          <div class="form-group">
            <label for="reference_accession_number">Reference accession number</label>
Vermaat's avatar
Vermaat committed
90
            <input type="text" name="reference_accession_number" id="reference_accession_number" value="{{ reference_accession_number }}" class="form-control form-pre" placeholder="Reference accession number">
91
            <p>Example: <code class="example-input" data-for="reference_accession_number">NM_198697.1</code></p>
92
93
94
95
          </div>
        </div>
      </div>
    </div>
Vermaat's avatar
Vermaat committed
96
  </div>
97
98
99
100
101
102
103
104

  <div class="row">
    <h4>Sample input</h4>
    <div class="col-md-6">
      <div class="form-group" id="input-methods">
        <div class="radio">
          <label>
            <input type="radio" name="sample_method" value="raw_method" class="input-select" data-context="select-form2" data-for="sample_raw_method" {{ 'checked' if sample_method == 'raw_method' or not sample_method }}>
105
            Enter a sequence (FASTA, FASTQ, or plain text).
106
107
108
109
110
          </label>
        </div>
        <div class="radio">
          <label>
            <input type="radio" name="sample_method" value="file_method" class="input-select" data-context="select-form2" data-for="sample_file_method" {{ 'checked' if sample_method == 'file_method' }}>
111
            Upload a file (FASTA, FASTQ, or plain text).
112
113
114
115
116
          </label>
        </div>
        <div class="radio">
          <label>
            <input type="radio" name="sample_method" value="refseq_method" class="input-select" data-context="select-form2" data-for="sample_refseq_method" {{ 'checked' if sample_method == 'refseq_method' }}>
117
            Enter a RefSeq accession number.
118
119
120
121
122
123
124
125
126
127
          </label>
        </div>
      </div>
    </div>

    <div id="select-form2">
      <div class="col-md-6">
        <div class="subform" id="sample_raw_method" style="display: {{ '' if sample_method == 'raw_method' or not sample_method else 'none' }}">
          <div class="form-group">
            <label for="sample_sequence">Sample sequence</label>
Vermaat's avatar
Vermaat committed
128
            <textarea name="sample_sequence" id="sample_sequence" class="form-control form-pre" placeholder="Sample sequence">{{ sample_sequence }}</textarea>
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
            <p>Example: <code class="example-input" data-for="sample_sequence">ATGATTTGATCAGATACATGTGATACCGGTAGTTAGGACAA</code></p>
          </div>
        </div>
      </div>
      <div class="col-md-6">
        <div class="subform" id="sample_file_method" style="display: {{ 'none' if sample_method != 'file_method' }}">
          <div class="form-group">
            <label for="sample_file">Reference file</label>
            <input type="file" name="sample_file" id="sample_file">
          </div>
        </div>
      </div>
      <div class="col-md-6">
        <div class="subform" id="sample_refseq_method" style="display: {{ 'none' if sample_method != 'refseq_method' }}">
          <div class="form-group">
            <label for="sample_accession_number">Sample accession number</label>
Vermaat's avatar
Vermaat committed
145
            <input type="text" name="sample_accession_number" id="sample_accession_number" value="{{ sample_accession_number }}" class="form-control form-pre" placeholder="Sample accession number">
146
            <p>Example: <code class="example-input" data-for="sample_accession_number">NM_198697.2</code></p>
147
148
149
150
          </div>
        </div>
      </div>
    </div>
Vermaat's avatar
Vermaat committed
151
152
  </div>
  <div class="form-group">
153
    <input type="submit" class="btn btn-primary" value="Extract variant description">
Vermaat's avatar
Vermaat committed
154
155
156
    <a href="https://humgenprojects.lumc.nl/trac/mutalyzer/wiki/DescriptionExtractor" target="new" class="btn btn-default pull-right">Help</a>
  </div>
</form>
Vermaat's avatar
Vermaat committed
157

158
{% if reference_method and sample_method %}
Vermaat's avatar
Vermaat committed
159
160
161
162
163
  <hr>
  {% for m in messages %}
    {% if m.class == "error" %}
      <p class="alert alert-danger" title="{{ m.level }} (origin: {{ m.origin }})">{{ m.description }}</p>
    {% elif m.class == "warning" %}
164
165
166
167
168
      <p class="alert alert-warning" title="{{ m.level }} (origin: {{ m.origin }})">{{ m.description }}</p>
    {% elif m.class == "information" %}
      <p class="alert alert-info" title="{{ m.level }} (origin: {{ m.origin }})">{{ m.description }}</p>
    {% elif m.class == "debug" %}
      <p class="alert alert-info" title="{{ m.level }} (origin: {{ m.origin }})">{{ m.description }}</p>
Vermaat's avatar
Vermaat committed
169
170
    {% endif %}
  {% endfor %}
Jeroen Laros's avatar
Jeroen Laros committed
171

Vermaat's avatar
Vermaat committed
172
173
174
175
176
  {% if summary == "0 Errors, 0 Warnings." %}
    <p class="alert alert-success summary">{{ summary }}</p>
  {% else %}
    <p>{{summary}}</p>
  {% endif %}
Vermaat's avatar
Vermaat committed
177
178

  {% if not errors %}
Vermaat's avatar
Vermaat committed
179
180
    <hr>

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
    <h4>Input</h4>
    <table class="table">
      <thead>
        <tr>
          <th>Field</th>
          <th>Value</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Reference input</td>
          <td>
            {% if reference_method == 'raw_method' %}
              <code>{{ reference_sequence|short(40) }}</code>
            {% elif reference_method == 'file_method' %}
              File upload
            {% elif reference_method == 'refseq_method' %}
              {{ reference_accession_number }}
            {% endif %}
          </td>
        </tr>
        <tr>
          <td>Sample input</td>
          <td>
            {% if sample_method == 'raw_method' %}
              <code>{{ sample_sequence|short(40) }}</code>
            {% elif sample_method == 'file_method' %}
              File upload
            {% elif sample_method == 'refseq_method' %}
              {{ sample_accession_number }}
            {% endif %}
          </td>
        </tr>
      </tbody>
    </table>

    <h4>Description</h4>
    <p><pre class="description">{{ raw_vars|string }}</pre></p>
Vermaat's avatar
Vermaat committed
219
220

    <h4>Overview of the raw variants</h4>
Jeroen Laros's avatar
Jeroen Laros committed
221
    <table class="table">
Vermaat's avatar
Vermaat committed
222
223
224
225
226
227
228
229
230
      <thead>
        <tr>
          <th>Start</th>
          <th>End</th>
          <th>Type</th>
          <th>Deleted</th>
          <th>Inserted</th>
          <th>Shift</th>
          <th>Description</th>
Vermaat's avatar
Vermaat committed
231
        </tr>
Vermaat's avatar
Vermaat committed
232
233
      </thead>
      <tbody>
234
235
236
237
238
239
240
241
242
243
244
      {% for raw_var in raw_vars %}
        <tr>
          <td>{{ raw_var.start }}</td>
          <td>{{ raw_var.end }}</td>
          <td>{{ raw_var.type }}</td>
          <td><code>{{ raw_var.deleted|string|short }}</code></td>
          <td><code>{{ raw_var.inserted|string|short }}</code></td>
          <td>{{ raw_var.shift }}</td>
          <td>{% if raw_var|string|length > 20 %}Too long to show{% else %}<code>{{ raw_var|string }}</code>{% endif %}</td>
        </tr>
      {% endfor %}
Vermaat's avatar
Vermaat committed
245
      </tbody>
Vermaat's avatar
Vermaat committed
246
    </table>
Vermaat's avatar
Vermaat committed
247
248
  {% endif %}{# not errors #}
{% endif %}{# description #}
Vermaat's avatar
Vermaat committed
249
250

{% endblock content %}