added fold and duet agreement to extreme_muts.R
This commit is contained in:
parent
4398c049ca
commit
5f10ad8075
2 changed files with 25 additions and 6 deletions
|
@ -10,6 +10,7 @@ setwd("~/git/LSHTM_analysis/scripts/plotting")
|
|||
getwd()
|
||||
|
||||
#source("Header_TT.R")
|
||||
library(tidyverse)
|
||||
library(ggplot2)
|
||||
library(data.table)
|
||||
library(dplyr)
|
||||
|
@ -19,7 +20,6 @@ library(dplyr)
|
|||
#=========
|
||||
#source("combining_dfs_plotting.R")
|
||||
|
||||
# FIXME: add a separate script to add foldx values and others
|
||||
source("output_tables.R")
|
||||
rm(df, merged_df3_short, df_output)
|
||||
|
||||
|
@ -146,4 +146,23 @@ 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)
|
||||
|
||||
#==========================================================================
|
||||
#==========================================================================
|
||||
|
||||
#==============================
|
||||
# agreement of foldx and DUET
|
||||
#==============================
|
||||
mcsm_foldx = merged_df3[which(merged_df3$duet_outcome != merged_df3$foldx_outcome),]
|
||||
|
||||
mcsm_foldx$sign_comp = ifelse(sign(mcsm_foldx$duet_scaled)==sign(mcsm_foldx$ddg), "PASS", "FAIL")
|
||||
table(mcsm_foldx$sign_comp)
|
||||
|
||||
# another way of checking
|
||||
merged_df3$sign_comp = ifelse(sign(merged_df3$duet_scaled)==sign(merged_df3$ddg), "PASS", "FAIL")
|
||||
table(merged_df3$sign_comp)
|
||||
|
||||
disagreement = table(merged_df3$sign_comp)[2]/nrow(merged_df3)*100
|
||||
agreement = 100 - disagreement
|
||||
|
||||
cat("There is", agreement, "% between mcsm and foldx predictions")
|
||||
|
||||
##############################################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue