Skip to content

Commit

Permalink
Correct spelling mistakes and improve report style
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmig committed Jan 8, 2024
1 parent 3341aec commit c735dc4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
22 changes: 13 additions & 9 deletions template.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ format:
css: config/report.styles.css
editor: visual
params:
ufboot_reps: ""
shalrt_reps: ""
min_ivar_freq: ""
workflow_version: ""
div: ""
freyja: ""
Expand Down Expand Up @@ -130,11 +133,12 @@ Samples in the X-axis are ordered chronologically, from more ancient to newer.](
A maximum likelihood tree of the target and context samples has been
built using [IQTREE](http://www.iqtree.org/).
The target samples `r stats[["monophyly"]]` monophyletic. The clade
that contains all the target samples is supported by a **UFBoot** score of
$`r stats[["boot"]]`$% and a **SH-aLRT** score of $`r stats[["alrt"]]`$% (@fig-tree_ml).
that contains all the target samples is supported by a UFBoot score of
$`r stats[["boot"]]`$% and a SH-aLRT score of $`r stats[["alrt"]]`$% (@fig-tree_ml).

![Maximum-likelihood phylogeny with 1000 support replicates of
target datasets and their context samples. The clade that contains the target
![Maximum-likelihood phylogeny with $`r ufboot_replicates`$ UFBoot
and $`r shalrt_replicates`$ SH-aLRT support replicates of the
target dataset and its context samples. The clade that contains the target
samples is squared in red.](`r params$tree_ml`){#fig-tree_ml}

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

### Number of polymorphic sites

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

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

### Description of intra-host nucleotide variants

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

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

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

![Scatterplot depicting the relationship between root-to-tip
distances and the number of days passed since the first sample. The red
Expand Down
6 changes: 6 additions & 0 deletions workflow/rules/report.smk
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ rule report:
omega_plot = report(rules.evo_plots.output.plot_omega)
params:
workflow_version = get_repo_version(BASE_PATH.as_posix(), __version__),
min_ivar_freq = config["VC"]["IVAR_FREQ"],
ufboot_reps = config["UFBOOT_REPS"],
shalrt_reps = config["SHALRT_REPS"],
name = config["OUTPUT_NAME"]
output:
html = report(OUTDIR/f"{OUTPUT_NAME}.report.html")
Expand All @@ -200,6 +203,9 @@ rule report:
set +o pipefail
Rscript -e 'library(quarto)' -e \"quarto_render(input = '{input.qmd}',\
execute_params=list( \
ufboot_reps='{params.ufboot_reps}',\
shalrt_reps='{params.shalrt_reps}',\
min_ivar_freq='{params.min_ivar_freq}',\
workflow_version='{params.workflow_version}',\
div='{input.diversity}',\
freyja ='{input.freyja}',\
Expand Down

0 comments on commit c735dc4

Please sign in to comment.