Skip to content

Commit 8b7a02e

Browse files
committed
Correct spelling mistakes and improve report style
1 parent 3341aec commit 8b7a02e

2 files changed

Lines changed: 19 additions & 9 deletions

File tree

template.qmd

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ format:
1818
css: config/report.styles.css
1919
editor: visual
2020
params:
21+
ufboot_reps: ""
22+
shalrt_reps: ""
23+
min_ivar_freq: ""
2124
workflow_version: ""
2225
div: ""
2326
freyja: ""
@@ -130,11 +133,12 @@ Samples in the X-axis are ordered chronologically, from more ancient to newer.](
130133
A maximum likelihood tree of the target and context samples has been
131134
built using [IQTREE](http://www.iqtree.org/).
132135
The target samples `r stats[["monophyly"]]` monophyletic. The clade
133-
that contains all the target samples is supported by a **UFBoot** score of
134-
$`r stats[["boot"]]`$% and a **SH-aLRT** score of $`r stats[["alrt"]]`$% (@fig-tree_ml).
136+
that contains all the target samples is supported by a UFBoot score of
137+
$`r stats[["boot"]]`$% and a SH-aLRT score of $`r stats[["alrt"]]`$% (@fig-tree_ml).
135138

136-
![Maximum-likelihood phylogeny with 1000 support replicates of
137-
target datasets and their context samples. The clade that contains the target
139+
![Maximum-likelihood phylogeny with $`r params$ufboot_reps`$ UFBoot
140+
and $`r params$shalrt_reps`$ SH-aLRT support replicates of the
141+
target dataset and its context samples. The clade that contains the target
138142
samples is squared in red.](`r params$tree_ml`){#fig-tree_ml}
139143

140144
### Nucleotide diversity comparison
@@ -160,17 +164,17 @@ target samples.](`r params$div`){#fig-div}
160164

161165
### Number of polymorphic sites
162166

163-
Sites with minor allele frequency > 0.05 are considered polymorphic.
167+
Sites with minor allele frequency $> `r params$min_ivar_freq`$ are considered polymorphic.
164168
The linear association between the collection date of the samples and the number of
165-
polymorphic sites has an $R^2$ of **`r nv.counts[["r2"]]`** and a p-value of
169+
polymorphic sites has an $R^2$ of $`r nv.counts[["r2"]]`$ and a p-value of
166170
$`r nv.counts[["value"]]`$ (@fig-fig_cor_snp).
167171

168172
![Number of polymorphic sites along time. The
169173
blue line shows the linear model fit.](`r params$fig_cor_snp`){#fig-fig_cor_snp}
170174

171175
### Description of intra-host nucleotide variants
172176

173-
A total of `r n_SNV` different single nucleotide variants (SNV) and `r n_INDELS`
177+
A total of $`r n_SNV`$ different single nucleotide variants (SNV) and $`r n_INDELS`$
174178
insertions and deletions (indels) have been detected along the genome (@fig-SNV).
175179

176180
::: {.panel-tabset}
@@ -224,8 +228,8 @@ frequency-weighted distances.](`r params$tree`){#fig-tree}
224228

225229
To estimate the substitution rate, root-to-tip distances measured on the previous
226230
tree (@fig-tree) have been correlated with time, obtaining a $R^2$ of
227-
**`r correlation`** and a p-value of $`r p_value_lm`$. The estimated substitution
228-
rate is **`r sub_rate`** substitutions per year (@fig-tempest).
231+
$`r correlation`$ and a p-value of $`r p_value_lm`$. The estimated substitution
232+
rate is $`r sub_rate`$ substitutions per year (@fig-tempest).
229233

230234
![Scatterplot depicting the relationship between root-to-tip
231235
distances and the number of days passed since the first sample. The red

workflow/rules/report.smk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ rule report:
190190
omega_plot = report(rules.evo_plots.output.plot_omega)
191191
params:
192192
workflow_version = get_repo_version(BASE_PATH.as_posix(), __version__),
193+
min_ivar_freq = config["VC"]["IVAR_FREQ"],
194+
ufboot_reps = config["UFBOOT_REPS"],
195+
shalrt_reps = config["SHALRT_REPS"],
193196
name = config["OUTPUT_NAME"]
194197
output:
195198
html = report(OUTDIR/f"{OUTPUT_NAME}.report.html")
@@ -200,6 +203,9 @@ rule report:
200203
set +o pipefail
201204
Rscript -e 'library(quarto)' -e \"quarto_render(input = '{input.qmd}',\
202205
execute_params=list( \
206+
ufboot_reps='{params.ufboot_reps}',\
207+
shalrt_reps='{params.shalrt_reps}',\
208+
min_ivar_freq='{params.min_ivar_freq}',\
203209
workflow_version='{params.workflow_version}',\
204210
div='{input.diversity}',\
205211
freyja ='{input.freyja}',\

0 commit comments

Comments
 (0)