From dcc69921965d9d6f69f3be38c2fc253bbad9c18c Mon Sep 17 00:00:00 2001 From: Anthony Carapetis Date: Wed, 22 Feb 2023 20:16:32 +1100 Subject: [PATCH] Fix error in Manhattan plot for single chromosome When attempting to use ManhattanPlot on data containing a single chromosome, a runtime error is encountered. Seems it was previously reported in #486 but the cause was not determined. From looking at the code, it seems like the `name` parameter was incorrectly included inside the `marker` dict, when it should have been a direct kwarg. --- dash_bio/component_factory/_manhattan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash_bio/component_factory/_manhattan.py b/dash_bio/component_factory/_manhattan.py index aaf49cae2..2d72bc7b6 100644 --- a/dash_bio/component_factory/_manhattan.py +++ b/dash_bio/component_factory/_manhattan.py @@ -527,10 +527,10 @@ def figure( else data[self.pName].values, mode="markers", showlegend=showlegend, + name="Chr%i" % data[self.chrName].unique(), marker={ 'color': col[0], 'size': point_size, - 'name': "chr%i" % data[self.chrName].unique() }, text=hover_text )