going through functions and script for interactive plots
This commit is contained in:
parent
1f266c4cb8
commit
3f7bc908ec
7 changed files with 83 additions and 95 deletions
|
@ -56,6 +56,8 @@ logo_combined_labelled = "logo_combined_labelled.svg"
|
|||
plot_logo_combined_labelled = paste0(plotdir,"/", logo_combined_labelled)
|
||||
|
||||
#########################################################
|
||||
#logo_or_mult_p + theme_dark()
|
||||
#logo_or_mult_p + theme(plot.background = element_rect(fill = "black"))
|
||||
|
||||
#==================================
|
||||
# Output
|
||||
|
@ -124,8 +126,24 @@ print(logo_logOR)
|
|||
#*****************************
|
||||
# Mutant logo plot: >1 nsSNP
|
||||
#******************************
|
||||
aa_col_choices = c('chemistry', 'hydrophobicity', 'clustalx', 'taylor')
|
||||
my_logo_col = aa_col_choices[[1]]
|
||||
|
||||
if (my_logo_col == 'clustalx || taylor'){
|
||||
cat("\nSelected colour scheme:", my_logo_col
|
||||
, "\nUsing black theme\n")
|
||||
theme_bgc = "black"
|
||||
font_bgc = "white"
|
||||
} if (my_logo_col == 'chemistry || hydrophobicity') {
|
||||
cat('\nSelected colour scheme:', my_logo_col
|
||||
, "\nUsing grey theme")
|
||||
theme_bgc = "grey"
|
||||
font_bgc = "black"
|
||||
}
|
||||
|
||||
p0 = ggseqlogo(tab_mt
|
||||
, method = 'custom'
|
||||
, col_scheme = my_logo_col
|
||||
, seq_type = 'aa') +
|
||||
#ylab('my custom height') +
|
||||
theme(axis.text.x = element_blank()) +
|
||||
|
@ -143,9 +161,12 @@ cat('\nDone: p0')
|
|||
mut_logo_p = p0 + theme(legend.position = "none"
|
||||
, legend.title = element_blank()
|
||||
, legend.text = element_text(size = 20)
|
||||
, axis.text.x = element_text(size = 14, angle = 90)
|
||||
, axis.text.y = element_blank())
|
||||
#mut_logo_p
|
||||
, axis.text.x = element_text(size = 14
|
||||
, angle = 90
|
||||
, colour = font_bgc)
|
||||
, axis.text.y = element_blank()
|
||||
, plot.background = element_rect(fill = theme_bgc))
|
||||
mut_logo_p
|
||||
cat('\nDone: p0+mut_logo_p')
|
||||
|
||||
#*************************
|
||||
|
@ -154,9 +175,7 @@ cat('\nDone: p0+mut_logo_p')
|
|||
p2 = ggseqlogo(tab_wt
|
||||
, method = 'custom'
|
||||
, seq_type = 'aa'
|
||||
#, col_scheme = "taylor"
|
||||
#, col_scheme = chemistry2
|
||||
) +
|
||||
, col_scheme = my_logo_col) +
|
||||
#ylab('my custom height') +
|
||||
theme(text=element_text(family="FreeSans"))+
|
||||
theme(axis.text.x = element_blank()
|
||||
|
@ -185,7 +204,11 @@ cat('\nDone: wt_logo_p')
|
|||
#***********************
|
||||
# Logo OR >1 nsSNP
|
||||
#***********************
|
||||
logo_or_mult_p = ggseqlogo(wide_df_or_mult, method="custom", seq_type="aa") + ylab("my custom height") +
|
||||
logo_or_mult_p = ggseqlogo(wide_df_or_mult
|
||||
, method = "custom"
|
||||
, col_scheme = my_logo_col
|
||||
, seq_type="aa") +
|
||||
ylab("my custom height") +
|
||||
theme(axis.text.x = element_text(size = 14
|
||||
, angle = 90
|
||||
, hjust = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue