From d57c66e23e55319585621a723ac61089ce54c0b5 Mon Sep 17 00:00:00 2001 From: casperlk <39996518+casperlk@users.noreply.github.com> Date: Wed, 29 May 2024 17:08:12 -0400 Subject: [PATCH] adjusts key for compare_mutation_profiles --- cloudbuild.yaml | 4 ++-- seismic_graph/plotter.py | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 353ac3a..0206924 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,4 +1,4 @@ steps: - name: 'gcr.io/cloud-builders/docker' - args: ['build', '-t', 'gcr.io/$PROJECT_ID/draw-base-image:0.20', '.'] -images: ['gcr.io/$PROJECT_ID/draw-base-image:0.20'] \ No newline at end of file + args: ['build', '-t', 'gcr.io/$PROJECT_ID/draw-base-image:0.22', '.'] +images: ['gcr.io/$PROJECT_ID/draw-base-image:0.22'] \ No newline at end of file diff --git a/seismic_graph/plotter.py b/seismic_graph/plotter.py index b2eccae..f314726 100644 --- a/seismic_graph/plotter.py +++ b/seismic_graph/plotter.py @@ -546,7 +546,7 @@ def compare_mutation_profiles(data, table:LinFitTable, normalize=False, max_plot model = LinearRegression() model.fit(x.reshape(-1,1), y) slope, intercept, r_value = model.coef_[0], model.intercept_, model.score(x.reshape(-1,1), y) - fig.add_trace(go.Scatter(x=np.linspace(0, maxValue), y=slope*np.linspace(0, maxValue)+intercept, mode='lines', name='linear regression: y = {}x + {}'.format(round(slope,4), round(intercept,4)), visible=False)) + fig.add_trace(go.Scatter(x=np.linspace(0, maxValue), y=slope*np.linspace(0, maxValue)+intercept, mode='lines', name='linear regression:
y = {}x + {}'.format(round(slope,4), round(intercept,4)), visible=False)) traceTrack.append(plotLabel) # 1:1 line @@ -585,10 +585,11 @@ def compare_mutation_profiles(data, table:LinFitTable, normalize=False, max_plot ) for idx, plot in enumerate(np.unique(traceTrack)) ]), - x=1, - y=0.4, - xanchor='left', + x=0.5, + y=-0.2, + xanchor='center', yanchor='top', + direction='up' ) ], )