Skip to content

Commit

Permalink
renamed class M to 4M & minor bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinDo committed Nov 17, 2023
1 parent 214cc7b commit 5614a9e
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 61 deletions.
2 changes: 1 addition & 1 deletion src/common/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def order_classes( classes):

def sort_classes(a, b):
# sort by ensembl/refseq
class_sequence = ['1', '2', '3-', '3', '3+', '4', '5', 'M']
class_sequence = ['1', '2', '3-', '3', '3+', '4M', '4', '5']

a_importance = class_sequence.index(a)
b_importance = class_sequence.index(b)
Expand Down
10 changes: 6 additions & 4 deletions src/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,12 @@ def class_to_text(self, classification = None):
return 'Likely pathogenic'
if classification == '5':
return 'Pathogenic'
#if classification == '3-':
# return 'Uncertain with tendency to benign'
#if classification == '3+':
# return 'Uncertain with tendency to pathogenic'
if classification == '3-':
return 'Uncertain significance'
if classification == '3+':
return 'Uncertain significance'
if classification == 'M':
return 'Likely pathogenic, low penetrance'

def get_header(self, simple = False):
if not simple:
Expand Down
3 changes: 3 additions & 0 deletions src/frontend_celery/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ class ProdConfig(Config):
CLIENTSECRET = os.environ.get('CLIENT_SECRET')
DISCOVERYURL = f'{ISSUER}/.well-known/openid-configuration'

# clinvar
CLINVAR_API_ENDPOINT = "https://submit.ncbi.nlm.nih.gov/api/v1/submissions" # production endpoint



class DevConfig(Config):
Expand Down
8 changes: 5 additions & 3 deletions src/frontend_celery/webapp/static/css/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ input.invalid {
color:rgba(29, 181, 207, 1);
}

.classification_4M_col {
color:rgba(255,142,61,1);
}

.classification_4_col {
color:rgba(255,142,61,1);
}
Expand All @@ -202,9 +206,7 @@ input.invalid {
color:rgb(164, 164, 164);
}

.classification_M_col {
color:rgb(218, 113, 218);
}



.classification-gradient {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend_celery/webapp/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -440,5 +440,5 @@ footer {
}
.classM_text {
white-space: pre;
font-size: 7px;
font-size: 5px;
}
2 changes: 1 addition & 1 deletion src/frontend_celery/webapp/static/js/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $(document).ready(function()


// coloring of consensus classification
const possible_classes = ["1", "2", "3-", "3", "3+", "4", "5", "M"]
const possible_classes = ["1", "2", "3-", "3", "3+", "4", "5", "4M"]
document.getElementsByName('class-label').forEach(function(obj) {
var consensus_classification = obj.getAttribute('classification').trim();
if (!possible_classes.includes(consensus_classification)) {
Expand Down
1 change: 0 additions & 1 deletion src/frontend_celery/webapp/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def fetch_consequence_task(self, variant_id):

def start_variant_import(user_id, user_roles, conn: Connection): # starts the celery task
import_request = conn.get_most_recent_import_request() # get the most recent import request
import_request = None
min_date = None
if import_request is not None:
min_date = import_request.import_variant_list_finished_at
Expand Down
50 changes: 50 additions & 0 deletions src/frontend_celery/webapp/templates/doc/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,56 @@ <h1 class="bst"> {% block title %} Changelog {% endblock %} </h1>

<div class="bst bsb">
<h4>Changelog</h4>

<div class="underline">v 1.4.1 (02.11.2023)</div>
<div>
Bugfixes:
<ul>
<li>Fixed a bug where the user was unable to insert classifications by the new ClinGen criteria</li>
</ul>
</div>
<div class="underline">v 1.4 (27.10.2023)</div>
<div>
General changes:
<ul>
<li>Update landing page</li>
<li>Moved previous changelog announcements to a new page</li>
<li>The admin dashboard now allows reannotation of a user defined set of databases</li>
<li>The admin dashboard now shows an overview of all annotations and annotation errors / warnings</li>
<li>Added a contact form where unregistered people can ask a question about a variant</li>
<li>Added suffix to criteria names if the selected strength is not the default strength</li>
<li>Variants can now be hidden</li>
<li>The variant list can now be sorted by chromosomal position and insertion date</li>
<li>The page size in the variant list can now be adjusted</li>
<li>Consensus classifications are now preselected from the most recent consensus classification for each scheme</li>
<li>Added four new ClinGen ENIGMA schemes for specific genes: BRCA1 (v.1.0.0), BRCA2(v.1.0.0), TP53 (v.1.4.0), PALB2 (v.1.0.0)</li>
<li>Changed SpliceAI annotations to masked ones</li>
<li>Added variant import from HerediCare</li>
<li>Added HerediCare number of families and heredicare number of cases annotations</li>
<li>Improved criteria popover</li>
<li>Added variant import history page</li>
<li>Enabled HerediCare annotations in admin dashboard</li>
<li>Added downloads page</li>
<li>Added variant check page</li>
</ul>
Bugfixes:
<ul>
<li>Variants are now not selected by default on the search variants page</li>
<li>Abbreviations for criteria are now written with upper case letters</li>
<li>Disabled criteria were not shown correctly</li>
<li>Popovers now stay open when clicked and close when the user does not click inside the popover</li>
<li>Fixed a bug where the ClinVar annotation was erroneous which happened when there were missing submissions</li>
<li>Fixed a bug where the consequence annotation was erroneous which happened when the variant was large and spanned multiple exons / introns</li>
<li>Fixed a bug where the user was unable to download variants which are not annotated</li>
<li>Fixed a bug where the user could not search for class 3+</li>
<li>The date is now inserted correctly when classifying variants. Preexisting classifications did not change (this is fixed starting from 24.10.23).</li>
</ul>
Known issues:
<ul>
<li>COSMIC links do not work sometimes</li>
</ul>
</div>

<div class="underline">v 1.3 (19.06.2023)</div>
<div>
General changes:
Expand Down
51 changes: 3 additions & 48 deletions src/frontend_celery/webapp/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ <h4>Changelog</h4>
<li>REVEL annotations are now transcript specific and show the maximal value in the overview. The details list REVEL scores for all annotations</li>
<li>Additional warnings added to annotation service</li>
<li>User classifications can now be deleted by the user that created it</li>
<li>Renamed class 4 to 4M & changed its color to orange</li>
<li>Renamed PALB2 v1.0.0 & TP53 v1.4.0 classification schemes</li>
</ul>
Bugfixes:
<ul>
Expand All @@ -125,54 +127,7 @@ <h4>Changelog</h4>
Known issues:
<ul>
<li>HerediCare Center specific classifications are not available</li>
</ul>
</div>
<div class="underline">v 1.4.1 (02.11.2023)</div>
<div>
Bugfixes:
<ul>
<li>Fixed a bug where the user was unable to insert classifications by the new ClinGen criteria</li>
</ul>
</div>
<div class="underline">v 1.4 (27.10.2023)</div>
<div>
General changes:
<ul>
<li>Update landing page</li>
<li>Moved previous changelog announcements to a new page</li>
<li>The admin dashboard now allows reannotation of a user defined set of databases</li>
<li>The admin dashboard now shows an overview of all annotations and annotation errors / warnings</li>
<li>Added a contact form where unregistered people can ask a question about a variant</li>
<li>Added suffix to criteria names if the selected strength is not the default strength</li>
<li>Variants can now be hidden</li>
<li>The variant list can now be sorted by chromosomal position and insertion date</li>
<li>The page size in the variant list can now be adjusted</li>
<li>Consensus classifications are now preselected from the most recent consensus classification for each scheme</li>
<li>Added four new ClinGen ENIGMA schemes for specific genes: BRCA1 (v.1.0.0), BRCA2(v.1.0.0), TP53 (v.1.4.0), PALB2 (v.1.0.0)</li>
<li>Changed SpliceAI annotations to masked ones</li>
<li>Added variant import from HerediCare</li>
<li>Added HerediCare number of families and heredicare number of cases annotations</li>
<li>Improved criteria popover</li>
<li>Added variant import history page</li>
<li>Enabled HerediCare annotations in admin dashboard</li>
<li>Added downloads page</li>
<li>Added variant check page</li>
</ul>
Bugfixes:
<ul>
<li>Variants are now not selected by default on the search variants page</li>
<li>Abbreviations for criteria are now written with upper case letters</li>
<li>Disabled criteria were not shown correctly</li>
<li>Popovers now stay open when clicked and close when the user does not click inside the popover</li>
<li>Fixed a bug where the ClinVar annotation was erroneous which happened when there were missing submissions</li>
<li>Fixed a bug where the consequence annotation was erroneous which happened when the variant was large and spanned multiple exons / introns</li>
<li>Fixed a bug where the user was unable to download variants which are not annotated</li>
<li>Fixed a bug where the user could not search for class 3+</li>
<li>The date is now inserted correctly when classifying variants. Preexisting classifications did not change (this is fixed starting from 24.10.23).</li>
</ul>
Known issues:
<ul>
<li>COSMIC links do not work sometimes</li>
<li>HerediCare priors, log likelihood, segregation & cooccurance are not available</li>
</ul>
</div>
<a class="btn btn-outline-primary" href="{{url_for('doc.changelog')}}">previous changelog</a>
Expand Down
4 changes: 2 additions & 2 deletions src/frontend_celery/webapp/templates/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
{% endif %}
</svg>
{% else %}
{% if class == "M" %}
{% if class == "4M" %}
<svg name="consensus_class_svg" xmlns="http://www.w3.org/2000/svg" width="{{ width }}" viewBox="2.469 1.934 10 12" preserveAspectRatio="xMidYMid meet" fill="currentColor">
<!--<path transform="translate(-4,10) scale(1.3)" d="M5.295 11V5.995H7V5H2.403v.994h1.701V11h1.19zm3.397 0V7.01h.058l1.428 3.239h.773l1.42-3.24h.057V11H13.5V5.001h-1.2l-1.71 3.894h-.039l-1.71-3.894H7.634V11h1.06z"/>-->
<text class="classM_text" x="4.3" y="9.5">M</text>
<text class="classM_text" x="3.9" y="8.8">4M</text>
</svg>
{% else %}
<svg name="consensus_class_svg" xmlns="http://www.w3.org/2000/svg" width="{{ width }}" fill="currentColor" class="bi bi-dash" viewBox="5.5 -0.7 16 16" preserveAspectRatio="xMidYMid meet">
Expand Down
1 change: 1 addition & 0 deletions src/frontend_celery/webapp/variant/variant_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ def classify(variant_id):
return abort(404)

allowed_classes = conn.get_enumtypes('user_classification', 'classification')
allowed_classes = functions.order_classes(allowed_classes)

user_id = session['user']['user_id']
previous_classifications = {user_id: functions.list_of_objects_to_dict(variant.get_user_classifications(user_id), key_func = lambda a : a.scheme.id, val_func = lambda a : a.to_dict())}
Expand Down

0 comments on commit 5614a9e

Please sign in to comment.