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

Click to popup does not work in variant track with display mode collapsed #1499

Closed
alimanfoo opened this issue Apr 19, 2022 · 8 comments
Closed

Comments

@alimanfoo
Copy link

Hi there, I'm using igv.js via the igv-notebook package (v0.2.1) and creating a browser with a variant track from an all sites VCF file. I like the collapsed display mode as it shows everything on a single line, but I notice that clicking on a variant or genotype then seems broken. It looks like the click areas are behaving as if the track was still in expanded mode. I infer this because clicking to create a popup seems to work for every other variant, and you can get a popup to work for every other one by clicking below the genotype (i.e., where it would appear if expanded display mode).

@jrobinso
Copy link
Contributor

Yes, confirmed, its an igv.js bug.

@alimanfoo
Copy link
Author

Thanks @jrobinso. I'm no javascript coder, but I had a bit of a browse around the source code, noticed that in VariantTrack.clickedFeatures() there doesn't seem to be any handling of the collapsed display mode.

Btw, my variants track has one SNP for every position (all sites) and one sample, and so looks like this with expanded display mode:

image

I'm looking for any way to get all variants displayed in a single row, as it looks with collapsed mode:

image

I also tried adding "maxRows": 1 to the track config, which from the code suggested that should limit the number of rows used during packing of features, but that didn't seem to do anything.

@jrobinso
Copy link
Contributor

Yes its just a bug for sure, I think I've fixed it but can't test now as I'm traveling today.

@alimanfoo
Copy link
Author

Thanks so much @jrobinso, look forward to the fix.

As an aside, I did wonder if the feature packing behaviour was quite right. In my case I have a SNP variant at every position, so lots of adjacent SNPs basically, but they don't actually overlap each other. So strictly speaking there is no need to use more than one row to display these, even in expanded display mode. Do you think that's worth raising as a separate issue?

@jrobinso
Copy link
Contributor

I will look into that as part of this ticket. If you have a small vcf you can share it would save me the trouble of creating one.

@jrobinso
Copy link
Contributor

OK both issues raise here are fixed in igv.js version 2.12.4, and igv-notebook version 0.2.2

@alimanfoo
Copy link
Author

Hi @jrobinso, sorry I missed your comment above to share a small dataset, I'll make sure to do that up front next time. Thank you so much for the quick fix and release, super appreciated. I'm going to be using IGV for teaching next week and so having this simpler view of the SNPs makes the explanation much easier! 🙏

@jrobinso
Copy link
Contributor

No problem, good luck with your course.

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

No branches or pull requests

2 participants