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

Small bug in dash-bio/dash_bio/component_factory/_manhattan.py #720

Open
jonpey opened this issue Dec 30, 2022 · 1 comment
Open

Small bug in dash-bio/dash_bio/component_factory/_manhattan.py #720

jonpey opened this issue Dec 30, 2022 · 1 comment

Comments

@jonpey
Copy link

jonpey commented Dec 30, 2022

Dear all,

I would like to report a small bug in the "dash-bio/dash_bio/component_factory/_manhattan.py" function:

In particular, the non-highlighted genes show some inconsistencies in the hovers (e.g.the printed name). A very direct way to spot this error is by checking the hover of the first gene of each chromosome, if this is not "highlighted", it will always be the same, from the example in https://plotly.com/python/manhattan-plot/

Chromosome 1:
image

Chromosome 3:

image

As far as I can see, there might be a small bug in the code. Particularly, lines 568-573 includes the following code, it looks like the "data" should be indeed substituted by "tmp":

hover_text = _get_hover_text( data, snpname=self.snpName, genename=self.geneName, annotationname=self.annotationName )

My proposal here is to replace data by tmp, as shown when defining the hover for highlighted genes (lines 470-475):

highlight_hover_text = _get_hover_text( tmp, snpname=self.snpName, genename=self.geneName, annotationname=self.annotationName )

Thanks in advance,

@martian-yan
Copy link

I noticed this bug as well. It seems all the non-highlighted plots are showing the hover text from the data in CHR 1.
Thanks for the solution!

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