lots of per-plot configs
This commit is contained in:
parent
13999a477d
commit
04253b961f
36 changed files with 5121 additions and 540 deletions
|
@ -183,7 +183,6 @@ if (tolower(gene)%in%geneL_na){
|
|||
}
|
||||
|
||||
#####################################################################
|
||||
|
||||
# ------------------------------
|
||||
# bp site site count: mCSM-lig
|
||||
# < 10 Ang ligand
|
||||
|
@ -203,10 +202,10 @@ posC_lig = site_snp_count_bp(plotdf = df3_lig
|
|||
, axis_label_size = 10)
|
||||
|
||||
posC_lig
|
||||
# ------------------------------
|
||||
#------------------------------
|
||||
# bp site site count: ppi2
|
||||
# < 10 Ang interface
|
||||
# ------------------------------
|
||||
#------------------------------
|
||||
if (tolower(gene)%in%geneL_ppi2){
|
||||
|
||||
posC_ppi2 = site_snp_count_bp(plotdf = df3_ppi2
|
||||
|
@ -223,10 +222,10 @@ if (tolower(gene)%in%geneL_ppi2){
|
|||
posC_ppi2
|
||||
}
|
||||
|
||||
# ------------------------------
|
||||
#------------------------------
|
||||
# bp site site count: NCA dist
|
||||
# < 10 Ang nca
|
||||
# ------------------------------
|
||||
#------------------------------
|
||||
if (tolower(gene)%in%geneL_na){
|
||||
|
||||
posC_nca = site_snp_count_bp(plotdf = df3_na
|
||||
|
@ -242,15 +241,11 @@ if (tolower(gene)%in%geneL_na){
|
|||
, axis_label_size = 10)
|
||||
posC_nca
|
||||
}
|
||||
|
||||
|
||||
#===============================================================
|
||||
|
||||
|
||||
# ------------------------------
|
||||
#------------------------------
|
||||
# bp site site count: ALL
|
||||
# <10 Ang ligand
|
||||
# ------------------------------
|
||||
#------------------------------
|
||||
posC_all = site_snp_count_bp(plotdf = df3
|
||||
, df_colname = "position"
|
||||
, xaxis_title = "Number of nsSNPs"
|
||||
|
@ -282,34 +277,6 @@ consurfP = stability_count_bp(plotdf = df3
|
|||
|
||||
consurfP
|
||||
|
||||
####################
|
||||
# Sensitivity count: Mutations
|
||||
####################
|
||||
table(df3$sensitivity)
|
||||
|
||||
rect_sens=data.frame(mutation_class=c("Resistant","Sensitive")
|
||||
, tile_colour =c("red","blue")
|
||||
, numbers = c(table(df3$sensitivity)[[1]], table(df3$sensitivity)[[2]]))
|
||||
|
||||
|
||||
|
||||
sensP = ggplot(rect_sens, aes(mutation_class, y = 0
|
||||
, fill = tile_colour
|
||||
, label = paste0("n=", numbers)
|
||||
)) +
|
||||
geom_tile(width = 1, height = 1) + # make square tiles
|
||||
geom_label(color = "black", size = 1.7,fill = "white", alpha=0.7) + # add white text in the middle
|
||||
scale_fill_identity(guide = "none") + # color the tiles with the colors in the data frame
|
||||
coord_fixed() + # make sure tiles are square
|
||||
#coord_flip()+ scale_x_reverse() +
|
||||
# theme_void() # remove any axis markings
|
||||
theme_nothing() # remove any axis markings
|
||||
sensP
|
||||
|
||||
# sensP2 = sensP +
|
||||
# coord_flip() + scale_x_reverse()
|
||||
# sensP2
|
||||
|
||||
##############################################################
|
||||
#===================
|
||||
# Stability
|
||||
|
@ -421,5 +388,4 @@ snap2P = stability_count_bp(plotdf = df3
|
|||
, ltis = 11
|
||||
, geom_ls = 2.5)
|
||||
snap2P
|
||||
|
||||
#####################################################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue