saving work

This commit is contained in:
Tanushree Tunstall 2020-09-18 18:07:48 +01:00
parent c5266770af
commit 0c5ef2e72c
4 changed files with 33 additions and 12 deletions

View file

@ -64,7 +64,6 @@ str(df)
# Plot 1:Count of stabilising and destabilsing muts
#****************
#svg("basic_barplots_PS.svg")
svg(plot_basic_bp_duet)
print(paste0("plot1 filename:", basic_bp_duet))
@ -77,7 +76,7 @@ theme_set(theme_grey())
# start plot 1
#--------------
g = ggplot(df, aes(x = duet_outcome))
outPlot = g + geom_bar(aes(fill = duet_outcome)
OutPlot_count = g + geom_bar(aes(fill = duet_outcome)
, show.legend = TRUE) +
geom_label(stat = "count"
, aes(label = ..count..)
@ -99,7 +98,7 @@ outPlot = g + geom_bar(aes(fill = duet_outcome)
scale_fill_discrete(name = "DUET Outcome"
, labels = c("Destabilising", "Stabilising"))
print(outPlot)
print(OutPlot_count)
dev.off()
table(df$duet_outcome)
@ -153,7 +152,7 @@ foo = select(df, mutationinformation
#--------------
# start plot 2
#--------------
#svg("position_count_PS.svg")
svg(plot_pos_count_duet)
print(paste0("plot filename:", plot_pos_count_duet))
@ -165,7 +164,7 @@ my_als = 22 # axis label size
my_x = sort(unique(snpsBYpos_df$snpsBYpos))
g = ggplot(snpsBYpos_df, aes(x = snpsBYpos))
outPlot_pos = g + geom_bar(aes (alpha = 0.5)
OutPlot_pos_count = g + geom_bar(aes (alpha = 0.5)
, show.legend = FALSE) +
scale_x_continuous(breaks = unique(snpsBYpos_df$snpsBYpos)) +
#scale_x_continuous(breaks = my_x) +
@ -184,9 +183,8 @@ outPlot_pos = g + geom_bar(aes (alpha = 0.5)
labs(x = "Number of SNPs"
, y = "Number of Sites")
print(outPlot_pos)
print(OutPlot_pos_count)
dev.off()
########################################################################
# end of Ligand barplots
########################################################################