-
Notifications
You must be signed in to change notification settings - Fork 47
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
Truncate long HGVS descriptions on cancer SNVS and SNV pages #5183
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5183 +/- ##
=======================================
Coverage 84.46% 84.46%
=======================================
Files 327 327
Lines 19800 19800
=======================================
Hits 16725 16725
Misses 3075 3075 ☔ View full report in Codecov by Sentry. |
Tested with this case, check the second page of the SNVs Main branchThis branch |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -235,10 +235,10 @@ <h6 class="card-header">Variant callers</h6> | |||
<span class="text-muted">exon </span><strong>{{ primary_gene.exon }}</strong> | |||
{% endif %} | |||
{% if primary_transcript and primary_transcript.coding_sequence_name %} | |||
{{ primary_transcript.coding_sequence_name | url_decode }} | |||
{{ primary_transcript.coding_sequence_name | url_decode | truncate(50, True) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
<a target="_blank" href="{{ url_for('variant.cancer_variant', institute_id=institute._id, case_name=case.display_name, | ||
variant_id=variant._id, cancer='yes') }}"> | ||
{% if variant.first_rep_gene.hgvs_identifier %} | ||
<div>{{ variant.first_rep_gene.hgvs_identifier }}</div> | ||
<div>{{ (variant.first_rep_gene.hgvsp_identifier or '') |url_decode }}</div> | ||
<div>{{ variant.first_rep_gene.hgvs_identifier|truncate(30, True) }}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is better than current main on layout, but we should ideally have like a pretty print for these as well, e.g. giving coord and ins and/or del and the number of bp instead of the exact sequence of each if it goes over an annoying number of chars in total.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally it would be nice to have a common way for cancer and non-cancer variants (the HGVS of these are handled in an easier way). Here it is complicated by the first and second representative gene which can be missing also. Felt safer to keep the code basically the same and just truncate strings if they are long. Let's merge and revisit if we touch this code in the future
This PR adds a functionality or fixes a bug.
Testing on cg-vm1 server (Clinical Genomics Stockholm)
Prepare for testing
scout-stage
and the server iscg-vm1
.ssh <USER.NAME>@cg-vm1.scilifelab.se
sudo -iu hiseq.clinical
ssh localhost
podman ps
systemctl --user stop scout.target
systemctl --user start scout@<this_branch>
systemctl --user status scout.target
scout-stage
) to be used for testing by other users.Testing on hasta server (Clinical Genomics Stockholm)
Prepare for testing
ssh <USER.NAME>@hasta.scilifelab.se
us; paxa -u <user> -s hasta -r scout-stage
. You can also use the WSGI Pax app available at https://pax.scilifelab.se/.conda activate S_scout; pip freeze | grep scout-browser
bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_scout -t scout -b <this_branch>
us; scout --version
paxa
procedure, which will release the allocated resource (scout-stage
) to be used for testing by other users.How to test:
Expected outcome:
The functionality should be working
Take a screenshot and attach or copy/paste the output.
Review: