added dir for embb for consistency and checks and moved others to version1
This commit is contained in:
parent
19b820e316
commit
ac72634b48
19 changed files with 1614 additions and 2 deletions
56
scripts/plotting/plotting_thesis/version1/gg_pairs.R
Normal file
56
scripts/plotting/plotting_thesis/version1/gg_pairs.R
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Tweak for layout, fonts, and text sizes.
|
||||
#svg('~/tmp/foo.svg', width=10, height=10, )
|
||||
|
||||
|
||||
# Set the width/height to inches for print. 300 dpi is reasonably ok for "draft"
|
||||
# output. To raise quality while preserving sanity, increase 'res' and
|
||||
# DO NOT alter font/point/line sizes
|
||||
|
||||
|
||||
|
||||
#- [X] Black text for "Corr:" or replace with Rho symbol
|
||||
#- [X] 0/1 == R/S
|
||||
#- [X] "rho" symbol instead of "Corr:" text
|
||||
#- [X] Dot size a bit smaller
|
||||
#- [X] Plot lines slightly thinner
|
||||
#
|
||||
#
|
||||
png('~/tmp/foo.png',
|
||||
width=10,
|
||||
height=10,
|
||||
units="in",
|
||||
res=300)
|
||||
#
|
||||
#corr_plotting_df = corr_df_ps
|
||||
colnames(corr_plotdf)
|
||||
corr_plotting_df = subset(corr_plotdf, select = -c(ethambutol,`Log10(OR)`,`-Log10(P)`, ASA, RSA, KD, RD
|
||||
, FoldX
|
||||
, DeepDDG
|
||||
, Dynamut2 ))
|
||||
colnames(corr_plotting_df)
|
||||
#ggpairs(corr_plotting_df, columns = 1:(ncol(corr_plotting_df)-1),
|
||||
ggpairs(corr_plotting_df, columns = 1:(ncol(corr_plotting_df)),
|
||||
|
||||
upper = list(continuous = wrap('cor',
|
||||
method = "spearman",
|
||||
use = "pairwise.complete.obs",
|
||||
title="ρ",
|
||||
digits=2,
|
||||
title_args=c(colour="black")
|
||||
)
|
||||
),
|
||||
lower = list(
|
||||
continuous = wrap("points", alpha = 0.7, size=0.5),
|
||||
combo = wrap("dot", alpha = 0.7, size=0.5)
|
||||
),
|
||||
aes(colour = factor(ifelse(dst_mode==0, "S", "R")), alpha = 0.5),
|
||||
title="Stability") +
|
||||
|
||||
scale_colour_manual(values = c("red", "blue")) +
|
||||
scale_fill_manual(values = c("red", "blue")) +
|
||||
theme(
|
||||
text = element_text(size=12, face="bold")
|
||||
)
|
||||
|
||||
dev.off()
|
||||
#Check all plots with LSHTM_analysis/scripts/plotting/plotting_colnames.R
|
Loading…
Add table
Add a link
Reference in a new issue