Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4862 - ORPHA inheritance patterns hidden #4863

Merged
merged 7 commits into from
Sep 18, 2024

Conversation

dnil
Copy link
Collaborator

@dnil dnil commented Sep 17, 2024

This PR adds a functionality or fixes a bug.

Hide ORPHA inheritance patterns on general report, as they can be misleading. Compare note on variant view.
Also added colored badges for the OMIM inheritance models for consistency with the variant page.

Before:
Screenshot 2024-09-17 at 15 59 27

After:
Screenshot 2024-09-17 at 15 56 05

Testing on cg-vm1 server (Clinical Genomics Stockholm)

Prepare for testing

  1. Make sure the PR is pushed and available on Docker Hub
  2. Fist book your testing time using the Pax software available at https://pax.scilifelab.se/. The resource you are going to call dibs on is scout-stage and the server is cg-vm1.
  3. ssh <USER.NAME>@cg-vm1.scilifelab.se
  4. sudo -iu hiseq.clinical
  5. ssh localhost
  6. (optional) Find out which scout branch is currently deployed on cg-vm1: podman ps
  7. Stop the service with current deployed branch: systemctl --user stop scout.target
  8. Start the scout service with the branch to test: systemctl --user start scout@<this_branch>
  9. Make sure the branch is deployed: systemctl --user status scout.target
  10. After testing is done, repeat procedure at https://pax.scilifelab.se/, which will release the allocated resource (scout-stage) to be used for testing by other users.
Testing on hasta server (Clinical Genomics Stockholm)

Prepare for testing

  1. ssh <USER.NAME>@hasta.scilifelab.se
  2. Book your testing time using the Pax software. us; paxa -u <user> -s hasta -r scout-stage. You can also use the WSGI Pax app available at https://pax.scilifelab.se/.
  3. (optional) Find out which scout branch is currently deployed on cg-vm1: conda activate S_scout; pip freeze | grep scout-browser
  4. Deploy the branch to test: bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_scout -t scout -b <this_branch>
  5. Make sure the branch is deployed: us; scout --version
  6. After testing is done, repeat the paxa procedure, which will release the allocated resource (scout-stage) to be used for testing by other users.

How to test:

  1. how to test it, possibly with real cases/data

Expected outcome:
The functionality should be working
Take a screenshot and attach or copy/paste the output.

Review:

  • code approved by
  • tests executed by DN

@dnil dnil marked this pull request as ready for review September 17, 2024 14:02
@dnil
Copy link
Collaborator Author

dnil commented Sep 17, 2024

Tested on stage. I was kind of expecting to have to split the general css into a colors part and a more formatting oriented one and only have the colors go to the report, but looks like it works, doesn't it? See if you see anything, and I'll give it another go as well with more rested eyes later.

Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.78%. Comparing base (c48d621) to head (ae1a94f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4863   +/-   ##
=======================================
  Coverage   84.78%   84.78%           
=======================================
  Files         319      319           
  Lines       19289    19290    +1     
=======================================
+ Hits        16354    16355    +1     
  Misses       2935     2935           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@northwestwitch northwestwitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the code so it will show inheritance only for OMIM terms.

But check for instance at this variant --> https://scout-stage.scilifelab.se/cust002/17083/161ee740fbbc95136ea4c0ff8cc3a916

I think it is safe enough to show that also the ORPHA inhteritance is AR. We could modify both variant page and the report so that whenever OMIM and ORPHA inheritance matches then it's shown in the ORPHA as well, and then we can show other models that appear on ORPHA but not on OMIM apart. Something like this:

OMIM: AR

ORPHA: AR (AD, XR..)

@@ -6,6 +6,7 @@
{% block css %}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="{{ url_for('static', filename='bs_styles.css') }}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@@ -712,7 +713,9 @@ <h4>Scout case analysis report</h4> - created on:&nbsp;<strong>{{report_created_
<td>
<ul class="p-0" style="list-style-type: none;">
{% for disease_term in gene.disease_terms %}
<li class="d-flex align-items-baseline"><span class="badge bg-secondary m-1">{{ disease_term._id}}</span>&nbsp;<span>{{ disease_term.description }}&nbsp;{{ disease_term.inheritance }}</span></li>
<li class="d-flex align-items-baseline"><span class="badge bg-secondary m-1">{{ disease_term._id}}</span>&nbsp;<span>{{ disease_term.description }}&nbsp;{% if disease_term.source != 'ORPHA' and disease_term.inheritance %}
{% for model in disease_term.inheritance %} {{ inheritance_badge(model,inherit_palette) }}{% endfor %}
Copy link
Member

@northwestwitch northwestwitch Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wound't be confusing that variant page shows different values for ORPHA inheritance?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have modified the variant page to accomodate this, adding a warning. Also, the more clear cut "Gene models" card is nearby. The variant page is used by very or at least somewhat experienced genetics and genomics persons, whereas the reports are often read also by doctors in training, who in particular provide medical input. In the not-yet-specialist case could be confused by an authoritative looking inheritance model, and cannot always be taken to understand the distinction between different database.
Screenshot 2024-09-18 at 09 55 57

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I remember this problem and our solution.

@northwestwitch
Copy link
Member

Good that it's a thing that can be fixed without modifying the disease terms code by the way! 😆

@dnil
Copy link
Collaborator Author

dnil commented Sep 18, 2024

This changes the code so it will show inheritance only for OMIM terms.

But check for instance at this variant --> https://scout-stage.scilifelab.se/cust002/17083/161ee740fbbc95136ea4c0ff8cc3a916

I think it is safe enough to show that also the ORPHA inhteritance is AR. We could modify both variant page and the report so that whenever OMIM and ORPHA inheritance matches then it's shown in the ORPHA as well, and then we can show other models that appear on ORPHA but not on OMIM apart. Something like this:

OMIM: AR

ORPHA: AR (AD, XR..)

I considered something like that, but rejected it since I would have to explain that the OMIM data is used to select which of the ORPHA models are not in parenthesis. I do not like this unclear path of information.

I rejected the idea to show them if identical, since it might lead to confusion as to why ORPHA models are missing for other disorders

I also rejected the option to show the ORPHA model if there are no OMIM disorders for the gene, as it is not really clear to me from ORPHA that they then really say the inheritance pattern is for that gene. Not only that cases with that disorder have been seen with that gene, plus another which has this shown inheritance model.

Copy link
Member

@northwestwitch northwestwitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this solution will be OK for our users. Consider adding a popover in the report page explaining that ORPHA inheritance is not accounted for Or perhaps modify the existing popover on the variant page adding that ORPHA models will be not shown on the case report?

@@ -712,7 +713,9 @@ <h4>Scout case analysis report</h4> - created on:&nbsp;<strong>{{report_created_
<td>
<ul class="p-0" style="list-style-type: none;">
{% for disease_term in gene.disease_terms %}
<li class="d-flex align-items-baseline"><span class="badge bg-secondary m-1">{{ disease_term._id}}</span>&nbsp;<span>{{ disease_term.description }}&nbsp;{{ disease_term.inheritance }}</span></li>
<li class="d-flex align-items-baseline"><span class="badge bg-secondary m-1">{{ disease_term._id}}</span>&nbsp;<span>{{ disease_term.description }}&nbsp;{% if disease_term.source != 'ORPHA' and disease_term.inheritance %}
{% for model in disease_term.inheritance %} {{ inheritance_badge(model,inherit_palette) }}{% endfor %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I remember this problem and our solution.

@dnil
Copy link
Collaborator Author

dnil commented Sep 18, 2024

Right, it's a bit of a corollary to #4443. I didn't quite think about the non-specialists reading the report then and was happy with the OMIM and ORPHA being on different lines. Updating the tooltip is a nice suggestion - will do! The reports occasionally live their life on paper, so tooltips there are not always read.

@@ -50,7 +50,7 @@
{% if gene.common and gene.disease_terms %}
{% for disease_term in gene.disease_terms %}
{% if disease_term.source == 'ORPHA' %}
<tr data-bs-toggle="tooltip" title="Some ORPHA disorders are phenotypic umbrella terms for multiple genetic entities. The inheritance models are in this case a set derived from all those entities, not necessarily the inheritance mode known for this gene.">
<tr data-bs-toggle="tooltip" title="Some ORPHA disorders are phenotypic umbrella terms for multiple genetic entities. The inheritance models are in this case a set derived from all those entities, not necessarily modes of inheritance known for this gene. ORPHA inheritance modes will not be shown on the general case report.">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

Copy link

sonarcloud bot commented Sep 18, 2024

@dnil dnil merged commit 0bc179b into main Sep 18, 2024
25 checks passed
@dnil dnil deleted the silence_orpha_report_inheritance branch September 18, 2024 09:03
dreamweaver-cell pushed a commit to gmc-norr/scout that referenced this pull request Oct 9, 2024
…cal-Genomics#4863)

* Fix Clinical-Genomics#4862 - ORPHA inheritance patterns hidden

* use import only for css colors

* whitespace

* update tooltip

---------

Co-authored-by: Chiara Rasi <rasi.chiara@gmail.com>
dreamweaver-cell pushed a commit to dreamweaver-cell/scout that referenced this pull request Oct 13, 2024
…cal-Genomics#4863)

* Fix Clinical-Genomics#4862 - ORPHA inheritance patterns hidden

* use import only for css colors

* whitespace

* update tooltip

---------

Co-authored-by: Chiara Rasi <rasi.chiara@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants