Commit 98feb7e4 authored by Gael  MILLOT's avatar Gael MILLOT
Browse files

release v8.5.0: Some figures corrected, computations of number of insertions...

release v8.5.0: Some figures corrected, computations of number of insertions also and the duplicated part is now ok
parent eda59ee5
......@@ -209,6 +209,11 @@ Gitlab developers
## WHAT'S NEW IN
### v8.5.0
1) Some figures corrected, computations of number of insertions also and the duplicated part is now ok
### v8.4.0
1) Same bug fixed elsewhere
......
......@@ -464,6 +464,47 @@ if(ncol(selected_freq) > 0){
}
# histogram: insertion_number / site_number
text.size <- 24
title.text.size <- 22
png(filename = paste0("plot_", file_name, "_insertion_hist_tot_selected.png"), width = 5000, height = 1800, units = "px", res = 300)
tempo1 <- table(freq$freq)
tempo2 <- names(tempo1)
names(tempo1) <- NULL
tempo3 <- data.frame(insertion_number = as.integer(tempo2), site_number = as.vector(tempo1))
if(ncol(freq) > 0){
fun_gg_scatter(
data1 = tempo3, # res # res[res$KIND == "obs.freq", ]
x = "insertion_number",
y = "site_number",
categ = NULL,
geom = "geom_stick",
geom.stick.base = 0,
line.size = 3,
color = fun_gg_palette(n = 7, kind = "dark")[6], # fun_gg_palette(n = 2) # fun_gg_palette(n = 2)[1]
legend.width = 0,
title = "TOTAL",
x.lab = "Insertion number",
x.left.extra.margin = 0.05,
y.top.extra.margin = 0.05,
y.bottom.extra.margin = 0,
x.right.extra.margin = 0.05,
x.second.tick.nb = NULL,
y.lab = "Site number",
x.log = "log10",
y.log = "log10",
y.second.tick.nb = 5,
text.size = text.size,
title.text.size = title.text.size
)
}else{
fun_gg_empty_graph(text = "EMPTY .freq FILE: NO PLOT DRAWN")
}
invisible(dev.off())
############ end plotting
......
......@@ -375,12 +375,12 @@ fun_report(data = paste0("\nNUMBER OF OBS POSITIONS:\n", format(nrow(obs), big.m
# saving position file
# freq file
res <- aggregate(x = obs$Position, by = list(Sequence = obs$Sequence, Position = obs$Position, names = obs$names, fork = obs$fork, orient = obs$orient), FUN = length)
names(res)[names(res) == "x"] <- "freq"
res.ini <- res
if( ! grepl(x = file_name, pattern = "^.*nodup.*$")){
if( ! grepl(x = file_name, pattern = "^.*nodup.*$")){ # selection of the highest insertion usage sites
if(nb_max_insertion_sites > nrow(res)){
res <- res[order(res$freq, decreasing = TRUE)[1:nrow(res)], ]
tempo.cat <- paste0("\nWARNING: nb_max_insertion_sites PARAMETER IS GREATER THAN THE NUMBER OF DIFFERENT SITES: \n", format(nrow(res), big.mark=","))
......@@ -394,23 +394,14 @@ if( ! grepl(x = file_name, pattern = "^.*nodup.*$")){
options(scipen = 1000)
write.table(res, file = paste0("./", file_name, "_annot_selected.freq"), row.names = FALSE, col.names = TRUE, append = FALSE, quote = FALSE, sep = "\t") # if duplicated -> selected data for highest usage # file for plotting selection insertion sites in duplicated reads
options(scipen = 0)
obs.ini <- obs.ini[obs.ini[ , 2] %in% res$Position, ] # obs.ini[ , 2] because no column names
}else{
write.table(NULL, file = paste0("./", file_name, "_annot_selected.freq"), row.names = FALSE, col.names = TRUE, append = FALSE, quote = FALSE, sep = "\t")
}
options(scipen = 1000) # to avoid writing of scientific numbers in tables, see https://stackoverflow.com/questions/3978266/number-format-writing-1e-5-instead-of-0-00001
write.table(res.ini, file = paste0("./", file_name, "_annot.freq"), row.names = FALSE, col.names = TRUE, append = FALSE, quote = FALSE, sep = "\t") # if duplicated -> non selected data for highest usage # file for plotting all the insertion sites in duplicated and non duplicated reads
options(scipen = 0)
if( ! grepl(x = file_name, pattern = "^.*nodup.*$")){ # selection of the highest insertion usage sites
obs.ini <- obs.ini[obs.ini[ , 2] %in% res$Position, ] # obs.ini[ , 2] because no column names
}
options(scipen = 1000) # to avoid writing of scientific numbers in tables, see https://stackoverflow.com/questions/3978266/number-format-writing-1e-5-instead-of-0-00001
write.table(obs, file = paste0("./", file_name, "_annot.pos"), row.names = FALSE, col.names = TRUE, append = FALSE, quote = FALSE, sep = "\t") # if duplicated -> non selected data for highest usage # annotated file, just for line number computation (i.e., nb of insertion events) and also of random events
options(scipen = 0)
options(scipen = 1000)
write.table(obs.ini, file = paste0("./", file_name, "_selected_if_dup.pos"), row.names = FALSE, col.names = FALSE, append = FALSE, quote = FALSE, sep = "\t") # if duplicated -> selected data for highest usage # non annotated file, for sequence extractions
options(scipen = 0)
......
......@@ -130,6 +130,7 @@ rm(tempo.cat)
################################ end Test
################################ Recording of the initial parameters
......@@ -488,7 +489,7 @@ obs.rd.freq$orient <- toupper(obs.rd.freq$orient)
names(obs.rd.pos)[names(obs.rd.pos) == "Sequence"] <- "KIND"
obs.rd.pos$KIND <- toupper(obs.rd.pos$KIND)
obs.rd.pos$orient <- toupper(obs.rd.pos$orient)
obs.pos <- obs.rd.pos[obs.rd.pos$KIND == "OBS", ]
tss$orient <- toupper(tss$orient)
cds[ , 6] <- toupper(cds[ , 6] )
......@@ -497,6 +498,7 @@ tempo <- max(obs.rd.freq$freq) + 20
ori.freq <- data.frame(x= c(ori_coord[1], ori_coord[1], ori_coord[2], ori_coord[2], ori_coord[1]), y = c(-tempo, tempo, tempo, -tempo ,-tempo), ZONE = "Ori", stringsAsFactors = TRUE)
dif.freq <- data.frame(x= c(ter_coord[1], ter_coord[1], ter_coord[2], ter_coord[2], ter_coord[1]), y = c(-tempo, tempo, tempo, -tempo ,-tempo), ZONE = "Ter", stringsAsFactors = TRUE)
structure.freq <- rbind(ori.freq, dif.freq, stringsAsFactors = TRUE)
obs.freq <- obs.rd.freq[obs.rd.freq$KIND == "OBS", ]
......@@ -1129,6 +1131,9 @@ if(tss_path != "NULL"){
fun_report(data = "\n\n################ CDS\n\n", output = log, path = "./", overwrite = FALSE)
final <- obs.rd.pos
fun_report(data = paste0("NUMBER OF ROWS IN THE final OBJECT:", nrow(final)), output = log, path = "./", overwrite = FALSE)
fun_report(data = "TABLE OF THE final$KIND:", output = log, path = "./", overwrite = FALSE)
fun_report(data = addmargins(table(final$KIND)), output = log, path = "./", overwrite = FALSE)
ess <- ess.ini
fun_report(data = "cds OBJECT (HEAD):", output = log, path = "./", overwrite = FALSE)
......@@ -1366,16 +1371,17 @@ if(tss_path != "NULL"){
fun_report(data = paste0("\n\nCHECK ON THE OBSERVED DATA ONLY:\n\n"), output = log, path = "./", overwrite = FALSE)
obs <- inside.gene[inside.gene$KIND == "OBS", ]
fun_report(data = paste0("\n\nNUMBER OF ROWS FOR obs[obs$cds.nb == 1, ]: ", nrow(obs[obs$cds.nb == 1, ])), output = log, path = "./", overwrite = FALSE)
fun_report(data = paste0("\n\nNUMBER OF ROWS FOR nrow(obs[obs$cds.nb == 1, ]) + nrow(outside.gene): ", nrow(obs[obs$cds.nb == 1, ]) + nrow(outside.gene)), output = log, path = "./", overwrite = FALSE)
fun_report(data = paste0("\n\nNUMBER OF GENES WITH THE 1, 2, ETC., INSERTIONS (obs[obs$cds.nb == 1, ]): ", nrow(obs[obs$cds.nb == 1, ])), output = log, path = "./", overwrite = FALSE)
fun_report(data = paste0("\n\nNb of insertion must be identical to above (nrow(obs[obs$cds.nb == 1, ]) + nrow(outside.gene): ", nrow(obs[obs$cds.nb == 1, ]) + nrow(outside.gene)), output = log, path = "./", overwrite = FALSE)
fun_report(data = paste0("\n\nUSE obs[obs$cds.nb == 1, ] AND SAY 'NUMBER OF INSERTION IN AT LEAST ONE GENE'\n\n"), output = log, path = "./", overwrite = FALSE)
fun_report(data = "CONTINGENCY OF obs$cds.nb:", output = log, path = "./", overwrite = FALSE)
fun_report(data = "Nb of insertions in two genes or more (obs$cds.nb):", output = log, path = "./", overwrite = FALSE)
fun_report(data = addmargins(table(obs$cds.nb)), output = log, path = "./", overwrite = FALSE) # nb of insertions in two genes or more
fun_report(data = "CONTINGENCY OF unique(obs)$cds.nb):", output = log, path = "./", overwrite = FALSE)
fun_report(data = "Nb of insertions in two genes or more, without insertion position duplicates (unique(obs)$cds.nb)):", output = log, path = "./", overwrite = FALSE)
fun_report(data = addmargins(table(unique(obs)$cds.nb)), output = log, path = "./", overwrite = FALSE) # nb of insertions in two genes or more, without insertion position duplicates
# Essential genes insertion
ess2 <- obs[obs$essential == "TRUE", ]
ess2 <- data.frame(ess2, gene_orient = paste0(ess2$gene, "_", ess2$cds.orient))
......@@ -1403,9 +1409,9 @@ if(tss_path != "NULL"){
# res$KIND[res$KIND == "random"] <- "RANDOM"
fun_report(data = paste0("\n\nres (inside.gene.pos_prop.txt) FILE HEAD:"), output = log, path = "./", overwrite = FALSE)
fun_report(data = head(res), output = log, path = "./", overwrite = FALSE)
fun_report(data = paste0("\n\nres (inside.gene.pos_prop.txt) INFO:"), output = log, path = "./", overwrite = FALSE)
fun_report(data = paste0("\n\nres (inside.gene.pos_prop.txt) INFO:"), output = log, path = "./", overwrite = FALSE)
fun_report(data = fun_info(res, 20), output = log, path = "./", overwrite = FALSE)
fun_report(data = paste0("\n\naddmargins(table(res$essential[res$KIND == 'OBS'])):"), output = log, path = "./", overwrite = FALSE)
fun_report(data = paste0("\n\naddmargins(table(res$essential[res$KIND == 'OBS'])):"), output = log, path = "./", overwrite = FALSE)
fun_report(data = addmargins(table(res$essential[res$KIND == "OBS"])), output = log, path = "./", overwrite = FALSE) # nb of insertions in genes
......@@ -1447,8 +1453,6 @@ if(tss_path != "NULL"){
files <- c("inside.gene.pos_prop", "outside.gene")
site <- c("INSIDE", "OUTSIDE")
type <- c("EXPERIMENTAL", "RANDOM")
gene2 <- c("ESSENTIAL", "DISPENSABLE")
ylim <- c(0, 4e5)
......@@ -1478,15 +1482,11 @@ if(tss_path != "NULL"){
rd.outside.nb <- sum(res$type == "RANDOM" & res$site == "OUTSIDE")
rd.inside.nb <- sum(res$type == "RANDOM" & res$site == "INSIDE")
# tests
res <- as.data.frame(lapply(res, FUN = factor))
fun_report(data = paste0("\n\nfun_info(res):\n"), output = log, path = "./", overwrite = FALSE)
fun_report(data = fun_info(res, 20), output = log, path = "./", overwrite = FALSE)
for(i0 in 1:length(col.name)){
tempo <- table(res[col.name[i0]])
......@@ -1509,10 +1509,12 @@ if(tss_path != "NULL"){
fun_report(data = addmargins(table(res[, c("site", "essential")])), output = log, path = "./", overwrite = FALSE)
fun_report(data = "addmargins(table(res[, c('type', 'complete')]))", output = log, path = "./", overwrite = FALSE)
fun_report(data = addmargins(table(res[, c("type", "complete")])), output = log, path = "./", overwrite = FALSE)
# plots insertion count
png(filename = paste0("barplot_", file_name, "_all.png"), width = 5000, height = 1800, units = "px", res = 300)
n.obs.res <- length(res$type[res$type == "OBS"])
n.rd.res <- length(res$type[res$type == "OBS"])
n.rd.res <- length(res$type[res$type == "RANDOM"])
library(ggplot2)
tempo.gg.name <- "gg.indiv.plot."
tempo.gg.count <- 0
......@@ -1522,12 +1524,57 @@ if(tss_path != "NULL"){
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::ggtitle(paste0("INSERTION SITE COUNT | n.obs = ", format(n.obs.res, big.mark = ","), " | n.random = ", format(n.rd.res, big.mark = ","))))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::xlab(""))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::ylab("Frequency"))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::annotate(geom = "text", x = tempo$x, y = tempo$y, label = format(tempo$count, big.mark = ","), size = annotate.text.size / 2, hjust = 0.5, vjust = 0.5, angle = 90))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_y_continuous(expand = c(0, 0), oob = scales::rescale_none))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::annotate(geom = "text", x = tempo$x, y = tempo$y, label = format(tempo$count, big.mark = ","), size = annotate.text.size, hjust = 0, vjust = 0.5, angle = 90))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_y_continuous(expand = c(0, 0), oob = scales::rescale_none, limits = c(0, max(tempo$count) * 1.5)))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::theme(text = element_text(size = text.size), plot.title = element_text(hjust = 0, size = title.text.size), axis.line.x = element_line(color="black"), axis.text.x = element_text(angle = 45, hjust = 1), axis.line.y = element_line(color="black"), axis.ticks.x=element_blank(), panel.grid.major.x = element_blank(), panel.grid.major.y = element_line(color ="grey"), panel.grid.minor.x = element_blank(), panel.grid.minor.y = element_blank(), panel.background = element_blank()))
print(eval(parse(text = paste(paste0(tempo.gg.name, 1:tempo.gg.count), collapse = " + "))))
invisible(dev.off())
# computation of the number of insertions in several genes
tempo1 <- obs[obs$cds.nb > 1, ]
tempo2 <- obs[obs$Position %in% tempo1$Position, ]
fun_report(data = paste0("INSERTION POSITIONS INSIDE MORE THAN ONE GENE (THIS SHOULD BE TWICE MORE LINES THAN ", format(n.obs.res, big.mark = ","), " - ", format(tempo.n.obs, big.mark = ","), " = ", format(n.obs.res - tempo.n.obs, big.mark = ","), ")"), output = log, path = "./", overwrite = FALSE)
fun_report(data = tempo2, output = log, path = "./", overwrite = FALSE)
# end computation of the number of insertions in several genes
# plots normalized
res1 <- aggregate(res$complete, list(complete = res$complete, type = res$type), length)
fun_report(data = "NUMBER OF INSERTIONS IN res$complete (res1 FILE):", output = log, path = "./", overwrite = FALSE)
fun_report(data = res1, output = log, path = "./", overwrite = FALSE) # count
sum.obs <- sum(res1$x[res1$type == "OBS"]) # 398142
sum.rd <- sum(res1$x[res1$type == "RANDOM"]) # 399696
# normalisation
# normalization according to genome proportions (inactivated)
# res1$x[res1$type == "OBS" & grepl(x = res1$complete, pattern = "INSIDE")] <- (res1$x[res1$type == "OBS" & grepl(x = res1$complete, pattern = "INSIDE")] / sum.obs) / prop_coding_genome # the first division is to have the proportion. The second is to have relative to the proportion of the coding genome
# res1$x[res1$type == "OBS" & grepl(x = res1$complete, pattern = "OUTSIDE")] <- (res1$x[res1$type == "OBS" & grepl(x = res1$complete, pattern = "OUTSIDE")] / sum.obs) / (1 - prop_coding_genome)
# res1$x[res1$type == "RANDOM" & grepl(x = res1$complete, pattern = "INSIDE")] <- (res1$x[res1$type == "RANDOM" & grepl(x = res1$complete, pattern = "INSIDE")] / sum.rd) / prop_coding_genome
# res1$x[res1$type == "RANDOM" & grepl(x = res1$complete, pattern = "OUTSIDE")] <- (res1$x[res1$type == "RANDOM" & grepl(x = res1$complete, pattern = "OUTSIDE")] / sum.rd) / (1 - prop_coding_genome)
# res1$complete <- as.character(res1$complete)
# end of normalization according to genome proportions
res1$x[res1$type == "OBS"] <- (res1$x[res1$type == "OBS"] / sum.obs)
res1$x[res1$type == "RANDOM"] <- (res1$x[res1$type == "RANDOM"] / sum.rd)
res1$complete <- as.character(res1$complete)
res1$type <- as.character(res1$type)
fun_report(data = "PROPORTION OF INSERTIONS IN EACH OBS OR RANDOM CATEG:", output = log, path = "./", overwrite = FALSE)
fun_report(data = res1, output = log, path = "./", overwrite = FALSE) # normalization by the proportion of the coding genome (0.88 or 0.12), equivalent to the proba that insertion fall into inside or outside according to the inside and outside avalaible
png(filename = paste0("barplot_", file_name, "_all_relative.png"), width = 5000, height = 1800, units = "px", res = 300)
tempo.gg.name <- "gg.indiv.plot."
tempo.gg.count <- 0
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::ggplot(data = res1, mapping = aes(x = complete, y = x, fill = type))) # fill because this is what is used with geom_bar
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::geom_col(position = ggplot2::position_dodge(width = NULL), color = "black", width = 0.5))
tempo <- ggplot2::ggplot_build(eval(parse(text = paste(paste0(tempo.gg.name, 1:tempo.gg.count), collapse = " + "))))$data[[1]]
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::ggtitle(paste0("PROPORTION OF INSERTIONS IN EACH OBS OR RANDOM CATEG")))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::annotate(geom = "text", x = tempo$x, y = tempo$y, label = format(round(tempo$y, 2), big.mark = ","), size = annotate.text.size, hjust = 0, vjust = 0.5, angle = 90))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_y_continuous(expand = c(0, 0), oob = scales::rescale_none, limits = c(0, 1.5)))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::theme(text = element_text(size = text.size), plot.title = element_text(hjust = 0, size = title.text.size), axis.line.x = element_line(color="black"), axis.text.x = element_text(angle = 45, hjust = 1), axis.line.y = element_line(color="black"), axis.ticks.x=element_blank(), panel.grid.major.x = element_blank(), panel.grid.major.y = element_line(color ="grey"), panel.grid.minor.x = element_blank(), panel.grid.minor.y = element_blank(), panel.background = element_blank()))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::xlab(""))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::ylab("Proportion of insertion"))
print(eval(parse(text = paste(paste0(tempo.gg.name, 1:tempo.gg.count), collapse = " + "))))
invisible(dev.off())
# plots normalized prop inside / outside CDS
res2 <- aggregate(res$site, list(site = res$site, type = res$type), length)
fun_report(data = "NUMBER OF INSERTIONS IN res$sites (res2 FILE):", output = log, path = "./", overwrite = FALSE)
......@@ -1557,7 +1604,7 @@ if(tss_path != "NULL"){
tempo <- ggplot2::ggplot_build(eval(parse(text = paste(paste0(tempo.gg.name, 1:tempo.gg.count), collapse = " + "))))$data[[1]]
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::ggtitle(paste0("NORMALIZED PROP (INSIDE / OUTSIDE CDS)\nUSING THE THEORETICAL PROP OF THE GENOME: ", paste0(round(c(prop_coding_genome, 1 - prop_coding_genome), 3), collapse = " "), "\nAND USING THE MAX PROP VALUE (", tempo.max, ") -> 1")))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::annotate(geom = "text", x = tempo$x, y = tempo$y, label = format(round(tempo$y, 2), big.mark = ","), size = annotate.text.size, hjust = 0, vjust = 0.5, angle = 90))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_y_continuous(expand = c(0, 0), oob = scales::rescale_none, limits = c(0, 1.2)))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_y_continuous(expand = c(0, 0), oob = scales::rescale_none, limits = c(0, 1.5)))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::theme(text = element_text(size = text.size), plot.title = element_text(hjust = 0, size = title.text.size), axis.line.x = element_line(color="black"), axis.text.x = element_text(angle = 45, hjust = 1), axis.line.y = element_line(color="black"), axis.ticks.x=element_blank(), panel.grid.major.x = element_blank(), panel.grid.major.y = element_line(color ="grey"), panel.grid.minor.x = element_blank(), panel.grid.minor.y = element_blank(), panel.background = element_blank()))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::xlab(""))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::ylab("Proportion of insertion\nrelative to\ncorresponding available genome"))
......@@ -1593,7 +1640,7 @@ if(tss_path != "NULL"){
tempo <- ggplot2::ggplot_build(eval(parse(text = paste(paste0(tempo.gg.name, 1:tempo.gg.count), collapse = " + "))))$data[[1]]
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::ggtitle(paste0("NORMALIZED PROP (ESSENTIAL / DISPENSABLE CDS)\nUSING THE THEORETICAL PROP OF THE GENOME: ", paste0(round(c(prop_ess_coding_genome, 1 - prop_ess_coding_genome), 3), collapse = " "), "\nAND USING THE MAX PROP VALUE (", tempo.max, ") -> 1")))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::annotate(geom = "text", x = tempo$x, y = tempo$y, label = format(round(tempo$y, 2), big.mark = ","), size = annotate.text.size, hjust = 0, vjust = 0.5, angle = 90))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_y_continuous(expand = c(0, 0), oob = scales::rescale_none, limits = c(0, 1.2)))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_y_continuous(expand = c(0, 0), oob = scales::rescale_none, limits = c(0, 1.5)))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::theme(text = element_text(size = text.size), plot.title = element_text(hjust = 0, size = title.text.size), axis.line.x = element_line(color="black"), axis.text.x = element_text(angle = 45, hjust = 1), axis.line.y = element_line(color="black"), axis.ticks.x=element_blank(), panel.grid.major.x = element_blank(), panel.grid.major.y = element_line(color ="grey"), panel.grid.minor.x = element_blank(), panel.grid.minor.y = element_blank(), panel.background = element_blank()))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::xlab(""))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::ylab("Proportion of insertion\nrelative to\ncorresponding available genome"))
......
......@@ -572,7 +572,7 @@ tempo <- ggplot2::ggplot_build(eval(parse(text = paste(paste0(tempo.gg.name, 1:t
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::ggtitle("INSERTION SITE COUNT"))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::annotate(geom = "text", x = tempo$x, y = tempo$y, label = format(tempo$count, big.mark = ","), size = 6, hjust = 0, vjust = 0.5, angle = 90))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_y_continuous(expand = c(0, 0), oob = scales::rescale_none, limits = c(0, max(tempo$count) * 1.2)))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::theme(text = element_text(size = 20), plot.title = element_text(hjust = 0, size = 12), axis.line.x = element_line(color="black"), axis.line.y = element_line(color="black"), axis.ticks.x=element_blank(), panel.grid.major.x = element_blank(), panel.grid.major.y = element_line(color ="grey"), panel.grid.minor.x = element_blank(), panel.grid.minor.y = element_blank(), panel.background = element_blank()))
assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::theme(text = element_text(size = 20), plot.title = element_text(hjust = 0, size = 12), axis.line.x = element_line(color="black"), axis.line.y = element_line(color="black"), axis.text.x = element_text(angle = 45, hjust = 1), axis.ticks.x=element_blank(), panel.grid.major.x = element_blank(), panel.grid.major.y = element_line(color ="grey"), panel.grid.minor.x = element_blank(), panel.grid.minor.y = element_blank(), panel.background = element_blank()))
eval(parse(text = paste(paste0(tempo.gg.name, 1:tempo.gg.count), collapse = " + ")))
options(sci.pen = 0)
......
A 89.00000 143.00000 149.00000 83.00000 84.00000 168.00000 63.00000 105.00000 107.00000 98.00000 172.00000 425.00000 285.00000 136.00000 209.00000 102.00000 117.00000 192.00000 253.00000 0.00000 163.00000 0.00000 350.00000 247.00000 158.00000 90.00000 248.00000 71.00000 102.00000 172.00000 85.00000 100.00000 185.00000 173.00000 96.00000 173.00000 85.00000 134.00000 122.00000 82.00000
C 180.00000 190.00000 106.00000 145.00000 166.00000 156.00000 169.00000 130.00000 92.00000 111.00000 76.00000 39.00000 105.00000 263.00000 79.00000 210.00000 102.00000 70.00000 142.00000 0.00000 13.00000 0.00000 111.00000 59.00000 178.00000 284.00000 95.00000 83.00000 311.00000 84.00000 158.00000 213.00000 93.00000 130.00000 177.00000 113.00000 230.00000 131.00000 156.00000 214.00000
G 112.00000 127.00000 112.00000 179.00000 174.00000 122.00000 195.00000 212.00000 132.00000 55.00000 107.00000 33.00000 21.00000 55.00000 121.00000 117.00000 211.00000 198.00000 19.00000 541.00000 6.00000 0.00000 64.00000 41.00000 110.00000 81.00000 142.00000 204.00000 58.00000 190.00000 124.00000 155.00000 120.00000 113.00000 139.00000 143.00000 102.00000 131.00000 127.00000 122.00000
T 160.00000 81.00000 174.00000 134.00000 117.00000 95.00000 114.00000 94.00000 210.00000 277.00000 186.00000 44.00000 130.00000 87.00000 132.00000 112.00000 111.00000 81.00000 127.00000 0.00000 359.00000 541.00000 16.00000 194.00000 95.00000 86.00000 56.00000 183.00000 70.00000 95.00000 174.00000 73.00000 143.00000 125.00000 129.00000 112.00000 124.00000 145.00000 136.00000 123.00000
Other 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
A 108.00000 113.00000 108.00000 87.00000 188.00000 107.00000 113.00000 128.00000 118.00000 155.00000 262.00000 84.00000 41.00000 158.00000 79.00000 68.00000 95.00000 170.00000 62.00000 582.00000 333.00000 2.00000 171.00000 145.00000 113.00000 141.00000 128.00000 69.00000 96.00000 78.00000 148.00000 371.00000 240.00000 79.00000 143.00000 135.00000 147.00000 146.00000 207.00000 130.00000
C 158.00000 118.00000 202.00000 141.00000 97.00000 239.00000 172.00000 104.00000 114.00000 102.00000 106.00000 158.00000 65.00000 321.00000 156.00000 96.00000 104.00000 65.00000 78.00000 0.00000 10.00000 582.00000 15.00000 235.00000 137.00000 115.00000 89.00000 70.00000 37.00000 32.00000 41.00000 54.00000 97.00000 234.00000 164.00000 112.00000 191.00000 180.00000 144.00000 98.00000
G 201.00000 215.00000 147.00000 210.00000 171.00000 111.00000 189.00000 167.00000 97.00000 175.00000 114.00000 93.00000 380.00000 62.00000 104.00000 254.00000 254.00000 16.00000 158.00000 0.00000 7.00000 0.00000 132.00000 65.00000 111.00000 174.00000 89.00000 326.00000 127.00000 30.00000 158.00000 89.00000 103.00000 101.00000 153.00000 242.00000 141.00000 133.00000 114.00000 172.00000
T 118.00000 139.00000 128.00000 147.00000 129.00000 128.00000 111.00000 186.00000 256.00000 153.00000 103.00000 250.00000 99.00000 44.00000 246.00000 167.00000 132.00000 334.00000 287.00000 3.00000 235.00000 1.00000 267.00000 140.00000 224.00000 155.00000 279.00000 120.00000 325.00000 445.00000 238.00000 71.00000 145.00000 171.00000 125.00000 96.00000 106.00000 126.00000 120.00000 185.00000
Other 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
A 84.00000 83.00000 118.00000 84.00000 68.00000 82.00000 86.00000 58.00000 99.00000 59.00000 305.00000 424.00000 147.00000 68.00000 254.00000 116.00000 238.00000 107.00000 323.00000 0.00000 147.00000 1.00000 354.00000 190.00000 292.00000 86.00000 304.00000 64.00000 80.00000 280.00000 228.00000 82.00000 118.00000 105.00000 80.00000 80.00000 66.00000 267.00000 90.00000 80.00000
C 263.00000 116.00000 250.00000 244.00000 119.00000 277.00000 264.00000 120.00000 53.00000 72.00000 71.00000 44.00000 251.00000 339.00000 104.00000 79.00000 84.00000 59.00000 90.00000 0.00000 5.00000 1.00000 96.00000 18.00000 93.00000 312.00000 82.00000 49.00000 326.00000 109.00000 99.00000 130.00000 222.00000 90.00000 264.00000 85.00000 263.00000 97.00000 264.00000 255.00000
G 101.00000 253.00000 68.00000 104.00000 267.00000 87.00000 70.00000 119.00000 82.00000 42.00000 46.00000 18.00000 28.00000 39.00000 101.00000 249.00000 132.00000 103.00000 15.00000 525.00000 6.00000 1.00000 58.00000 47.00000 67.00000 63.00000 94.00000 276.00000 55.00000 71.00000 136.00000 239.00000 106.00000 229.00000 109.00000 232.00000 96.00000 103.00000 93.00000 106.00000
T 77.00000 73.00000 89.00000 93.00000 71.00000 79.00000 105.00000 228.00000 291.00000 352.00000 103.00000 39.00000 99.00000 79.00000 66.00000 81.00000 71.00000 256.00000 97.00000 0.00000 367.00000 522.00000 17.00000 270.00000 73.00000 64.00000 45.00000 136.00000 64.00000 65.00000 62.00000 74.00000 79.00000 101.00000 72.00000 128.00000 100.00000 58.00000 78.00000 84.00000
Other 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment