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

igv duplicate sequence tracks in igv is inside tabs #572

Closed
boyangzhao opened this issue Sep 7, 2021 · 0 comments · Fixed by #629
Closed

igv duplicate sequence tracks in igv is inside tabs #572

boyangzhao opened this issue Sep 7, 2021 · 0 comments · Fixed by #629
Assignees

Comments

@boyangzhao
Copy link

boyangzhao commented Sep 7, 2021

python: 3.8
dash: 1.20.0
dash-bio: 0.7.1

Describe the bug
When dashbio Igv is embeded inside a tab and the user switches between tabs. Coming back to the tab where the igv is triggers a reload of the igv module along with addition of duplicate sequence tracks each time the tab is switched. This behavior seem to be happening when tracks are defined. No issue when tracks is blank.

This results in the following (note the duplicate sequence tracks in color),
Screen Shot 2021-09-07 at 5 16 31 PM

To Reproduce
Below is a toy example to reproduce the behavior. I've replaced urls for the vcf with LINK, edit this to refer to an actual file to make the below example work. Same if the tracks were bam alignments, etc.

import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_bio as dashbio

app = dash.Dash(__name__)
app.title = 'test'
app.config['suppress_callback_exceptions'] = True
app.layout = html.Div([
    dcc.Tabs(value='tab1', children=[
        dcc.Tab(id='tab1', value='tab1', label='Tab1', children=[]),
        dcc.Tab(id='tab2', value='tab2', label='Tab2', children=[]),
        dcc.Tab(id='tab3', value='tab3', label='Tab3', children=[
            dashbio.Igv(
                id='igv',
                genome='hg38',
                tracks = [
                    {
                        'type': "variant",
                        'format': "vcf",
                        'url': "LINK",
                        'indexURL': "LINK",
                        'name': "VCF",
                    }
                ]
            ),
        ])
    ]),
])

app.run_server()
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 a pull request may close this issue.

2 participants