Skip to content

Gene Symbol page - classification HGVS does not switch according to page genome build toggle #1244

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

Open
davmlaw opened this issue Jan 30, 2025 · 8 comments
Assignees

Comments

@davmlaw
Copy link
Contributor

davmlaw commented Jan 30, 2025

( Note this wont be testable in Shariant Test after SACGF/variantgrid_private#3722 )
https://app.testiny.io/VG/testcases/tcf/92/tc/192/edit

View the gene symbol page, eg search for "GATA2" or "BRCA2"

At the top of the page is a toggle that switches between genome builds, eg GRCh37/GRCh38

The classifications grid is sent this data in the URL, eg:

genes/gene/grid/GATA2/GRCh37/config/

However it doesn't seem to use it anymore.

I am not sure whether this was done deliberately for Shariant. If so, perhaps they want to disable the genome build toggle?

@davmlaw davmlaw changed the title Gene Symbol page - classifications do not switch according to chosen genome build Gene Symbol page - classification HGVS does not switch according to chosen genome build Jan 30, 2025
@davmlaw davmlaw changed the title Gene Symbol page - classification HGVS does not switch according to chosen genome build Gene Symbol page - classification HGVS does not switch according to page genome build toggle Jan 30, 2025
@TheMadBug
Copy link
Member

If I could do this as part of my branch as I've changed the gene symbol page a little bit, but I can also confirm that the classification listing just uses the user's preferred gene symbol.

Surprising that the toggle has survived so long, but I guess we just got blind to it.

@davmlaw
Copy link
Contributor Author

davmlaw commented Jan 30, 2025

If we make it match what it's set to, it'll work as expected if gene symbol page toggle is removed for Shariant

@TheMadBug
Copy link
Member

I think this was when we first introduced multiple gene symbols, the idea was to put this toggle on every page where the data might be different per genome build
but then it turned out there were way too many pages that fit into that category, so instead we made "preferred genome build" a user setting, and then everything that needs a genome build can use that.
I think we had that toggle on other pages and removed them, just forgot about this one. I would def say the right thing to do is to remove it for all environments.

@davmlaw
Copy link
Contributor Author

davmlaw commented Jan 31, 2025

In Shariant everything is cross build, so the only difference is "what build do you want to see classifications g.HGVS"

In VariantGrid we have per-build data, like VCFs, so switching between builds shows different variants that fall within the gene depending on the build - so we want this

@davmlaw
Copy link
Contributor Author

davmlaw commented Jan 31, 2025

@TheMadBug - so are you ok with making grid match the build in the URL then make a setting to remove this toggle in Shariant (always be users defined build?)

@TheMadBug
Copy link
Member

Ahhh yup, I see there's still plenty of pages that use that toggle for annotation and other purposes.

Most of the stuff I've done that utilises genome build uses GenomeBuildManager to determine what the Genome Build should be. By default GenomeBuildManager picks the user's preferred GenomeBuild, but I can make it check the URL for GenomeBuild as a higher priority, then fall back onto the user's.

After my code change, you should be free to use GenomeBuildManager in a lot more places to determine what GenomeBuild. Anyway, I'll get to work on coding that.

@TheMadBug
Copy link
Member

Turns out to be slightly more complicated (but still very managable):

The datatables actually used UserSettings directly ignoring GenomeBuild manager, easy fix.
The datatables are requested via their own ajax URL so lose visibility of the overall URL including the genome build - so need to pass genome build as a parameter to them.

It does mean my fix would be integrated with the new grouping display, so might just fix in my branch and try to get that branch into master rather than cherry picking it.

@TheMadBug TheMadBug self-assigned this Feb 3, 2025
TheMadBug added a commit that referenced this issue Feb 3, 2025
@TheMadBug
Copy link
Member

For now I've completed the first part of this in my dev branch classification_grouping_3.
From a user's POV, when they use the toggle on the gene symbol page, the classification table will change to listing that genome build, and the download links will download in that genome build.

I might make a separate task to remove the toggle functionality from that page for Shariant.

From a technical POV.
GenomeBuildManager will now check URL parameters and URL path for the genome build, this will take priority over the user settings default. (So that regardless of a user's settings, if they ask to see the 38 version they get the 38 version).
The classification data table now passes the genome build as a parameter (since it's an AJAX call the genome build needs to be re-injected).

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

No branches or pull requests

2 participants