Skip to content
Snippets Groups Projects
Commit 26b575d9 authored by Xavier Grand's avatar Xavier Grand
Browse files

Add r-bolero v1.1, new graphics.

parent 705089e9
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ RUN apt-get update \ ...@@ -12,7 +12,7 @@ RUN apt-get update \
libxml2-dev \ libxml2-dev \
libharfbuzz-dev \ libharfbuzz-dev \
libfribidi-dev \ libfribidi-dev \
libfreetype6-dev \ libfreetype-dev \
libpng-dev \ libpng-dev \
libtiff5-dev \ libtiff5-dev \
libjpeg-dev \ libjpeg-dev \
......
...@@ -13,7 +13,7 @@ conflict_prefer("filter", "dplyr") ...@@ -13,7 +13,7 @@ conflict_prefer("filter", "dplyr")
conflict_prefer("lag", "dplyr") conflict_prefer("lag", "dplyr")
# source graphical theme: # source graphical theme:
source(file="src/ggplot_theme_publication-2.R") source("ggplot_theme_Publication-2.R")
# Load files # Load files
option_list = list( option_list = list(
...@@ -96,7 +96,11 @@ if (length(countSP$nom) != 0) { ...@@ -96,7 +96,11 @@ if (length(countSP$nom) != 0) {
scale_fill_manual(values = countSP$teinte) + scale_fill_manual(values = countSP$teinte) +
labs(fill = "spliced-variants") + labs(fill = "spliced-variants") +
xlab(element_blank()) + ylab(element_blank()) + xlab(element_blank()) + ylab(element_blank()) +
scale_colour_Publication() + theme_Publication() scale_colour_Publication() + theme_Publication() +
theme(axis.text.y = element_blank(),
axis.line.x = element_line(colour=NA),
axis.line.y = element_line(colour=NA),
axis.ticks = element_blank())
ggsave(file = paste0(opt$barcode, "_SP_proportion_piechart.png"), ggsave(file = paste0(opt$barcode, "_SP_proportion_piechart.png"),
scale = 2, scale = 2,
...@@ -233,10 +237,10 @@ ggplot(count_species_clear, ...@@ -233,10 +237,10 @@ ggplot(count_species_clear,
fill = nom)) + fill = nom)) +
geom_col() + geom_col() +
scale_fill_manual(values = count_species_clear$teinte) + scale_fill_manual(values = count_species_clear$teinte) +
theme(axis.text.x = element_text(angle = 45)) + labs(fill = element_blank()) +
labs(fill = "RNA species & spliced-variants") + xlab(label = element_blank()) +
xlab(label = "RNA species & spliced-variants") + scale_colour_Publication() + theme_Publication() +
scale_colour_Publication() + theme_Publication() theme(axis.text.x = element_text(angle = 45, hjust = 1))
ggsave(file = paste0(opt$barcode, "_count_RNAs_species_clear.png"), ggsave(file = paste0(opt$barcode, "_count_RNAs_species_clear.png"),
scale = 2, scale = 2,
...@@ -264,8 +268,13 @@ if(nrow(count_clear)!=0){ ...@@ -264,8 +268,13 @@ if(nrow(count_clear)!=0){
geom_col() + geom_col() +
coord_polar("y") + coord_polar("y") +
scale_fill_manual(values = count_clear$teinte) + scale_fill_manual(values = count_clear$teinte) +
labs(fill = "spliced-variants") + labs(fill = element_blank()) +
scale_colour_Publication() + theme_Publication() scale_colour_Publication() +
theme_Publication() +
theme(axis.text.y = element_blank(),
axis.line.x = element_line(colour=NA),
axis.line.y = element_line(colour=NA),
axis.ticks = element_blank())
ggsave(file = paste0(opt$barcode, "_SP_clear_proportion_piechart.png"), ggsave(file = paste0(opt$barcode, "_SP_clear_proportion_piechart.png"),
scale = 2, scale = 2,
...@@ -279,11 +288,11 @@ ggplot(count_clear, aes(x = nom, ...@@ -279,11 +288,11 @@ ggplot(count_clear, aes(x = nom,
fill = nom)) + fill = nom)) +
geom_col() + geom_col() +
scale_fill_manual(values = count_clear$teinte) + scale_fill_manual(values = count_clear$teinte) +
theme(axis.text.x = element_text(angle = 45)) + labs(fill = element_blank()) +
labs(fill = "spliced-variants") + xlab(label = element_blank()) +
xlab(label = "spliced-variants") +
ylab(label = "percent") + ylab(label = "percent") +
scale_colour_Publication() + theme_Publication() scale_colour_Publication() + theme_Publication() +
theme(axis.text.x = element_text(angle = 45, hjust=1))
ggsave(file = paste0(opt$barcode, "_SP_clear_proportion.png"), ggsave(file = paste0(opt$barcode, "_SP_clear_proportion.png"),
scale = 2, scale = 2,
...@@ -299,10 +308,14 @@ ggplot(count_species_SPxx, aes(x = "species", ...@@ -299,10 +308,14 @@ ggplot(count_species_SPxx, aes(x = "species",
geom_col() + geom_col() +
coord_polar("y") + coord_polar("y") +
scale_fill_manual(values = count_species_SPxx$teinte) + scale_fill_manual(values = count_species_SPxx$teinte) +
labs(fill = "TSS") + labs(fill = element_blank()) +
ylab(label = "TSS usage") + ylab(label = element_blank()) +
xlab(label = "percent") + xlab(label = element_blank()) +
scale_colour_Publication() + theme_Publication() scale_colour_Publication() + theme_Publication() +
theme(axis.text.y = element_blank(),
axis.line.x = element_line(colour=NA),
axis.line.y = element_line(colour=NA),
axis.ticks = element_blank())
ggsave(file = paste0(opt$barcode, "_count_RNAs_species_piechart.png"), ggsave(file = paste0(opt$barcode, "_count_RNAs_species_piechart.png"),
scale = 2, scale = 2,
......
...@@ -17,7 +17,7 @@ conflict_prefer("filter", "dplyr") ...@@ -17,7 +17,7 @@ conflict_prefer("filter", "dplyr")
conflict_prefer("lag", "dplyr") conflict_prefer("lag", "dplyr")
# source graphical theme: # source graphical theme:
source(file="src/ggplot_theme_publication-2.R") source("ggplot_theme_Publication-2.R")
# Load Start_positions_count files: # Load Start_positions_count files:
option_list = list( option_list = list(
...@@ -68,12 +68,13 @@ df_parsed <- parsingData(sam_bc01) ...@@ -68,12 +68,13 @@ df_parsed <- parsingData(sam_bc01)
ggplot(df_parsed, aes(Start_position, nb_reads)) + ggplot(df_parsed, aes(Start_position, nb_reads)) +
geom_area(alpha = 0.5, fill = "blue") + geom_area(alpha = 0.5, fill = "blue") +
scale_y_sqrt() + scale_y_sqrt() +
facet_wrap(facets = vars(df_parsed$Barcode)) facet_wrap(facets = vars(df_parsed$Barcode)) +
scale_x_continuous(breaks = c(0, 127, 1114, 1490, 2554, 2732, 2907, 3421), scale_x_continuous(breaks = c(0, 127, 1114, 1490, 2554, 2732, 2907, 3421),
label = c("1692", "1819", "2806", "EcoRI", "1065", label = c("1692", "1819", "2806", "EcoRI", "1065",
"1243", "1418", "1932")) + "1243", "1418", "1932")) +
scale_fill_discrete(name="") + scale_fill_discrete(name="") +
scale_colour_Publication() + theme_Publication()+ xlab("Position on HBV genome.") + ylab(element_blank()) +
scale_colour_Publication() + theme_Publication() +
theme(axis.text.x = element_text(angle = 45, hjust=1) theme(axis.text.x = element_text(angle = 45, hjust=1)
) )
...@@ -201,14 +202,16 @@ plot_camembert <- function(barcode, df, tot) { ...@@ -201,14 +202,16 @@ plot_camembert <- function(barcode, df, tot) {
fill=promoters)) + fill=promoters)) +
geom_col() + geom_col() +
coord_polar("y") + coord_polar("y") +
scale_fill_manual(values = mycolors) + scale_fill_manual(name="", values = mycolors) +
labs(title = paste0("#reads = ", tot[1,barcode]), labs(title = paste0("#reads = ", tot[1,barcode]),
x=element_blank(), x=element_blank(),
y=element_blank()) + y=element_blank()) +
scale_fill_discrete(name="") + scale_colour_Publication() + theme_Publication() +
scale_colour_Publication() + theme_Publication()+ theme(axis.text.y = element_blank(),
theme(axis.text.x = element_text(angle = 45, hjust=1) axis.line.x = element_line(colour=NA),
) axis.line.y = element_line(colour=NA),
axis.ticks = element_blank())
print(camembert) print(camembert)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment