Skip to content

Commit abe75cd

Browse files
committed
Reword correlation heatmap section
1 parent 147d8cc commit abe75cd

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

template.qmd

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ output-file: report.html
5252
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
5353
</head>
5454

55+
```{r funcs, echo = F, message = F, include = F}
56+
display.num <- function(n) {
57+
sci <- if (n < 1e-3 || n > 1e4) {
58+
sub("e\\+?(-?)(\\d+)", " × 10^{\\1\\2}",
59+
formatC(n, format = "e", digits = 3))
60+
} else {
61+
formatC(n, format = "f", digits = 5)
62+
}
63+
}
64+
```
5565

5666
```{r read, echo = F, message = F, include = F}
5767
library(jsonlite)
@@ -266,19 +276,20 @@ line represents the linear model fit.](`r params$tempest`){#fig-tempest}
266276

267277
### Correlation between alternative alleles
268278

269-
To detect possible interactions between mutations, pairwise correlation between allele
270-
frequencies have been calculated (@fig-heatmap). The heatmap is an interactive figure that allows
271-
zooming in on specific regions.
279+
`r cor.method.name` correlation coefficients of allele frequencies between pairs
280+
of variants were calculated to detect interactions between them (@fig-heatmap).
281+
The heatmap is interactive and allows zooming in on specific regions.
272282

273283
```{r fig-heatmap, echo = F, message = F, warning = F, fig.align = 'center'}
274-
#| fig-cap: "Interactive hierarchically clustered heatmap of the pairwisecorrelation coefficients between the time series of allele frequencies in the case study."
284+
#| fig-cap: "Interactive heatmap with hierarchical clustering of the pairwise correlation coefficients between the time series of allele frequencies in the case study."
275285
276286
heatmaply_cor(
277287
cor.mat,
278288
grid_gap = 0.25,
279289
fontsize_row = 7,
280290
fontsize_col = 7,
281291
column_text_angle = 45,
292+
label_names = c("row", "column", "coefficient"),
282293
width = 600,
283294
height = 600
284295
)

0 commit comments

Comments
 (0)