scout-browser 4.81__py3-none-any.whl → 4.82.1__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/__version__.py +1 -1
- scout/adapter/mongo/disease_terms.py +5 -2
- scout/adapter/mongo/query.py +23 -11
- scout/build/managed_variant.py +12 -1
- scout/build/variant/genotype.py +2 -0
- scout/build/variant/variant.py +5 -0
- scout/constants/clinvar.py +1 -1
- scout/constants/query_terms.py +3 -1
- scout/models/variant/variant.py +1 -0
- scout/parse/variant/frequency.py +56 -54
- scout/parse/variant/genotype.py +89 -15
- scout/parse/variant/transcript.py +17 -9
- scout/parse/variant/variant.py +12 -0
- scout/server/app.py +6 -3
- scout/server/blueprints/alignviewers/templates/alignviewers/utils.html +1 -1
- scout/server/blueprints/cases/controllers.py +2 -57
- scout/server/blueprints/cases/templates/cases/case_report.html +82 -66
- scout/server/blueprints/cases/templates/cases/chanjo2_form.html +47 -0
- scout/server/blueprints/cases/templates/cases/collapsible_actionbar.html +4 -4
- scout/server/blueprints/cases/templates/cases/gene_panel.html +4 -11
- scout/server/blueprints/cases/templates/cases/utils.html +3 -1
- scout/server/blueprints/cases/views.py +0 -22
- scout/server/blueprints/clinvar/controllers.py +3 -3
- scout/server/blueprints/clinvar/templates/clinvar/clinvar_submissions.html +29 -2
- scout/server/blueprints/clinvar/templates/clinvar/multistep_add_variant.html +36 -18
- scout/server/blueprints/clinvar/views.py +13 -1
- scout/server/blueprints/diagnoses/controllers.py +2 -0
- scout/server/blueprints/institutes/controllers.py +76 -38
- scout/server/blueprints/institutes/templates/overview/cases.html +54 -42
- scout/server/blueprints/managed_variants/templates/managed_variants/managed_variants.html +1 -1
- scout/server/blueprints/managed_variants/views.py +2 -4
- scout/server/blueprints/panels/templates/panels/panel.html +8 -7
- scout/server/blueprints/panels/views.py +2 -11
- scout/server/blueprints/phenotypes/templates/phenotypes/hpo_terms.html +3 -2
- scout/server/blueprints/variant/controllers.py +3 -2
- scout/server/blueprints/variant/templates/variant/components.html +1 -1
- scout/server/blueprints/variant/templates/variant/utils.html +3 -1
- scout/server/blueprints/variant/templates/variant/variant.html +20 -15
- scout/server/blueprints/variant/templates/variant/variant_details.html +78 -26
- scout/server/blueprints/variant/utils.py +9 -13
- scout/server/blueprints/variants/controllers.py +32 -3
- scout/server/blueprints/variants/forms.py +15 -1
- scout/server/blueprints/variants/templates/variants/components.html +55 -0
- scout/server/blueprints/variants/templates/variants/fusion-variants.html +3 -50
- scout/server/blueprints/variants/templates/variants/str-variants.html +8 -5
- scout/server/blueprints/variants/templates/variants/utils.html +57 -31
- scout/server/blueprints/variants/templates/variants/variants.html +1 -1
- scout/server/blueprints/variants/utils.py +7 -10
- scout/server/extensions/clinvar_extension.py +10 -2
- {scout_browser-4.81.dist-info → scout_browser-4.82.1.dist-info}/METADATA +6 -5
- {scout_browser-4.81.dist-info → scout_browser-4.82.1.dist-info}/RECORD +55 -54
- {scout_browser-4.81.dist-info → scout_browser-4.82.1.dist-info}/LICENSE +0 -0
- {scout_browser-4.81.dist-info → scout_browser-4.82.1.dist-info}/WHEEL +0 -0
- {scout_browser-4.81.dist-info → scout_browser-4.82.1.dist-info}/entry_points.txt +0 -0
- {scout_browser-4.81.dist-info → scout_browser-4.82.1.dist-info}/top_level.txt +0 -0
@@ -5,7 +5,7 @@
|
|
5
5
|
{% from "variant/utils.html" import causative_button, genes_panel, modal_causative, overlapping_panel, pin_button, proteins_panel, transcripts_panel, custom_annotations %}
|
6
6
|
{% from "variant/tx_overview.html" import disease_associated, transcripts_overview %}
|
7
7
|
{% from "variant/gene_disease_relations.html" import autozygosity_panel, genemodels_panel, inheritance_panel, orpha_omim_phenotypes %}
|
8
|
-
{% from "variant/variant_details.html" import frequencies, gtcall_panel,
|
8
|
+
{% from "variant/variant_details.html" import conservations, frequencies, gtcall_panel, mappability, observations_panel, old_observations, severity_list, str_db_card %}
|
9
9
|
{% from "variant/components.html" import alignments, clinsig_table, compounds_panel, external_links, external_scripts, external_stylesheets, matching_variants, panel_classify, variant_scripts %}
|
10
10
|
{% from "variant/sanger.html" import modal_cancel_sanger, modal_sanger, sanger_button %}
|
11
11
|
{% from "variant/rank_score_results.html" import rankscore_panel %}
|
@@ -90,11 +90,15 @@
|
|
90
90
|
{{ panel_summary() }}
|
91
91
|
</div>
|
92
92
|
<div class="col-lg-4">
|
93
|
-
{
|
94
|
-
|
95
|
-
|
93
|
+
{% if str %}
|
94
|
+
{{ str_db_card(variant) }}
|
95
|
+
{% else %}
|
96
|
+
{{ frequencies(variant) }}
|
97
|
+
{% if config['LOQUSDB_SETTINGS'] %}
|
98
|
+
{{ observations_panel(variant, observations, case) }}
|
99
|
+
{% endif %}
|
100
|
+
{{ old_observations(variant) }}
|
96
101
|
{% endif %}
|
97
|
-
{{ old_observations(variant) }}
|
98
102
|
</div>
|
99
103
|
</div>
|
100
104
|
<div class="row">
|
@@ -227,8 +231,8 @@
|
|
227
231
|
<tr>
|
228
232
|
<td>
|
229
233
|
Position:
|
230
|
-
|
231
|
-
|
234
|
+
<strong>{{ variant.chromosome }}:<span class="text-muted">{{ variant.position }}</span></strong>
|
235
|
+
<button type="button" class="fa fa-copy btn-xs js-tooltip js-copy" style="background-color: Transparent;outline:none; border: none;" data-bs-toggle="tooltip" data-bs-placement="bottom" data-copy="{{ variant.chromosome }}:{{ variant.position }}" title="Copy to clipboard">
|
232
236
|
</button>
|
233
237
|
</td>
|
234
238
|
<td {% if not mei %}colspan="3"{% endif %}>
|
@@ -282,13 +286,12 @@
|
|
282
286
|
</strong></span>
|
283
287
|
</td>
|
284
288
|
</tr>
|
285
|
-
|
286
289
|
</tbody>
|
287
290
|
</table>
|
288
291
|
<table class="table table-bordered table-fixed table-sm">
|
289
292
|
<tbody class="border-top">
|
290
293
|
<tr>
|
291
|
-
<td>
|
294
|
+
<td {% if str %}colspan="2"{% endif %}>
|
292
295
|
Matches OMIM inhert.
|
293
296
|
{% if variant.is_matching_inheritance %}
|
294
297
|
<span class="badge bg-success float-end">Yes</span>
|
@@ -296,12 +299,14 @@
|
|
296
299
|
<div class="badge bg-warning float-end">No</div>
|
297
300
|
{% endif %}
|
298
301
|
</td>
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
{{ variant.frequency }}
|
303
|
-
|
304
|
-
|
302
|
+
{% if not str %}
|
303
|
+
<td>
|
304
|
+
Frequency
|
305
|
+
<div class="badge bg-{% if variant.frequency == 'common' %}danger{% elif variant.frequency == 'uncommon' %}warning{% else %}success{% endif %} float-end">
|
306
|
+
{{ variant.frequency }}
|
307
|
+
</div>
|
308
|
+
</td>
|
309
|
+
{% endif %}
|
305
310
|
</tr>
|
306
311
|
</tbody>
|
307
312
|
</table>
|
@@ -105,37 +105,89 @@
|
|
105
105
|
</div>
|
106
106
|
{% endmacro %}
|
107
107
|
|
108
|
-
{% macro
|
108
|
+
{% macro str_db_card(variant) %}
|
109
109
|
<div class="card panel-default">
|
110
|
-
<div class="panel-heading">
|
110
|
+
<div class="panel-heading">STR locus details</div>
|
111
111
|
<div class="card-body">
|
112
|
-
<table class="table">
|
112
|
+
<table class="table" aria-label="STR locus details">
|
113
113
|
<thead class="thead table-light">
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
114
|
+
<tr>
|
115
|
+
<th scope="col">Source</th>
|
116
|
+
<th scope="col">Value</th>
|
117
|
+
</tr>
|
118
|
+
</thead>
|
119
|
+
<tbody>
|
120
|
+
<tr><td>Normal max</td><td>{{ variant.str_normal_max }}</td></tr>
|
121
|
+
<tr><td>Pathologic min</td><td>{{ variant.str_pathologic_min }}</td><tr>
|
122
|
+
{% if variant.str_status == 'full_mutation' %}
|
123
|
+
<tr class="bg-danger">
|
124
|
+
{% elif variant.str_status == 'pre_mutation' %}
|
125
|
+
<tr class="bg-warning">
|
126
|
+
{% else %}
|
127
|
+
<tr>
|
128
|
+
{% endif %}
|
129
|
+
<td>Motif copies</td><td>{{ variant.str_mc }} <span class="badge bg-secondary text-white">{{ variant.str_status }}</span></td>
|
130
|
+
</tr>
|
131
|
+
<tr><td colspan=2> </td></tr>
|
132
|
+
{% if variant.str_swegen_mean %}
|
133
|
+
<tr><td>SweGen Z-score</td><td>
|
134
|
+
{% if variant.str_mc %}
|
135
|
+
{{ ((variant.str_mc - variant.str_swegen_mean ) / variant.str_swegen_std) | round(2) }}
|
136
|
+
{% endif %}
|
137
|
+
</td></tr>
|
138
|
+
<tr><td>SweGen mean</td><td>{{variant.str_swegen_mean|round(2)}}</td></tr>
|
139
|
+
<tr><td>SweGen std</td><td>{{variant.str_swegen_std|round(2)}}</td></tr>
|
140
|
+
<tr><td colspan=2> </td></tr>
|
141
|
+
{% endif %}
|
142
|
+
{% for gene in variant.genes %}
|
143
|
+
{% if gene.stripy_link %}
|
144
|
+
<tr><td>
|
145
|
+
<a href="{{ gene.str_gnomad_link }}" target="_blank" rel="noopener" referrerpolicy="no-referrer">gnomAD</a>
|
146
|
+
</td><td>{{ gene.hgnc_symbol }}</td></tr>
|
127
147
|
{% endif %}
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
{% else %}
|
133
|
-
-
|
148
|
+
{% if gene.stripy_link %}
|
149
|
+
<tr><td>
|
150
|
+
<a href="{{ gene.stripy_link }}" target="_blank" rel="noopener" referrerpolicy="no-referrer">STRipy</a>
|
151
|
+
</td><td>{{ gene.hgnc_symbol }}</td></tr>
|
134
152
|
{% endif %}
|
135
|
-
|
136
|
-
</
|
137
|
-
|
138
|
-
|
153
|
+
{% endfor %}
|
154
|
+
</tbody>
|
155
|
+
</table>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
{% endmacro %}
|
159
|
+
|
160
|
+
{% macro frequencies(variant) %}
|
161
|
+
<div class="card panel-default">
|
162
|
+
<div class="panel-heading">Frequencies</div>
|
163
|
+
<div class="card-body">
|
164
|
+
<table class="table">
|
165
|
+
<thead class="thead table-light">
|
166
|
+
<tr>
|
167
|
+
<th scope="col">Source</th>
|
168
|
+
<th scope="col">Frequency</th>
|
169
|
+
</tr>
|
170
|
+
</thead>
|
171
|
+
<tbody>
|
172
|
+
{% for freq_name, value, link in variant.frequencies %}
|
173
|
+
<tr>
|
174
|
+
<td>
|
175
|
+
{% if link %}
|
176
|
+
<a href="{{ link }}" target="_blank" rel="noopener" referrerpolicy="no-referrer">{{ freq_name }}</a>
|
177
|
+
{% else %}
|
178
|
+
{{ freq_name }}
|
179
|
+
{% endif %}
|
180
|
+
</td>
|
181
|
+
<td>
|
182
|
+
{% if value %}
|
183
|
+
<span class="badge bg-secondary">{{ value|human_decimal }}</span>
|
184
|
+
{% else %}
|
185
|
+
-
|
186
|
+
{% endif %}
|
187
|
+
</td>
|
188
|
+
</tr>
|
189
|
+
{% endfor %}
|
190
|
+
</tbody>
|
139
191
|
</table>
|
140
192
|
</div>
|
141
193
|
</div>
|
@@ -175,15 +175,13 @@ def update_variant_case_panels(case_obj: dict, variant_obj: dict):
|
|
175
175
|
The case_obj should be up-to-date first. Call update_case_panels() as needed in context:
|
176
176
|
to save some resources we do not call it here for each variant.
|
177
177
|
"""
|
178
|
-
|
178
|
+
variant_obj["case_panels"] = []
|
179
179
|
variant_panel_names = variant_obj.get("panels") or []
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
if
|
184
|
-
|
185
|
-
|
186
|
-
variant_obj["case_panels"] = case_panel_objs
|
180
|
+
for latest_panel in case_obj.get("latest_panels") or []:
|
181
|
+
if latest_panel["panel_name"] not in variant_panel_names:
|
182
|
+
continue
|
183
|
+
if not set(latest_panel["hgnc_ids"]).isdisjoint(variant_obj["hgnc_ids"]):
|
184
|
+
variant_obj["case_panels"].append(latest_panel)
|
187
185
|
|
188
186
|
|
189
187
|
def get_extra_info(gene_panels: list) -> Dict[int, dict]:
|
@@ -660,17 +658,15 @@ def callers(variant_obj):
|
|
660
658
|
return list(calls)
|
661
659
|
|
662
660
|
|
663
|
-
def associate_variant_genes_with_case_panels(
|
661
|
+
def associate_variant_genes_with_case_panels(case_obj: Dict, variant_obj: Dict) -> None:
|
664
662
|
"""Add associated gene panels to each gene in variant object"""
|
665
663
|
|
666
664
|
genes = variant_obj.get("genes", [])
|
667
|
-
gene_panels = variant_obj.get("case_panels", [])
|
668
665
|
|
669
666
|
for gene in genes:
|
670
667
|
hgnc_id = gene["hgnc_id"]
|
671
668
|
matching_panels = []
|
672
|
-
for panel in
|
673
|
-
|
674
|
-
if hgnc_id in genes_on_panel:
|
669
|
+
for panel in case_obj.get("latest_panels", []):
|
670
|
+
if hgnc_id in panel["hgnc_ids"]:
|
675
671
|
matching_panels.append(panel["panel_name"])
|
676
672
|
gene["associated_gene_panels"] = matching_panels
|
@@ -51,6 +51,8 @@ from scout.server.utils import (
|
|
51
51
|
from .forms import FILTERSFORMCLASS, CancerSvFiltersForm, FusionFiltersForm, SvFiltersForm
|
52
52
|
from .utils import update_case_panels
|
53
53
|
|
54
|
+
NUM = re.compile(r"\d+")
|
55
|
+
|
54
56
|
LOG = logging.getLogger(__name__)
|
55
57
|
|
56
58
|
|
@@ -938,6 +940,10 @@ def parse_variant(
|
|
938
940
|
if not "end_chrom" in variant_obj:
|
939
941
|
variant_obj["end_chrom"] = variant_obj["chromosome"]
|
940
942
|
|
943
|
+
# common motif count for STR variants
|
944
|
+
|
945
|
+
variant_obj["str_mc"] = get_str_mc(variant_obj)
|
946
|
+
|
941
947
|
# variant level links shown on variants page
|
942
948
|
variant_obj["cosmic_links"] = cosmic_links(variant_obj)
|
943
949
|
variant_obj["str_source_link"] = str_source_link(variant_obj)
|
@@ -959,6 +965,31 @@ def parse_variant(
|
|
959
965
|
return variant_obj
|
960
966
|
|
961
967
|
|
968
|
+
def get_str_mc(variant_obj: dict) -> Optional[int]:
|
969
|
+
"""Return variant Short Tandem Repeat motif count, either as given by its ALT MC value
|
970
|
+
from the variant FORMAT field, or as a number given in the ALT on the form
|
971
|
+
'<STR123>'.
|
972
|
+
"""
|
973
|
+
|
974
|
+
alt_mc = None
|
975
|
+
if variant_obj["alternative"] == ".":
|
976
|
+
return alt_mc
|
977
|
+
|
978
|
+
for sample in variant_obj["samples"]:
|
979
|
+
if sample["genotype_call"] in ["./.", ".|", "0/0", "0|0"]:
|
980
|
+
continue
|
981
|
+
alt_mc = sample.get("alt_mc")
|
982
|
+
if alt_mc:
|
983
|
+
return alt_mc
|
984
|
+
|
985
|
+
alt_num = NUM.match(variant_obj["alternative"])
|
986
|
+
if alt_num:
|
987
|
+
alt_mc = int(alt_num)
|
988
|
+
return alt_mc
|
989
|
+
|
990
|
+
return None
|
991
|
+
|
992
|
+
|
962
993
|
def download_str_variants(case_obj, variant_objs):
|
963
994
|
"""Download filtered STR variants for a case to a CSV file
|
964
995
|
|
@@ -995,9 +1026,7 @@ def download_str_variants(case_obj, variant_objs):
|
|
995
1026
|
variant_line.append(
|
996
1027
|
variant.get("str_display_ru", variant.get("str_ru", ""))
|
997
1028
|
) # Reference repeat unit
|
998
|
-
variant_line.append(
|
999
|
-
variant.get("alternative", "").replace("STR", "").replace("<", "").replace(">", "")
|
1000
|
-
) # Estimated size
|
1029
|
+
variant_line.append(get_str_mc(variant) or ".") # Estimated size
|
1001
1030
|
variant_line.append(str(variant.get("str_ref", ""))) # Reference size
|
1002
1031
|
variant_line.append(str(variant.get("str_status", ""))) # Status
|
1003
1032
|
gt_cell = ""
|
@@ -95,6 +95,7 @@ class VariantFiltersForm(FlaskForm):
|
|
95
95
|
variant_type = HiddenField(default="clinical")
|
96
96
|
|
97
97
|
gene_panels = NonValidatingSelectMultipleField(choices=[])
|
98
|
+
gene_panels_exclude = BooleanField("Exclude genes")
|
98
99
|
hgnc_symbols = TagListField("HGNC Symbols/Ids (case sensitive)")
|
99
100
|
|
100
101
|
region_annotations = SelectMultipleField(choices=REGION_ANNOTATIONS)
|
@@ -111,7 +112,7 @@ class VariantFiltersForm(FlaskForm):
|
|
111
112
|
clinsig = NonValidatingSelectMultipleField("ClinVar CLINSIG", choices=CLINSIG_OPTIONS)
|
112
113
|
|
113
114
|
gnomad_frequency = BetterDecimalField("gnomadAF", validators=[validators.Optional()])
|
114
|
-
|
115
|
+
local_obs_old = IntegerField("Local obs. (archive)", validators=[validators.Optional()])
|
115
116
|
|
116
117
|
filters = NonValidatingSelectField(choices=[], validators=[validators.Optional()])
|
117
118
|
filter_display_name = StringField(default="")
|
@@ -165,6 +166,12 @@ class CancerFiltersForm(VariantFiltersForm):
|
|
165
166
|
clinvar_tag = BooleanField("ClinVar hits")
|
166
167
|
cosmic_tag = BooleanField("Cosmic hits")
|
167
168
|
mvl_tag = BooleanField("Managed Variants hits")
|
169
|
+
local_obs_cancer_somatic_old = IntegerField(
|
170
|
+
"Local somatic obs. (archive)", validators=[validators.Optional()]
|
171
|
+
)
|
172
|
+
local_obs_cancer_germline_old = IntegerField(
|
173
|
+
"Local germline obs. (archive)", validators=[validators.Optional()]
|
174
|
+
)
|
168
175
|
|
169
176
|
# polymorphic constant base for clinical filter
|
170
177
|
clinical_filter_base = CLINICAL_FILTER_BASE_CANCER
|
@@ -196,6 +203,13 @@ class SvFiltersForm(VariantFiltersForm):
|
|
196
203
|
swegen = IntegerField("SweGen obs")
|
197
204
|
clinical_filter = SubmitField(label="Clinical filter")
|
198
205
|
|
206
|
+
local_obs_cancer_somatic_old = IntegerField(
|
207
|
+
"Local somatic obs. (archive)", validators=[validators.Optional()]
|
208
|
+
)
|
209
|
+
local_obs_cancer_germline_old = IntegerField(
|
210
|
+
"Local germline obs. (archive)", validators=[validators.Optional()]
|
211
|
+
)
|
212
|
+
|
199
213
|
# polymorphic constant base for clinical filter
|
200
214
|
clinical_filter_base = CLINICAL_FILTER_BASE_SV
|
201
215
|
|
@@ -23,6 +23,61 @@
|
|
23
23
|
</div>
|
24
24
|
{% endmacro %}
|
25
25
|
|
26
|
+
{% macro fusion_variants_header() %}
|
27
|
+
<thead class="table-light">
|
28
|
+
<tr>
|
29
|
+
<th id="checkbox" style="width:1%"></th>
|
30
|
+
<th id="rank" style="width:3%;" title="Beta version. Currently testing" class="text-left">Rank (beta)</th>
|
31
|
+
<th id="genes" style="width:6%" title="Genes">Fusion Genes</th>
|
32
|
+
<th id="callers" style="width:4%" title="Number of callers detecting a given event">Callers</th>
|
33
|
+
<th id="observed" style="width:4%" title="Observed database matches">Observed</th>
|
34
|
+
<th id="score" style="width:4%" title="Beta version. Currently testing">Score (beta)</th>
|
35
|
+
<th id="junction_reads" style="width:6%" title="Number of paired-ends that support the event">Junction Reads</th>
|
36
|
+
<th id="split_reads" style="width:6%" title="Number of split reads that support the event">Split Reads</th>
|
37
|
+
<th id="ffpm" style="width:6%" title="Fusion fragments per million total RNA-seq fragments">FFPM</th>
|
38
|
+
<th id="frame_status" style="width:8%" title="Frame status of the fusion">Frame Status</th>
|
39
|
+
<th id="transcripts" style="width:8%" title="Transcript ID">Transcript ID</th>
|
40
|
+
<th id="exons" style="width:4%" title="Exon Number">Exon Number</th>
|
41
|
+
<th id="brealpoints" style="width:4%" title="Breakpoints">Breakpoints</th>
|
42
|
+
<th id="oriantation" style="width:4%" title="Orientation">Orientation</th>
|
43
|
+
</tr>
|
44
|
+
</thead>
|
45
|
+
{% endmacro %}
|
46
|
+
|
47
|
+
{% macro default_fusion_variant_cells(institute, case, variant) %}
|
48
|
+
<td>
|
49
|
+
{{ fusion_variant_gene_symbols_cell(variant) }}
|
50
|
+
</td>
|
51
|
+
<td class="text-center"><span data-bs-toggle="tooltip" data-bs-html="true" title="{% for name, caller in variant.callers %}{{ name }}: {{ caller }}<br>{% endfor %}">
|
52
|
+
{{ variant.tool_hits|int }}</span></td>
|
53
|
+
<td>{{variant.found_db|join(", ") if variant.found_db else "-"}}</td>
|
54
|
+
<td class="text-center">{{ variant.fusion_score|float|round(3) }}</td>
|
55
|
+
<td class="text-center">{{ variant.samples[0].read_depth }}</td>
|
56
|
+
<td class="text-center">{{ variant.samples[0].split_read }}</td>
|
57
|
+
<td class="text-center">{{ variant.samples[0].ffpm }}</td>
|
58
|
+
<td>{{ variant.frame_status }}</td>
|
59
|
+
<td>
|
60
|
+
{% if variant.genes %}
|
61
|
+
{% for gene in variant.genes %}
|
62
|
+
{% for transcript in gene.transcripts %}
|
63
|
+
<div>{{ transcript.transcript_id }} </div>
|
64
|
+
{% endfor %}
|
65
|
+
{% endfor %}
|
66
|
+
{% endif %}
|
67
|
+
</td>
|
68
|
+
<td>
|
69
|
+
{% if variant.genes %}
|
70
|
+
{% for gene in variant.genes %}
|
71
|
+
{% for transcript in gene.transcripts %}
|
72
|
+
<div>{% if "exon" in transcript %}{{ transcript.exon|int }}{% endif %} </div>
|
73
|
+
{% endfor %}
|
74
|
+
{% endfor %}
|
75
|
+
{% endif %}
|
76
|
+
</td>
|
77
|
+
<td> {{ variant.chromosome }}:{{ variant.position }} <br> {{ variant.end_chrom }}:{{ variant.end }} </td>
|
78
|
+
<td class="text-center">{{ variant.orientation }}</td>
|
79
|
+
{% endmacro %}
|
80
|
+
|
26
81
|
{% macro fusion_variant_gene_symbols_cell(variant) %}
|
27
82
|
<div class="align-items-center">
|
28
83
|
{% if variant.genes %}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{% extends "layout.html" %}
|
2
2
|
{% from "variants/utils.html" import fusion_filters, cell_rank, pagination_footer, pagination_hidden_div, dismiss_variants_block, filter_form_footer, filter_script_main, update_stash_filter_button_status %}
|
3
|
-
{% from "variants/components.html" import external_scripts, external_stylesheets, fusion_variant_gene_symbols_cell %}
|
3
|
+
{% from "variants/components.html" import external_scripts, external_stylesheets, fusion_variant_gene_symbols_cell, fusion_variants_header, default_fusion_variant_cells %}
|
4
4
|
|
5
5
|
{% block title %}
|
6
6
|
{{ super() }} - {{ institute.display_name }} - {{ case.display_name }} - Fusion variants
|
@@ -54,24 +54,7 @@ onsubmit="return validateForm()">
|
|
54
54
|
|
55
55
|
<div class="card mt-3">
|
56
56
|
<table id="variantsTable" class="table table-hover table-bordered" aria-label="Fusion variants table">
|
57
|
-
|
58
|
-
<tr>
|
59
|
-
<th style="width:3%"></th>
|
60
|
-
<th style="width:4%" title="Beta version. Currently testing">Rank (beta)</th>
|
61
|
-
<th style="width:6%" title="Genes">Fusion Genes</th>
|
62
|
-
<th style="width:4%" title="Number of callers detecting a given event">Callers</th>
|
63
|
-
<th style="width:4%" title="Observed database matches">Observed</th>
|
64
|
-
<th style="width:4%" title="Beta version. Currently testing">Score (beta)</th>
|
65
|
-
<th style="width:6%" title="Number of paired-ends that support the event">Junction Reads</th>
|
66
|
-
<th style="width:6%" title="Number of split reads that support the event">Split Reads</th>
|
67
|
-
<th style="width:6%" title="Fusion fragments per million total RNA-seq fragments">FFPM</th>
|
68
|
-
<th style="width:8%" title="Frame status of the fusion">Frame Status</th>
|
69
|
-
<th style="width:8%" title="Transcript ID">Transcript ID</th>
|
70
|
-
<th style="width:4%" title="Exon Number">Exon Number</th>
|
71
|
-
<th style="width:4%" title="Breakpoints">Breakpoints</th>
|
72
|
-
<th style="width:4%" title="Orientation">Orientation</th>
|
73
|
-
</tr>
|
74
|
-
</thead>
|
57
|
+
{{ fusion_variants_header() }}
|
75
58
|
<tbody>
|
76
59
|
{% for variant in variants %}
|
77
60
|
{{ variant_row(variant) }}
|
@@ -103,37 +86,7 @@ onsubmit="return validateForm()">
|
|
103
86
|
<td class="text-start">
|
104
87
|
{{ cell_rank(variant, institute, case, form, manual_rank_options) }}
|
105
88
|
</td>
|
106
|
-
|
107
|
-
{{ fusion_variant_gene_symbols_cell(variant) }}
|
108
|
-
</td>
|
109
|
-
<td><span data-bs-toggle="tooltip" data-bs-html="true" title="{% for name, caller in variant.callers %}{{ name }}: {{ caller }}<br>{% endfor %}">
|
110
|
-
{{ variant.tool_hits|int }}</span></td>
|
111
|
-
<td>{{variant.found_db|join(", ") if variant.found_db else "-"}}</td>
|
112
|
-
<td class="text-end">{{ variant.fusion_score|float|round(3) }}</td>
|
113
|
-
<td>{{ variant.samples[0].read_depth }}</td>
|
114
|
-
<td>{{ variant.samples[0].split_read }}</td>
|
115
|
-
<td>{{ variant.samples[0].ffpm }}</td>
|
116
|
-
<td>{{ variant.frame_status }}</td>
|
117
|
-
<td>
|
118
|
-
{% if variant.genes %}
|
119
|
-
{% for gene in variant.genes %}
|
120
|
-
{% for transcript in gene.transcripts %}
|
121
|
-
<div>{{ transcript.transcript_id }} </div>
|
122
|
-
{% endfor %}
|
123
|
-
{% endfor %}
|
124
|
-
{% endif %}
|
125
|
-
</td>
|
126
|
-
<td>
|
127
|
-
{% if variant.genes %}
|
128
|
-
{% for gene in variant.genes %}
|
129
|
-
{% for transcript in gene.transcripts %}
|
130
|
-
<div>{% if "exon" in transcript %}{{ transcript.exon|int }}{% endif %} </div>
|
131
|
-
{% endfor %}
|
132
|
-
{% endfor %}
|
133
|
-
{% endif %}
|
134
|
-
</td>
|
135
|
-
<td> {{ variant.chromosome }}:{{ variant.position }} <br> {{ variant.end_chrom }}:{{ variant.end }} </td>
|
136
|
-
<td>{{ variant.orientation }}</td>
|
89
|
+
{{ default_fusion_variant_cells(institute, case, variant) }}
|
137
90
|
</tr>
|
138
91
|
{% endmacro %}
|
139
92
|
|
@@ -91,9 +91,9 @@
|
|
91
91
|
{% endif %}
|
92
92
|
<td class="str-link">{{ cell_rank(variant, institute, case, form, manual_rank_options) }}</td>
|
93
93
|
<td class="str-link">{{ str_locus_info(variant) }}</td>
|
94
|
-
<td class="text-end">{{ variant.str_display_ru or variant.str_ru
|
95
|
-
<td class="text-end"><b
|
96
|
-
|
94
|
+
<td class="text-end">{{ variant.str_display_ru or variant.str_ru or variant.reference }}</td>
|
95
|
+
<td class="text-end"><b><span data-bs-toggle="tooltip" title="{{ variant.alternative }}">{{ variant.str_mc }}</span></b></td>
|
96
|
+
<td class="text-end"><span data-bs-toggle="tooltip" title="{{ variant.reference }}">{{ variant.str_ref or "." }}</span></td>
|
97
97
|
<td>{{ str_status(variant) }}</td>
|
98
98
|
<td>{% for sample in variant.samples %}
|
99
99
|
{% if sample.genotype_call != "./." %}
|
@@ -187,7 +187,9 @@
|
|
187
187
|
<tr><td colspan=2> </td></tr>
|
188
188
|
{% if variant.str_swegen_mean %}
|
189
189
|
<tr><td>SweGen Z-score</td><td>
|
190
|
-
{
|
190
|
+
{% if variant.str_mc %}
|
191
|
+
{{ ((variant.str_mc - variant.str_swegen_mean ) / variant.str_swegen_std) | round(2) }}
|
192
|
+
{% endif %}
|
191
193
|
</td></tr>
|
192
194
|
<tr><td>SweGen mean</td><td>{{variant.str_swegen_mean|round(2)}}</td></tr>
|
193
195
|
<tr><td>SweGen std</td><td>{{variant.str_swegen_std|round(2)}}</td></tr>
|
@@ -233,7 +235,8 @@
|
|
233
235
|
{% endfor %}
|
234
236
|
{%endif%}
|
235
237
|
</div>"
|
236
|
-
title="">{{ variant.str_repid }}
|
238
|
+
title="">{% if variant.str_repid %} {{ variant.str_repid }} {% elif variant.str_trid %} {{ variant.str_trid }} {% else %}
|
239
|
+
{% for gene in variant.genes %} {{ gene.symbol }} {% endfor %} {% endif %}
|
237
240
|
</a>
|
238
241
|
{% for gene in variant.genes %}
|
239
242
|
<span class="badge bg-secondary"><a href="{{ gene.stripy_link }}" class="text-white" referrerpolicy="no-referrer" rel="noopener" target="_blank">S</a></span>
|