Skip to content

Commit 7d0e19c

Browse files
Resize glioma slide image in tutorials
Use an @raw html block with width: 30% in the Literate tutorial and a matching width: 50% CSS style on LocalResource in the Pluto tutorial so the slide image scales with the container instead of using a fixed pixel width. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 5551cfc commit 7d0e19c

4 files changed

Lines changed: 20 additions & 16 deletions

File tree

docs/src/tutorials/GliomaGrading.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
# Case [_TCGA-HT-8564_](https://portal.gdc.cancer.gov/cases/f625e522-226b-450f-af94-dd2f5adb605e?filters=%7B%22content%22%3A%5B%7B%22content%22%3A%7B%22field%22%3A%22cases.project.project_id%22%2C%22value%22%3A%5B%22TCGA-LGG%22%5D%7D%2C%22op%22%3A%22in%22%7D%5D%2C%22op%22%3A%22and%22%7D), diagnosis _Astrocytoma, anaplastic_:
66
#
7-
# ![glioma slide](assets/glioma_slide.jpeg)
7+
# ```@raw html
8+
# <img src="assets/glioma_slide.jpeg" alt="glioma slide" style="width: 30%; display: block; margin-left: auto; margin-right: auto;">
9+
# ```
810

911
# ## Theoretical Framework
1012
#

docs/src/tutorials/GliomaGrading.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Gliomas are the most common primary tumors of the brain. They can be graded as L
88

99
Case [_TCGA-HT-8564_](https://portal.gdc.cancer.gov/cases/f625e522-226b-450f-af94-dd2f5adb605e?filters=%7B%22content%22%3A%5B%7B%22content%22%3A%7B%22field%22%3A%22cases.project.project_id%22%2C%22value%22%3A%5B%22TCGA-LGG%22%5D%7D%2C%22op%22%3A%22in%22%7D%5D%2C%22op%22%3A%22and%22%7D), diagnosis _Astrocytoma, anaplastic_:
1010

11-
![glioma slide](assets/glioma_slide.jpeg)
11+
```@raw html
12+
<img src="assets/glioma_slide.jpeg" alt="glioma slide" style="width: 30%; display: block; margin-left: auto; margin-right: auto;">
13+
```
1214

1315
## Theoretical Framework
1416

@@ -185,13 +187,13 @@ We simulate a predictor with the given sensitivity and specificity.
185187

186188
````@example GliomaGrading
187189
function predict(
188-
X;
189-
positive_label = 1,
190-
negative_label = 0,
191-
sensitivity::Float64,
192-
specificity::Float64,
193-
)
194-
y_pred = similar(X, Union{typeof(positive_label),typeof(negative_label)})
190+
X;
191+
positive_label = 1,
192+
negative_label = 0,
193+
sensitivity::Float64,
194+
specificity::Float64,
195+
)
196+
y_pred = similar(X, Union{typeof(positive_label), typeof(negative_label)})
195197
for i in eachindex(X)
196198
if X[i] == positive_label
197199
y_pred[i] = rand() < sensitivity ? positive_label : negative_label
@@ -231,7 +233,7 @@ data_new_feature_typefix = coerce(
231233
Dict(
232234
(
233235
name => Multiclass for
234-
name in [Symbol.(features_mutation); :Grade; :Gender; :Race]
236+
name in [Symbol.(features_mutation); :Grade; :Gender; :Race]
235237
)...,
236238
:digital_pathology => Multiclass,
237239
),
@@ -280,10 +282,8 @@ end
280282
281283
design_new_feature = efficient_designs(experiments_new_feature, perf_eval_new_feature)
282284
283-
design_new_feature_no_feature = efficient_designs(
284-
experiments_new_feature_no_feature,
285-
perf_eval_new_feature_no_feature,
286-
)
285+
design_new_feature_no_feature =
286+
efficient_designs(experiments_new_feature_no_feature, perf_eval_new_feature_no_feature)
287287
288288
p_new_feature = scatter(
289289
map(x -> x[1][1], design_new_feature),

tutorials/GliomaGrading.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
# Case [_TCGA-HT-8564_](https://portal.gdc.cancer.gov/cases/f625e522-226b-450f-af94-dd2f5adb605e?filters=%7B%22content%22%3A%5B%7B%22content%22%3A%7B%22field%22%3A%22cases.project.project_id%22%2C%22value%22%3A%5B%22TCGA-LGG%22%5D%7D%2C%22op%22%3A%22in%22%7D%5D%2C%22op%22%3A%22and%22%7D), diagnosis _Astrocytoma, anaplastic_:
66
#
7-
# ![glioma slide](assets/glioma_slide.jpeg)
7+
# ```@raw html
8+
# <img src="assets/glioma_slide.jpeg" alt="glioma slide" style="width: 30%; display: block; margin-left: auto; margin-right: auto;">
9+
# ```
810

911
# ## Theoretical Framework
1012
#

tutorials/GliomaGrading/GliomaGrading.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ begin
3333
md"""
3434
Case [_TCGA-HT-8564_](https://portal.gdc.cancer.gov/cases/f625e522-226b-450f-af94-dd2f5adb605e?filters=%7B%22content%22%3A%5B%7B%22content%22%3A%7B%22field%22%3A%22cases.project.project_id%22%2C%22value%22%3A%5B%22TCGA-LGG%22%5D%7D%2C%22op%22%3A%22in%22%7D%5D%2C%22op%22%3A%22and%22%7D), Diagnosis _Astrocytoma, anaplastic_:
3535
36-
$(LocalResource("glioma_slide.jpeg", :width => 500, :style => "display: block; margin-left: auto; margin-right: auto;"))
36+
$(LocalResource("glioma_slide.jpeg", :style => "width: 50%; display: block; margin-left: auto; margin-right: auto;"))
3737
"""
3838
end
3939

0 commit comments

Comments
 (0)