Skip to content

Commit 6336808

Browse files
committed
added NCBoostv2
1 parent 0b91f6a commit 6336808

File tree

5 files changed

+51
-3
lines changed

5 files changed

+51
-3
lines changed

MobiDetailsApp/api.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ def variant(variant_id=None, caller='browser', api_key=None):
324324
},
325325
'nonCodingPredictions':{
326326
'mobideep': None,
327+
'ncboostRaw': None,
328+
'ncboostPhred': None,
327329
'promoterai': None,
328330
'remm': None,
329331
},
@@ -534,6 +536,7 @@ def variant(variant_id=None, caller='browser', api_key=None):
534536
'episignature': None,
535537
'mavedb': None,
536538
'morfeedb': None,
539+
'ncboost': None,
537540
'gpnmsa': None,
538541
'cactus241way': None,
539542
'remm': None,
@@ -1361,6 +1364,21 @@ def variant(variant_id=None, caller='browser', api_key=None):
13611364
else:
13621365
external_data['nonCodingPredictions']['promoterai'] = format(float(record[int(md_utilities.external_tools['PromoterAI']['raw_col'])]), '.2f')
13631366
internal_data['nonCodingPredictions']['promoteraiColor'] = md_utilities.get_preditor_single_threshold_color(abs(float(external_data['nonCodingPredictions']['promoterai'])), 'promoterai')
1367+
1368+
1369+
1370+
# NCBoostv2
1371+
if variant_features['prot_type'] == 'unknown':
1372+
record = md_utilities.get_value_from_tabix_file('NCBoost', md_utilities.local_files['ncboost']['abs_path'], var, variant_features)
1373+
if isinstance(record, str):
1374+
internal_data['noMatch']['ncboost'] = "{0} {1}".format(record, md_utilities.external_tools['NCBoost']['version'])
1375+
else:
1376+
external_data['nonCodingPredictions']['ncboostRaw'] = format(float(record[int(md_utilities.external_tools['NCBoost']['raw_col'])]), '.4f')
1377+
external_data['nonCodingPredictions']['ncboostPhred'] = format(float(record[int(md_utilities.external_tools['NCBoost']['phred_col'])]), '.4f')
1378+
# internal_data['nonCodingPredictions']['promoteraiColor'] = md_utilities.get_preditor_single_threshold_color(abs(float(external_data['nonCodingPredictions']['ncboost'])), 'ncboost')
1379+
1380+
1381+
13641382
# GPN-MSA
13651383
record = md_utilities.get_value_from_tabix_file('GPN-MSA', md_utilities.local_files['gpnmsa']['abs_path'], var, variant_features)
13661384
if isinstance(record, str):

MobiDetailsApp/md_utilities.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ def get_resource_current_version(resource_dir, regexp, excluded_date=None):
170170
local_files['morfeedb_folder']['abs_path'] = '{0}{1}'.format(
171171
app_path, local_files['morfeedb_folder']['rel_path']
172172
)
173+
local_files['ncboost']['abs_path'] = '{0}{1}'.format(
174+
app_path, local_files['ncboost']['rel_path']
175+
)
173176
oncokb_genes_version = get_resource_current_version(
174177
'{0}{1}'.format(app_path, local_files['oncokb_genes']['rel_path']),
175178
r'cancerGeneList_(\d+).tsv'
@@ -798,6 +801,7 @@ def get_value_from_tabix_file(text, tabix_file, var, variant_features, db=None):
798801
text == 'AbSplice' or \
799802
text == 'AlphaMissense' or \
800803
text == 'MorfeeDB'or \
804+
text == 'NCBoost' or \
801805
text == 'GPN-MSA' :
802806
i -= 1
803807
if 'p_name' in variant_features and variant_features['p_name'] is not None:

MobiDetailsApp/sql/md_resources.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
'ncbi_litvar_apiv2': 'https://www.ncbi.nlm.nih.gov/research/litvar2-api/variant/get/litvar%40'
164164
'ncbi_litvar_apiv2_sensor': 'https://www.ncbi.nlm.nih.gov/research/litvar2-api/sensor/'
165165
'ncbi_snp_api': 'https://api.ncbi.nlm.nih.gov/variation/v0/refsnp/'
166+
'ncboost': 'https://github.com/RausellLab/NCBoost-2'
166167
'oncokb': 'https://www.oncokb.org/'
167168
'omim': 'http://omim.org/'
168169
'panelapp': 'https://panelapp.genomicsengland.co.uk/'
@@ -406,6 +407,11 @@
406407
'name': 'MMorfee scores'
407408
'description': 'bed files for MorfeeDB individual variants'
408409
'short_name': 'morfeedb_folder'
410+
'ncboost':
411+
'rel_path': '/static/resources/ncboost/ncboost_v2_hg38_20260202_light.tsv.gz'
412+
'name': 'NCBoost v2 scores for 1.88 billion positions'
413+
'description': 'Pre-computed NCBoost v2 scores'
414+
'short_name': 'ncboost'
409415
'oncokb_genes':
410416
'rel_path': '/static/resources/oncokb/'
411417
'name': 'OncoKB cancer gene list'
@@ -785,6 +791,14 @@
785791
'paper': ' 27154141'
786792
'version': 'API'
787793
'short_name': 'mygene.info'
794+
'NCBoost':
795+
'firstauthor': 'Caron'
796+
'year': '2026'
797+
'paper': ''
798+
'version': 'v20260202'
799+
'short_name': 'ncboost'
800+
'raw_col': '8'
801+
'phred_col': '9'
788802
'OncoKBGenes':
789803
'firstauthor': 'Chakravarty'
790804
'year': '2017'

MobiDetailsApp/templates/md/variant.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@
15201520
{{ content(internal_data.noMatch.morfeedb) }}
15211521
{% endif %}
15221522
{# {% if external_data.positions.proteinType == 'unknown' %} #}
1523-
{% if external_data.nonCodingPredictions.remm is not none or external_data.nonCodingPredictions.promoterai is not none or (external_data.positions.proteinType == 'unknown' and external_data.positions.DNAType == 'substitution')%}
1523+
{% if external_data.nonCodingPredictions.remm is not none or external_data.nonCodingPredictions.promoterai is not none or external_data.nonCodingPredictions.ncboostRaw is not none or (external_data.positions.proteinType == 'unknown' and external_data.positions.DNAType == 'substitution')%}
15241524
{{ section_subtitle('overall_nc_predictors', 'Overall non-coding predictors') }}
15251525
<div class="w3-responsive w3-container">
15261526
<table class="w3-table w3-centered display compact" style="width:90%" id="noncoding_table">
@@ -1532,7 +1532,7 @@
15321532
</tr>
15331533
</thead>
15341534
<tbody>
1535-
{% if internal_data.noMatch.remm is not none or external_data.nonCodingPredictions.remm is not none %}
1535+
{% if internal_data.noMatch.remm is none or external_data.nonCodingPredictions.remm is not none %}
15361536
<tr><!--ReMM-->
15371537
<td class="w3-left-align"><a href="{{ urls.remm }}" target="_blank" title="Visit ReMM" rel="noopener noreferrer">ReMM</a>:</td>
15381538
{% if internal_data.noMatch.remm is none %}
@@ -1543,7 +1543,7 @@
15431543
<td class="w3-left-align"><em class="w3-small">Threshold &gt; 0.924|0.961 for Likely Pathogenic and Pathogenic</em></td>
15441544
</tr>
15451545
{% endif %}
1546-
{% if internal_data.noMatch.promoterai is not none or external_data.nonCodingPredictions.promoterai is not none %}
1546+
{% if internal_data.noMatch.promoterai is none or external_data.nonCodingPredictions.promoterai is not none %}
15471547
<tr><!--PromoterAI-->
15481548
<td class="w3-left-align"><a href="{{ urls.promoterai }}" target="_blank" title="Visit PromoterAI" rel="noopener noreferrer">PromoterAI</a>:</td>
15491549
{% if internal_data.noMatch.promoterai is none %}
@@ -1554,6 +1554,17 @@
15541554
<td class="w3-left-align"><em class="w3-small">Prediction of expression altering promoter variants; Thresholds &le; -0.5 for under expression and &ge; 0.5 for over expression </em></td>
15551555
</tr>
15561556
{% endif %}
1557+
{% if internal_data.noMatch.ncboost is none or external_data.nonCodingPredictions.ncboostRaw is not none %}
1558+
<tr id="ncboost_tr">
1559+
<td class="w3-left-align"><a href="{{ urls.ncboost }}" target="_blank" title="Visit NCBoost v2" rel="noopener noreferrer">NCBoost v2</a>:</td>
1560+
{% if internal_data.noMatch.ncboost is none %}
1561+
<td class="w3-left-align" id="ncboost_score">{{ external_data.nonCodingPredictions.ncboostRaw }} ({{ external_data.nonCodingPredictions.ncboostPhred}}) </td>
1562+
{% else %}
1563+
<td class="w3-left-align">{{ internal_data.noMatch.ncboost }}</td>
1564+
{% endif %}
1565+
<td class="w3-left-align"><em class="w3-small">NCBoost raw score [0-1] (rank perc.). The rank percentile expresses the ranking of the variant among all variants lying in the same chromosome. The higher the most likely to have an impact</em></td>
1566+
</tr>
1567+
{% endif %}
15571568
<!--hidden tr for MobiDeep called by ajax-->
15581569
<tr id="mobideep_tr" style="display:none;">
15591570
<td class="w3-left-align"><a href="{{ urls.mobideep }}" target="_blank" title="Visit MobiDeep" rel="noopener noreferrer">MobiDeep</a>:</td>

tests/test_md_utilities.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ def test_acmg2lovd(app, acmg_class, lovd_class):
594594
('gnomADv4 exome', var, '0.0015', 5, 'gnomad_4_exome', var_f),
595595
('gnomADv4 exome', var_dup, '1.0000', 5, 'gnomad_4_exome', var_dup_f),
596596
('Mistic', var, '0.876', 4, 'mistic', var_f),
597+
('NCBoost', var_5utr1, '0.1424310803413391', 8, 'ncboost', var_5utr1_f),
597598
('dbscSNV', var_ss, '0.9999', 14, 'dbscsnv', var_ss_f),
598599
('dbscSNV', var_ss, '0.928', 15, 'dbscsnv', var_ss_f),
599600
('MorfeeDB', var_5utr1, 'uTIS', 10, 'morfeedb', var_5utr1_f),

0 commit comments

Comments
 (0)