vignettes/OxfordPlots.Rmd
OxfordPlots.Rmd
knitr::opts_chunk$set(cache = TRUE,
dev = c('png', 'svg', 'pdf'),
fig.ext= c('png', 'svg', 'pdf'),
fig.width = 15,
fig.height = 15)
This vignette produces alignment line plots of pairs of genomes to illustrate differences in the extent of scrambling in Oikopleura compared to equivalent pairs in other genera.
Figure 1 panel A was generated in this vignette.
library('OikScrambling') |> suppressPackageStartupMessages()
ggplot2::theme_set(theme_bw())
genomes <- OikScrambling:::loadAllGenomes()
## Warning in runHook(".onLoad", env, package.lib, package): input string
## 'Génoscope' cannot be translated from 'ANSI_X3.4-1968' to UTF-8, but is valid
## UTF-8
## Warning in runHook(".onLoad", env, package.lib, package): input string
## 'Génoscope' cannot be translated from 'ANSI_X3.4-1968' to UTF-8, but is valid
## UTF-8
load("BreakPoints.Rdata")
Line plot used for panel A of Figure 1. Is based on aligned regions
(before coalescing), stored in the gbs
object. The manually
set colors are used throughout the manuscript to represent chromosomes 1
and 2, the PAR, the XSR and the YSR.
makeOxfordPlots(gbs$Oki_Osa, diag = FALSE) +
scale_color_manual(values = c("#E78AC3", "#A6D854", "#FFD92F", "#8DA0CB", "#66C2A5")) +
theme_bw() +
theme(legend.position="none")
Same as above, but colored by strand.
makeOxfordPlots(gbs$Oki_Osa, diag = FALSE, col = "strand") + theme(legend.position="none")
makeOxfordPlots(gbs$Oki_Bar, diag = FALSE, col = "strand") + theme(legend.position="none")
makeOxfordPlots(gbs$Oki_Kum, col = "strand") + theme(legend.position="none")
makeOxfordPlots(gbs$Osa_Oki, diag = FALSE, col = "strand") + theme(legend.position="none")
makeOxfordPlots(gbs$Osa_Bar, diag = FALSE, col = "strand") + theme(legend.position="none")
makeOxfordPlots(gbs$Osa_Aom, col = "strand") + theme(legend.position="none")
makeOxfordPlots(gbs$Bar_Oki, diag = FALSE, col = "strand") + theme(legend.position="none")
makeOxfordPlots(gbs$Bar_Osa, diag = FALSE, col = "strand") + theme(legend.position="none")
In these vignettes, the manuscript’s “Bergen” genome is called “Norway”.
Note this plot does not demonstrate, nor rule out, collinearity between the two genomes, because most contigs of the Bergen assembly are too short. Alignment on the diagonal only demonstrates collinearity within a contig, not between.
makeOxfordPlots(gbs$Bar_Nor, col = "strand") + theme(legend.position="none")
makeOxfordPlots(gbs$Ply_Ros, col = "strand") + theme(legend.position="none") + ggtitle("Ciona intestinalis Plymouth vs Roscoff")
makeOxfordPlots(gbs$Ply_Rob, col = "strand") + theme(legend.position="none") + ggtitle("Ciona intestinalis Plymouth vs Ciona robusta")
makeOxfordPlots(gbs$Ply_Sav, col = "strand") + theme(legend.position="none") + ggtitle("Ciona intestinalis Plymouth vs Ciona savignyi")
makeOxfordPlots(gbs$Dme_Dma, col = "strand") + theme(legend.position="none") + ggtitle("Dmel vs Dmau")
makeOxfordPlots(gbs$Dme_Dya, col = "strand") + theme(legend.position="none") + ggtitle("Dmel vs Dyak")
makeOxfordPlots(gbs$Dme_Dsu, col = "strand") + theme(legend.position="none") + ggtitle("Dmel vs Dsub")
makeOxfordPlots(gbs$Dme_Dbu, col = "strand") + theme(legend.position="none") + ggtitle("Dmel vs Dbus")
makeOxfordPlots(gbs$Cbr_Cni, col = "strand") + theme(legend.position="none") + ggtitle("C. briggsae vs C. nigoni")
makeOxfordPlots(gbs$Cbr_Cre, col = "strand") + theme(legend.position="none") + ggtitle("C. briggsae vs C. remanei")
makeOxfordPlots(gbs$Cni_Cre, col = "strand") + theme(legend.position="none") + ggtitle("C. nigoni vs C. remanei")
makeOxfordPlots(gbs$Cbr_Cel, col = "strand") + theme(legend.position="none") + ggtitle("C. briggsae vs C. elegans")
makeOxfordPlots(gbs$Cni_Cin, col = "strand") + theme(legend.position="none") + ggtitle("C. nigoni vs C. inopinata")
Chromosome 18 was chosen because it is small and it has the same name in both species. Region was centered on the alignment with the longest width, as otherwise the window out of target.
Note that each of these chromosomes is longer than any Oikopleura dioica genome.
hgmm <- load_genomic_breaks(system.file(("extdata/hg38_mm10/hg38_chr18__mm10_chr18.gff3"), package = "BreakpointsData"))
makeOxfordPlots(hgmm, col = "strand") + ggtitle("Homo sapiens vs Mus musculus")
Mmun_Mree <- load_genomic_breaks(system.file("extdata/Muntjaks/Rrev_Rmun.07.postmasked.gff.gz", package = "BreakpointsData"), type = "match")
makeOxfordPlots(Mmun_Mree |> swap(), col = "strand") + ggtitle("Muntiacus reevesi vs Muntiacus muntjak")