Skip to content

Fix transcript links to Ensembl and NCBI RefSeq#6041

Open
northwestwitch wants to merge 16 commits intomainfrom
fix_links_to_ensembl
Open

Fix transcript links to Ensembl and NCBI RefSeq#6041
northwestwitch wants to merge 16 commits intomainfrom
fix_links_to_ensembl

Conversation

@northwestwitch
Copy link
Member

@northwestwitch northwestwitch commented Feb 11, 2026

This PR adds a functionality or fixes a bug.

Testing on cg-vm1 server (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-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@<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 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 CR

@northwestwitch
Copy link
Member Author

This needs some more fixing and I won't have time on these days. @dnil feel free to continue/modify it if you want!

@dnil
Copy link
Member

dnil commented Feb 11, 2026

I don't think there is any rush really, but thank you!

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.93%. Comparing base (a49902c) to head (9c60045).

Files with missing lines Patch % Lines
scout/server/links.py 60.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6041      +/-   ##
==========================================
+ Coverage   83.88%   83.93%   +0.04%     
==========================================
  Files         336      336              
  Lines       21022    21019       -3     
==========================================
+ Hits        17635    17642       +7     
+ Misses       3387     3377      -10     

☔ View full report in Codecov by Sentry.
📢 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.

@northwestwitch northwestwitch marked this pull request as ready for review February 16, 2026 08:40
@northwestwitch
Copy link
Member Author

This now looks good on stage and passes the automatic tests, I'm marking in ready for review


def ensembl_tx(ens_tx_id, build=37):
link = "http://grch37.ensembl.org/Homo_sapiens/" "Gene/Summary?t={}"
link = "https://grch37.ensembl.org/Homo_sapiens/Gene/Summary?t={}"
Copy link
Member Author

Choose a reason for hiding this comment

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

httpS is a fix


hgnc_transcript = transcripts_dict.get(tx_id)
# If the tx does not exist in ensembl anymore we skip it
if not hgnc_transcript:
Copy link
Member Author

Choose a reason for hiding this comment

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

Removing this condition is also a fix

hgnc_transcript.get("refseq_identifiers", []) if hgnc_transcript else []
)
transcript["change_str"] = transcript_str(transcript, hgnc_symbol)
add_tx_links(transcript, genome_build, hgnc_symbol)
Copy link
Member Author

Choose a reason for hiding this comment

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

And of course this is also a fix

@sonarqubecloud
Copy link

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.

Transcript link generation and rendering for the variant transcript table

2 participants