Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -262,7 +262,7 @@ def labres(column_changer):
|
|
| 262 |
asc_abn_outliers = zscore_df[(zscore_df['people'].str.contains('Cyto'))&(zscore_df['year']==int(df.year.max()))]
|
| 263 |
|
| 264 |
ref_outlier = df[(df['people'].str.contains('Cytol')) & (df['year'] == int(df.year.max()))]
|
| 265 |
-
thy_outlier = df[(df['people'].str.contains('Cytop')) & (df['year'] == int(df.year.max()))]
|
| 266 |
|
| 267 |
# ASCUS & ABNORMAL:
|
| 268 |
|
|
@@ -270,7 +270,7 @@ def labres(column_changer):
|
|
| 270 |
lab_comment_4 = ""
|
| 271 |
if column_changer == col_options[1]:
|
| 272 |
avg_zscore = zscore_eval.get_group('KGYC')['ASC-US/ASC-H ratio(%)'].mean()
|
| 273 |
-
treshold_1 = 90.0 - avg_zscore*1
|
| 274 |
treshold_2 = 10.0 + avg_zscore*1
|
| 275 |
descript = f"**Description:** *ASC-US/ASC-H ratio literature reference value 90% / 10%. Given our average laboratory Z score of {avg_zscore:.2f} the attention threshold is at {treshold_1:.2f}% / {treshold_2:.2f}%.* <br><br>"
|
| 276 |
if column_changer == col_options[2]:
|
|
@@ -468,11 +468,11 @@ def lab_management(year_slider, column_changer):
|
|
| 468 |
return (asclsil_bg* ref_vline * lab_vline * scatter_plot).opts(shared_axes=False)
|
| 469 |
elif column_changer == 'ASC-US/ASC-H ratio(%)' :
|
| 470 |
scatter_plot = scatterdata[scatterdata.people.str.contains('Cyto', na=False)].hvplot.scatter(x=column_changer, y='people', color='black', size=sdot_size,height= sheight,
|
| 471 |
-
xlim=(
|
| 472 |
xformatter='%.1f',ylabel='',xlabel='', tools = [hover_cp]).opts(fontsize = pl_title,fontscale=f_scale_lab,shared_axes=False,toolbar=None, default_tools = [])
|
| 473 |
-
asc_us_goal = hv.VSpan(
|
| 474 |
-
asc_us_bdln = hv.VSpan(
|
| 475 |
-
asc_us_att = hv.VSpan(
|
| 476 |
ascus_bg = (asc_us_goal.opts(color='#ACFFA0', alpha = 0.75)* asc_us_att.opts(color='#B34D93', alpha = 0.9)*\
|
| 477 |
asc_us_bdln.opts(color='#6AB35F', alpha = 0.75))
|
| 478 |
return (ascus_bg* ref_vline * lab_vline*scatter_plot).opts(shared_axes=False)
|
|
@@ -611,7 +611,7 @@ def ascus_rate_overview_ct(ct_select):
|
|
| 611 |
|
| 612 |
return pn.pane.Markdown(f"""
|
| 613 |
## ASC-US/ASC-H ratio Overview:
|
| 614 |
-
**Description:** *ASC-US/ASC-H ratio literature reference value 90%/10%. Given our average laboratory Z score of {avg_zscore:.2f} the attention threshold is at
|
| 615 |
**Result:** {ct_comment} {ct_comment_2}
|
| 616 |
""", sizing_mode ="stretch_width", styles={'font-size': fpx})
|
| 617 |
else:
|
|
|
|
| 262 |
asc_abn_outliers = zscore_df[(zscore_df['people'].str.contains('Cyto'))&(zscore_df['year']==int(df.year.max()))]
|
| 263 |
|
| 264 |
ref_outlier = df[(df['people'].str.contains('Cytol')) & (df['year'] == int(df.year.max()))]
|
| 265 |
+
#thy_outlier = df[(df['people'].str.contains('Cytop')) & (df['year'] == int(df.year.max()))]
|
| 266 |
|
| 267 |
# ASCUS & ABNORMAL:
|
| 268 |
|
|
|
|
| 270 |
lab_comment_4 = ""
|
| 271 |
if column_changer == col_options[1]:
|
| 272 |
avg_zscore = zscore_eval.get_group('KGYC')['ASC-US/ASC-H ratio(%)'].mean()
|
| 273 |
+
treshold_1 = 90.0 - avg_zscore*1 #Ezeket a küszöbértékeket a lab átlagból és a referencia értékből számolja, így a kenézyre 83/17% jött ki attention zone-ra
|
| 274 |
treshold_2 = 10.0 + avg_zscore*1
|
| 275 |
descript = f"**Description:** *ASC-US/ASC-H ratio literature reference value 90% / 10%. Given our average laboratory Z score of {avg_zscore:.2f} the attention threshold is at {treshold_1:.2f}% / {treshold_2:.2f}%.* <br><br>"
|
| 276 |
if column_changer == col_options[2]:
|
|
|
|
| 468 |
return (asclsil_bg* ref_vline * lab_vline * scatter_plot).opts(shared_axes=False)
|
| 469 |
elif column_changer == 'ASC-US/ASC-H ratio(%)' :
|
| 470 |
scatter_plot = scatterdata[scatterdata.people.str.contains('Cyto', na=False)].hvplot.scatter(x=column_changer, y='people', color='black', size=sdot_size,height= sheight,
|
| 471 |
+
xlim=(17,100), xticks = [min_x,lab,ref, max_x], rot=45, grid=True, title=column_changer,
|
| 472 |
xformatter='%.1f',ylabel='',xlabel='', tools = [hover_cp]).opts(fontsize = pl_title,fontscale=f_scale_lab,shared_axes=False,toolbar=None, default_tools = [])
|
| 473 |
+
asc_us_goal = hv.VSpan(90, 100).opts(shared_axes=False,toolbar=None, default_tools = []) #Ezt esetleg meg lehet változtatni a labor tresholdra, de akkor túlságosan összetolódna a graph
|
| 474 |
+
asc_us_bdln = hv.VSpan(83,90).opts(shared_axes=False,toolbar=None, default_tools = [])
|
| 475 |
+
asc_us_att = hv.VSpan(17, 83).opts(shared_axes=False,toolbar=None, default_tools = [])
|
| 476 |
ascus_bg = (asc_us_goal.opts(color='#ACFFA0', alpha = 0.75)* asc_us_att.opts(color='#B34D93', alpha = 0.9)*\
|
| 477 |
asc_us_bdln.opts(color='#6AB35F', alpha = 0.75))
|
| 478 |
return (ascus_bg* ref_vline * lab_vline*scatter_plot).opts(shared_axes=False)
|
|
|
|
| 611 |
|
| 612 |
return pn.pane.Markdown(f"""
|
| 613 |
## ASC-US/ASC-H ratio Overview:
|
| 614 |
+
**Description:** *ASC-US/ASC-H ratio literature reference value 90%/10%. Given our average laboratory Z score of {avg_zscore:.2f} the attention threshold is at 82.85%/17.15%.*<br><br>
|
| 615 |
**Result:** {ct_comment} {ct_comment_2}
|
| 616 |
""", sizing_mode ="stretch_width", styles={'font-size': fpx})
|
| 617 |
else:
|