I'm facing the error message Cannot read properties of undefined (reading 'displayName') for some alteration types in the oncoprint plot.
I'm quite convinced my code has worked before, but I can't tell you which version it worked/broke.
I've tried to create a minimal example below:
from dash import dash, html
from dash_bio import OncoPrint
app = dash.Dash(__name__)
app.layout = html.Div(
OncoPrint(
id="oncoprint-plot",
data=[{
'alteration': None,
# When changing below type to 'INFRAME', 'MISSENSE' or 'TRUNC' the oncoprint plot works, but
# any of 'AMP', 'GAIN', 'HETLOSS' or 'HMODEL' breaks the oncoprint plot with the error
'type': 'HMODEL',
'gene': 'TEST',
'sample': 'TEST-sample'
}],
showlegend=False,
showoverview=False,
),
)
if __name__ == '__main__':
app.run_server(debug=True)
I'm using:
Python 3.9.5
Dash version 2.9.3
Plotly version 5.9.0
Apologies, I see now that my input data was incorrectly formatted. I do think the error message can be improved, but the code itself works if the alteration and type are set correctly in the source data
Hi Plotly / Dash,
I'm facing the error message
Cannot read properties of undefined (reading 'displayName')
for some alteration types in the oncoprint plot. I'm quite convinced my code has worked before, but I can't tell you which version it worked/broke.I've tried to create a minimal example below:
I'm using: Python 3.9.5 Dash version 2.9.3 Plotly version 5.9.0