@@ -403,39 +403,27 @@ aggregated coverage signal of multiple tracks over multiple sets of genomic rang
403
403
``` {r}
404
404
AC |>
405
405
as_tibble() |>
406
- ggplot(aes(x = coord, y = mean, group = interaction(features, track), col = track) ) +
407
- geom_line ()
406
+ ggplot() +
407
+ geom_aggrcoverage ()
408
408
```
409
409
410
- This plot is way too busy. Let's first split into facets using ` features ` :
410
+ Oopsie, a little busy here . Let's color by tracks and split facets by ` features ` :
411
411
412
412
``` {r}
413
413
AC |>
414
414
as_tibble() |>
415
- ggplot(aes(x = coord, y = mean, col = track)) +
416
- geom_line () +
415
+ ggplot(aes(col = track)) +
416
+ geom_aggrcoverage () +
417
417
facet_grid(features ~ .)
418
418
```
419
419
420
- Better, but what about adding confidence interval for each coverage track:
420
+ Nearly there, few cosmethic changes and we are done!
421
421
422
422
``` {r}
423
423
AC |>
424
424
as_tibble() |>
425
- ggplot(aes(x = coord, y = mean)) +
426
- geom_ribbon(aes(ymin = ci_low, ymax = ci_high, fill = track), alpha = 0.2) +
427
- geom_line(aes(col = track)) +
428
- facet_grid(features ~ .)
429
- ```
430
-
431
- Nearly there, few cosmethic changes and we're done!
432
-
433
- ``` {r}
434
- AC |>
435
- as_tibble() |>
436
- ggplot(aes(x = coord, y = mean)) +
437
- geom_ribbon(aes(ymin = ci_low, ymax = ci_high, fill = track), alpha = 0.2) +
438
- geom_line(aes(col = track)) +
425
+ ggplot(aes(col = track, linetype = track %in% c('RNA_fwd', 'RNA_rev'))) +
426
+ geom_aggrcoverage() +
439
427
facet_grid(features ~ .) +
440
428
labs(x = 'Distance from genomic feature', y = 'Mean coverage (± 95% conf. intervale)') +
441
429
theme_bw() +
@@ -470,9 +458,8 @@ if the `tidySummarizedExperiment` package id loaded.
470
458
471
459
``` {r}
472
460
AC |>
473
- ggplot(aes(x = coord, y = mean)) +
474
- geom_line(aes(col = track)) +
475
- facet_grid(track ~ .) +
461
+ ggplot() +
462
+ geom_aggrcoverage() +
476
463
labs(x = 'Distance from locus of convergent transcription', y = 'Scc1 coverage') +
477
464
theme_bw() +
478
465
theme(legend.position = 'top')
@@ -487,10 +474,8 @@ AC |>
487
474
CoverageExperiment(tracks, features, width = 5000, scale = TRUE, center = TRUE) |>
488
475
filter(track == 'RNA_fwd') |>
489
476
aggregate(bin = 20) |>
490
- ggplot(aes(x = coord, y = mean)) +
491
- geom_ribbon(aes(ymin = ci_low, ymax = ci_high, fill = features), alpha = 0.2) +
492
- geom_line(aes(col = features)) +
493
- facet_grid(features ~ .) +
477
+ ggplot(col = features) +
478
+ geom_aggrcoverage(aes(col = features)) +
494
479
labs(x = 'Distance to center of genomic features', y = 'Forward RNA-seq coverage') +
495
480
theme_bw() +
496
481
theme(legend.position = 'top')
@@ -538,9 +523,8 @@ CoverageExperiment(
538
523
scale = TRUE, center = TRUE
539
524
) |>
540
525
aggregate() |>
541
- ggplot(aes(x = coord, y = mean)) +
542
- geom_ribbon(aes(ymin = ci_low, ymax = ci_high, fill = track), alpha = 0.2) +
543
- geom_line(aes(col = track)) +
526
+ ggplot() +
527
+ geom_aggrcoverage(aes(col = track)) +
544
528
facet_grid(track ~ .) +
545
529
labs(x = 'Distance from TSSs', y = 'Mean coverage') +
546
530
theme_bw() +
@@ -586,9 +570,8 @@ AC |>
586
570
stringr::str_detect(track, 'H3') ~ "H3"
587
571
)
588
572
) |>
589
- ggplot(aes(x = coord, y = mean)) +
590
- geom_ribbon(aes(ymin = ci_low, ymax = ci_high, fill = track), alpha = 0.2) +
591
- geom_line(aes(col = track)) +
573
+ ggplot() +
574
+ geom_aggrcoverage(aes(col = track)) +
592
575
facet_grid(~histone) +
593
576
labs(x = 'Distance from TSSs', y = 'Mean histone PTM coverage') +
594
577
theme_bw() +
0 commit comments