tried ED logo, but needs work
This commit is contained in:
parent
00094f036a
commit
8f8a9db92c
3 changed files with 119 additions and 108 deletions
|
@ -166,38 +166,42 @@ LogoPlotMSA <- function(msaSeq_mut
|
|||
, method = msa_method
|
||||
, col_scheme = my_logo_col
|
||||
, seq_type = 'aa') +
|
||||
scale_x_discrete(x_lab
|
||||
, breaks = i_extract
|
||||
, labels = i_extract
|
||||
#, limits = min(i_extract): max(i_extract))
|
||||
, limits = factor(i_extract))
|
||||
|
||||
# further customisation
|
||||
msa_mut_logo_P = p0 + theme(legend.position = leg_pos
|
||||
, legend.direction = leg_dir
|
||||
#, legend.title = element_blank()
|
||||
, legend.title = element_text(size = leg_tts
|
||||
, colour = ytt_col)
|
||||
, legend.text = element_text(size = leg_ts)
|
||||
theme(legend.position = leg_pos
|
||||
, legend.direction = leg_dir
|
||||
#, legend.title = element_blank()
|
||||
, legend.title = element_text(size = leg_tts
|
||||
, colour = ytt_col)
|
||||
, legend.text = element_text(size = leg_ts)
|
||||
|
||||
, axis.text.x = element_text(size = x_ats
|
||||
, angle = x_tangle
|
||||
, hjust = 1
|
||||
, vjust = 0.4
|
||||
, colour = xfont_bgc)
|
||||
#, axis.text.y = element_blank()
|
||||
, axis.text.y = element_text(size = y_ats
|
||||
, angle = y_tangle
|
||||
, hjust = 1
|
||||
, vjust = -1.0
|
||||
, colour = yfont_bgc)
|
||||
, axis.title.x = element_text(size = x_tts
|
||||
, colour = xtt_col)
|
||||
, axis.title.y = element_text(size = y_tts
|
||||
, colour = ytt_col)
|
||||
|
||||
, plot.background = element_rect(fill = theme_bgc))
|
||||
, axis.text.x = element_text(size = x_ats
|
||||
, angle = x_tangle
|
||||
, hjust = 1
|
||||
, vjust = 0.4
|
||||
, colour = xfont_bgc)
|
||||
#, axis.text.y = element_blank()
|
||||
, axis.text.y = element_text(size = y_ats
|
||||
, angle = y_tangle
|
||||
, hjust = 1
|
||||
, vjust = -1.0
|
||||
, colour = yfont_bgc)
|
||||
, axis.title.x = element_text(size = x_tts
|
||||
, colour = xtt_col)
|
||||
, axis.title.y = element_text(size = y_tts
|
||||
, colour = ytt_col)
|
||||
, plot.background = element_rect(fill = theme_bgc))+
|
||||
xlab(x_lab)
|
||||
|
||||
if (missing(plot_positions)){
|
||||
msa_mut_logo_P = p0
|
||||
|
||||
}else{
|
||||
msa_mut_logo_P = p0 +
|
||||
scale_y_continuous(expand = c(0,0.09)) +
|
||||
scale_x_discrete(breaks = i_extract
|
||||
, expand = c(0.09,0)
|
||||
, labels = i_extract
|
||||
, limits = factor(i_extract))
|
||||
}
|
||||
|
||||
cat('\nDone: msa_mut_logo_P')
|
||||
#return(msa_mut_logoP)
|
||||
|
@ -210,15 +214,7 @@ LogoPlotMSA <- function(msaSeq_mut
|
|||
, facet = "grid"
|
||||
, method = msa_method
|
||||
, col_scheme = my_logo_col
|
||||
, seq_type = 'aa')+
|
||||
scale_x_discrete(x_lab
|
||||
, breaks = i_extract
|
||||
, labels = i_extract
|
||||
#, limits = min(i_extract): max(i_extract))
|
||||
, limits = factor(i_extract))
|
||||
|
||||
# further customisation
|
||||
msa_wt_logo_P = p1 +
|
||||
, seq_type = 'aa') +
|
||||
|
||||
theme(legend.position = "none"
|
||||
, legend.direction = leg_dir
|
||||
|
@ -240,8 +236,20 @@ LogoPlotMSA <- function(msaSeq_mut
|
|||
, colour = ytt_col)
|
||||
|
||||
, plot.background = element_rect(fill = theme_bgc)) +
|
||||
ylab("")
|
||||
|
||||
ylab("") + xlab("Wild-type position")
|
||||
|
||||
|
||||
if (missing(plot_positions)){
|
||||
msa_wt_logo_P = p1
|
||||
}else{
|
||||
msa_wt_logo_P = p1 +
|
||||
scale_y_continuous(expand = c(0,0.09)) +
|
||||
scale_x_discrete(breaks = i2_extract
|
||||
, expand = c(0.09,0)
|
||||
, labels = i2_extract
|
||||
, limits = factor(i2_extract))
|
||||
}
|
||||
|
||||
cat('\nDone: msa_wt_logo_P')
|
||||
#return(msa_wt_logoP)
|
||||
LogoPlotMSAL[['msa_wt_logoP']] <- msa_wt_logo_P
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue