Skip to content

Save inheritance key/values on omics variants documents#6446

Open
northwestwitch wants to merge 2 commits into
mainfrom
outliers_inheritance_on_genes
Open

Save inheritance key/values on omics variants documents#6446
northwestwitch wants to merge 2 commits into
mainfrom
outliers_inheritance_on_genes

Conversation

@northwestwitch

@northwestwitch northwestwitch commented Jun 25, 2026

Copy link
Copy Markdown
Member

This PR adds a functionality or fixes a bug.

Test

uv run scout setup demo

Main branch

image

This branch

image
Testing on `cg-services-stage` (Clinical Genomics Stockholm)

Prepare for testing

  1. Make sure the PR is pushed and available on Docker Hub
  2. First 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-services-stage.scilifelab.se
  4. sudo -iu hiseq.clinical
  5. ssh localhost
  6. (optional) Find out which Scout branch is currently deployed on cg-services-stage: podman ps
  7. Stop the service with current deployed branch: systemctl --user stop scout@<name_of_currently_deployed_branch>
  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 hasta: 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.
Testing docs locally with `uv` 1. Build and serve documents: `uv run --group docs mkdocs serve --strict` 1. Visit [http://127.0.0.1:4000/scout/](http://127.0.0.1:4000/scout/)

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

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.08%. Comparing base (b1926c9) to head (55ac34e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6446   +/-   ##
=======================================
  Coverage   84.08%   84.08%           
=======================================
  Files         347      347           
  Lines       21879    21880    +1     
=======================================
+ Hits        18396    18397    +1     
  Misses       3483     3483           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

<div>
{{ gene_link(gene) }}
{% for model in gene.inheritance %}
{% set inheritances = gene.inheritance if gene.inheritance else gene.inheritance_models %}

@northwestwitch northwestwitch Jun 25, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This collects inheritance from old docs, which don't have the gene.inheritance key

@sonarqubecloud

Copy link
Copy Markdown

"""
hgnc_gene = self.hgnc_gene(omics_model["hgnc_ids"][0], omics_model["build"])
if hgnc_gene:
hgnc_gene["inheritance"] = hgnc_gene["inheritance_models"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is to same the key in newly parsed and saved omics vars

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Like a light build gene?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mm, we should really really refactor those things. How about we make it a function then to make it more clear what is happening - and to make it easier to refactor later?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think it's needed for the sake of displaying inheritance badges. And it's a very tiny function already. You don't even have to change it at all, given that you can have the badges just with the fix to the template file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show inheritance patterns for genes on the outliers page

2 participants