updated Header file and saving work
This commit is contained in:
parent
6e991e928a
commit
dcf3d474e7
2 changed files with 10 additions and 22 deletions
|
@ -8,10 +8,10 @@
|
||||||
# library(gplots)
|
# library(gplots)
|
||||||
#}
|
#}
|
||||||
|
|
||||||
#if (!require("tidyverse")) {
|
if (!require("tidyverse")) {
|
||||||
# install.packages("tidyverse", dependencies = TRUE)
|
install.packages("tidyverse", dependencies = TRUE)
|
||||||
# library(tidyverse)
|
library(tidyverse)
|
||||||
#}
|
}
|
||||||
|
|
||||||
if (!require("ggplot2")) {
|
if (!require("ggplot2")) {
|
||||||
install.packages("ggplot2", dependencies = TRUE)
|
install.packages("ggplot2", dependencies = TRUE)
|
||||||
|
|
|
@ -23,14 +23,6 @@ source("combining_dfs_plotting.R")
|
||||||
# output
|
# 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"
|
logo_combined_labelled = "logo_combined_labelled.svg"
|
||||||
plot_logo_combined_labelled = paste0(plotdir,"/", logo_combined_labelled)
|
plot_logo_combined_labelled = paste0(plotdir,"/", logo_combined_labelled)
|
||||||
|
|
||||||
|
@ -212,7 +204,7 @@ require(data.table)
|
||||||
|
|
||||||
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
# REASSIGNMENT to prevent changing code
|
# 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))
|
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: CORRECT x-axis labelling
|
||||||
#============================================
|
#============================================
|
||||||
# custom height (OR) logo plot: yayy works
|
# 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") +
|
logo_or = ggseqlogo(wide_df_or, method="custom", seq_type="aa") + ylab("my custom height") +
|
||||||
theme(axis.text.x = element_text(size = 16
|
theme(axis.text.x = element_text(size = 16
|
||||||
, angle = 90
|
, angle = 90
|
||||||
|
@ -268,12 +256,12 @@ logo_or = ggseqlogo(wide_df_or, method="custom", seq_type="aa") + ylab("my custo
|
||||||
xlab("Position") +
|
xlab("Position") +
|
||||||
ylab("Odds Ratio")
|
ylab("Odds Ratio")
|
||||||
|
|
||||||
print(logo_or)
|
logo_or
|
||||||
#dev.off()
|
########################################################################
|
||||||
#%% end of logo plot with OR as height
|
|
||||||
|
|
||||||
#===================================================================
|
|
||||||
|
|
||||||
|
#=============================
|
||||||
|
# combine plots for output
|
||||||
|
#=============================
|
||||||
cat("Output plot:", plot_logo_combined_labelled)
|
cat("Output plot:", plot_logo_combined_labelled)
|
||||||
svg(plot_logo_combined_labelled, width = 25, height = 10)
|
svg(plot_logo_combined_labelled, width = 25, height = 10)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue