added foldx scaled and foldx outcome to plotting_data.R
This commit is contained in:
parent
5deb12187e
commit
4398c049ca
3 changed files with 48 additions and 17 deletions
|
@ -118,7 +118,6 @@ df_s_foldx = df[df$foldx_outcome == "Stabilising",]
|
|||
hs_foldx = df_s_foldx[df_s_foldx$ddg == min(df_s_foldx$ddg), ]
|
||||
hs_foldx
|
||||
|
||||
|
||||
#===============
|
||||
# active site muts
|
||||
#===============
|
||||
|
@ -132,8 +131,6 @@ cat("No. of active site residues within", aa_dist, ":", nrow(aa_muts))
|
|||
#====================
|
||||
# budding hotspots
|
||||
#====================
|
||||
|
||||
# Method
|
||||
# this is what you want
|
||||
foo = merged_df3 %>% group_by(position) %>% tally()
|
||||
bar = merged_df3 %>% group_by(position) %>% count()
|
||||
|
@ -149,15 +146,4 @@ n_mult_muts_sites = sum(table(foo$n)) - (table(foo$n)[[1]] - table(foo$n)[[2]])
|
|||
cat("No of budding hotspots (sites with 2 mutations):", n_budding_sites
|
||||
, "\nNo. of sites with mutiple (>2) mutations:", n_mult_muts_sites)
|
||||
|
||||
# another way
|
||||
setDT(merged_df3)[, pos_count := .N, by = .(position)]
|
||||
|
||||
# this is cummulative
|
||||
table(merged_df3$pos_count)
|
||||
|
||||
# use group by on this: same as the
|
||||
snpsBYpos_df <- merged_df3 %>%
|
||||
group_by(position) %>%
|
||||
summarize(snpsBYpos = mean(pos_count))
|
||||
|
||||
|
||||
#==========================================================================
|
Loading…
Add table
Add a link
Reference in a new issue