Commit 22b2b5eb authored by Gael  MILLOT's avatar Gael MILLOT
Browse files

v7.5.0 release: Ok up to the plot_insertion process, tested using the test file

parent f34fb699
......@@ -198,6 +198,11 @@ Gitlab developers
## WHAT'S NEW IN
### v7.5.0
1) Ok up to the plot_insertion process, tested using the test file
### v7.4.0
1) Ok up to global logo, tested using the test file
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -113,7 +113,7 @@ rm(tempo.cat)
# window_size <- "50000 200000"
# step <- "100"
# file_name <- "test.fastq2"
# cute <- "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/v10.9.0/cute_little_R_functions.R"
# cute <- "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/v11.0.0/cute_little_R_functions.R"
# log <- "plot_insertion_report.txt"
......@@ -423,7 +423,7 @@ if(ncol(obs.freq) > 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 ZOOMED",
title = "TOTAL",
x.lab = "Insertion number",
x.left.extra.margin = 0.05,
y.top.extra.margin = 0.05,
......@@ -452,7 +452,7 @@ if(ncol(obs.freq) > 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",
title = "TOTAL ZOOMED",
x.lab = "Insertion number",
x.left.extra.margin = 0.05,
x.right.extra.margin = 0.05,
......@@ -603,6 +603,7 @@ for(i0 in window_size){
if(ncol(total) > 0){
# graph of total frequency
pdf(file = NULL) # send plots into a NULL file, no pdf file created. It is to draw the plot but then to save it using ggsave()
res <- fun_gg_scatter(data1 = list(structure, total),
x = list("x", "center"),
y = list("y", "value"),
......@@ -613,13 +614,13 @@ for(i0 in window_size){
dot.size = 0.7,
line.size = 1,
x.lab = xlab,
x.lim = xlim,
x.lim = c(0, genome_size),
x.tick.nb = 6,
x.second.tick.nb = 3,
x.left.extra.margin = 0,
x.right.extra.margin = 0,
y.lab = "Number of insertion sites",
y.lim = ylim,
y.lim = NULL,
y.tick.nb = 6,
y.second.tick.nb = 3,
y.top.extra.margin = 0,
......@@ -632,9 +633,9 @@ for(i0 in window_size){
title.text.size = 7,
return = TRUE
)
ggplot2::ggsave(paste0("total_insertion_site_freq_", i0, ".png"), plot = res$gtable, device = "png", width = 5000, height = 1800, units = "px", res = 300)
ggplot2::ggsave(paste0("plot_", file_name, "_insertion_bin_", i0, ".png"), plot = res$gtable, device = "png", width = 16.6, height = 6, units = "in", dpi = 300) # width = 5000, height = 1800, units = "px" normally but "px" not accepted in the r_ext container
}else{
png(filename = paste0("total_insertion_site_freq_", i0, ".png"), width = 5000, height = 1800, units = "px", res = 300)
png(filename = paste0("plot_", file_name, "_insertion_bin_", i0, ".png"), width = 5000, height = 1800, units = "px", res = 300)
fun_gg_empty_graph(text = "EMPTY pos FILE: NO PLOT DRAWN")
}
}
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -1006,11 +1006,12 @@ process plot_insertion { // sections 24.7.2 and 45 of the labbook 20200520
![Figure 23: Raw insertion frequencies.](./figures/plot_${file_name}_insertion_raw.png){width=600}
\\n\\n</center>\\n\\n<br /><br />\\n\\n
' >> report.rmd
count=0
echo -e "\\n\\n<br /><br />\\n\\n#### Binned frequencies\\n\\n" >> report.rmd
count=1
for i in $window_size ; do
echo -e '
\\n\\n<br /><br />\\n\\n</center>\\n\\n
![Figure \'\$((23 + \$count))\': \'\${i}\'](./figures/plot_${file_name}_insertion_bin_\'\${i}\'png){width=600}
![Figure \'\$((23 + \$count))\': \'\${i}\'](./figures/plot_${file_name}_insertion_bin_\'\${i}\'.png){width=600}
\\n\\n</center>\\n\\n
' >> report.rmd
count=\$((count + 1))
......
......@@ -60,7 +60,7 @@ env {
motif_rev='A[AT]C' // the antiparallel of motif_fw
window_size = "50000" // written as R vector, width of the sliding window on the reference genome in bp
step=100 // steps of the sliding window on the reference genome in bp
cute_path="https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/v10.9.0/cute_little_R_functions.R" // single character string indicating the file (and absolute pathway) of the required cute_little_R_functions toolbox. With ethernet connection available, this can also be used: "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/raw/v5.1.0/cute_little_R_functions.R" or local "C:\\Users\\Gael\\Documents\\Git_projects\\cute_little_R_functions\\cute_little_R_functions.R"
cute_path="https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/v11.0.0/cute_little_R_functions.R" // single character string indicating the file (and absolute pathway) of the required cute_little_R_functions toolbox. With ethernet connection available, this can also be used: "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/raw/v5.1.0/cute_little_R_functions.R" or local "C:\\Users\\Gael\\Documents\\Git_projects\\cute_little_R_functions\\cute_little_R_functions.R"
}
//////// end variables that will be used only in the main.nf
......
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