diff --git a/scripts/plotting/Header_TT.R b/scripts/plotting/Header_TT.R index 4bcd7d8..66b9a12 100755 --- a/scripts/plotting/Header_TT.R +++ b/scripts/plotting/Header_TT.R @@ -8,10 +8,10 @@ # library(gplots) #} -#if (!require("tidyverse")) { -# install.packages("tidyverse", dependencies = TRUE) -# library(tidyverse) -#} +if (!require("tidyverse")) { + install.packages("tidyverse", dependencies = TRUE) + library(tidyverse) +} if (!require("ggplot2")) { install.packages("ggplot2", dependencies = TRUE) diff --git a/scripts/plotting/logo_combined.R b/scripts/plotting/logo_combined.R index 2b743a7..d40c501 100644 --- a/scripts/plotting/logo_combined.R +++ b/scripts/plotting/logo_combined.R @@ -23,14 +23,6 @@ source("combining_dfs_plotting.R") # output #=========== -logo_multiple_muts = "logo_multiple_muts.svg" -plot_logo_multiple_muts = paste0(plotdir,"/", logo_multiple_muts) - - -logo_or = "logo_or.svg" -plot_logo_or = paste0(plotdir,"/", logo_or) - - logo_combined_labelled = "logo_combined_labelled.svg" plot_logo_combined_labelled = paste0(plotdir,"/", logo_combined_labelled) @@ -212,7 +204,7 @@ require(data.table) #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # REASSIGNMENT to prevent changing code -my_df_snp #(positions with multiple snps) only +head(my_df_snp) #(positions with multiple snps) only length(unique(my_df_snp$position)) #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -243,10 +235,6 @@ position_or = as.numeric(colnames(wide_df_or)) #custom height (OR) logo plot: CORRECT x-axis labelling #============================================ # custom height (OR) logo plot: yayy works - -#cat("Logo plot with OR as y axis:", plot_logo_or) -#svg(plot_logo_or, width = 30 , height = 6) - logo_or = ggseqlogo(wide_df_or, method="custom", seq_type="aa") + ylab("my custom height") + theme(axis.text.x = element_text(size = 16 , angle = 90 @@ -268,12 +256,12 @@ logo_or = ggseqlogo(wide_df_or, method="custom", seq_type="aa") + ylab("my custo xlab("Position") + ylab("Odds Ratio") -print(logo_or) -#dev.off() -#%% end of logo plot with OR as height - -#=================================================================== +logo_or +######################################################################## +#============================= +# combine plots for output +#============================= cat("Output plot:", plot_logo_combined_labelled) svg(plot_logo_combined_labelled, width = 25, height = 10)