Arhodomonas.mauve.visualization

This is a script for visualizing a Mauve whole genome alignment more gracefully and with more control over the color schemes by using the genoPlotR package.

Note that in the part of the code that produces the pdf image, control over image height will allow you to make a more space-efficient graphic, without the huge gap between genomes.

#bbone_file <- system.file("../Babu_Kuwait_10_2018_mgenome/mau/alignment14/alignment14.backbone", package="genoPlotR")
bbone <- read_mauve_backbone("../Babu_Kuwait_10_2018_mgenome/mau/alignment14/alignment14.backbone", ref=1)
names <- c("A. aquaeoli","A. BTEX")
names.only <- c("A. aquaeoli","A. BTEX")
names$dna_segs <- names

replace <- bbone[[1]][1] 
#replace[[1]][6] <- "grey"
replace[[1]][6] <-replace[[1]][5]
bbone[[1]][1] <- replace

replace <- bbone[[1]][2] 
#replace[[1]][6] <- "grey"
replace[[1]][6] <-replace[[1]][5]
bbone[[1]][2] <- replace



for (i in 1:length(bbone$comparisons)){
 cmp <- bbone$comparisons[[i]]
 bbone$comparisons[[i]]$length <-
 abs(cmp$end1 - cmp$start1) + abs(cmp$end2 - cmp$start2)
}

pdf("Arhodomonas.mauve.output.2.pdf", height = 2, width = 8)

plot_gene_map(dna_segs=bbone$dna_segs,
 comparisons=bbone$comparisons,
 global_color_scheme=c("length", "increasing", "grey", 0.6),
 override_color_schemes=TRUE,
 dna_seg_labels = names.only)

dev.off()
## quartz_off_screen 
##                 2
plot_gene_map(dna_segs=bbone$dna_segs,
 comparisons=bbone$comparisons,
 global_color_scheme=c("length", "increasing", "grey", 0.6),
 override_color_schemes=TRUE,
 dna_seg_labels = names.only)

RWMurdoch

March 19, 2019