Skip to content
Snippets Groups Projects
Commit fd6175bc authored by Nicolas Barthes's avatar Nicolas Barthes
Browse files

small fixes on 1-samples_selection.py (figs annotations & default number of selected samples)

parent 81edcd36
No related branches found
No related tags found
No related merge requests found
......@@ -313,7 +313,7 @@ elif labels:
#### Strategy 1
case 'random':
selection_number = scores.number_input('How many samples per cluster?',
min_value = 1, step=1, value = round(n_samples*0.1))
min_value = 1, step=1, value = round(n_samples*0.1/ncluster))
s = np.array(labels)[np.where(np.array(labels) !='Non clustered')[0]]
for i in np.unique(s):
C = np.where(np.array(labels) == i)[0]
......@@ -496,7 +496,7 @@ if not spectra.empty:
ann = meta_data.loc[:,'name'][i]
else:
ann = t.index[i]
fig.add_annotation(dict(x = leverage[i], y = residuals[i], showarrow=True, text = ann,font= dict(color= "black", size= 15),
fig.add_annotation(dict(x = leverage[i], y = residuals[i], showarrow=True, text = str(ann),font= dict(color= "black", size= 15),
xanchor = 'auto', yanchor = 'auto'))
fig.update_traces(marker=dict(size= 6), showlegend= True)
......@@ -541,7 +541,7 @@ if not spectra.empty:
ann = meta_data.loc[:,'name'][i]
else:
ann = t.index[i]
fig.add_annotation(dict(x = hotelling[i], y = residuals[i], showarrow=True, text = ann, font= dict(color= "black", size= 15),
fig.add_annotation(dict(x = hotelling[i], y = residuals[i], showarrow=True, text = str(ann), font= dict(color= "black", size= 15),
xanchor = 'auto', yanchor = 'auto'))
fig.update_traces(marker=dict(size= 6), showlegend= True)
......@@ -605,7 +605,7 @@ if not sam.empty:
## generate report
latex_report = report.report('Representative subset selection', data_file.name, dim_red_method,
clus_method, Nb_ech, ncluster, selection, selection_number, nb_clu,tcr, sam)
@st.cache_data
def download_res(file,sam):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment