-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpartial-udg-single-stranded.qmd
34 lines (25 loc) · 2.18 KB
/
partial-udg-single-stranded.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Partial UDG (single-stranded)
![Prince Tjorven by Zandra Fagernäs](/assets/images/partial-udg-single-stranded/prince_tjorven.png){#fig-partial-udg-single-stranded-caricature height=400px}
```{r}
#| label: fig-partial-udg-single-stranded
#| fig-cap: Example of a smiley plot of a partial UDG treated single-stranded library, from unpublished data. Damage data generated using [DamageProfiler](/intro.qmd) and plotted using R and tidyverse packages [@Wickham2019-ot]. [DamageProfiler](/intro.qmd) and plotted using R and tidyverse packages [@Wickham2019-ot].
#| echo: false
#| warning: false
#| error: false
library(readr)
library(tidyr)
library(dplyr)
library(ggplot2)
library(patchwork)
source("assets/src/R/style.r")
source("assets/src/R/damage-profiler.r")
type_colours <- type_colours_dp
raw_5p <- readr::read_tsv("assets/data/partial-udg-single-stranded/5p_freq_misincorporations.txt", comment = "#")
raw_3p <- readr::read_tsv("assets/data/partial-udg-single-stranded/3p_freq_misincorporations.txt", comment = "#")
long_5p <- pivot_longer_freqmisincorporat(raw_5p, reverse = FALSE, type_colours = type_colours)
long_3p <- pivot_longer_freqmisincorporat(raw_3p, reverse = TRUE, type_colours = type_colours)
smiley_5p <- plot_longer_freqmisincorporat(long_5p, reverse = FALSE, type_colours)
smiley_3p <- plot_longer_freqmisincorporat(long_3p, reverse = TRUE, type_colours)
smiley_5p + smiley_3p
```
The smiley plot presented here has been generated from a single-stranded 'partial UDG' or 'UDG-half' library. UDG or USER Treatment consists of enzymatically cleaving off ends of molecules when a uracil is present. As with single-stranded non-UDG treated libraries, the C to T pattern is retained at _both_ ends due to the lack of a blunt-ending (i.e. clipping off of 3' overhangs) during the library preparation protocol. Furthermore, as with partial-UDG treated libraries, the USER treatment reaction is not run for the whole time, meaning damage on terminal bases are left. This allows for simultaneous authentication of damage, but makes it easier to then _in silico_ remove damage by 'trimming' off one base from either end of each read, so you can ensure you do not incorporate damaged bases into downstream analyses.