added log10 OR and P values to myaf_or_calcs.R

This commit is contained in:
Tanushree Tunstall 2021-08-23 20:01:01 +01:00
parent 182465d579
commit 0e44958585
4 changed files with 32 additions and 12 deletions

View file

@ -180,6 +180,12 @@ my_afor <- function ( drug
ci_lower_fisher = fisher.test(table(dst, mut))$conf.int[1]
ci_upper_fisher = fisher.test(table(dst, mut))$conf.int[2]
#--------------------
# adding log cols : NEW
#--------------------
log10_or_mychisq = log10(or_mychisq)
neglog_pval_fisher = -log10(pval_fisher)
#-------------------
# chi sq estimates
#-------------------
@ -198,9 +204,11 @@ my_afor <- function ( drug
, zval_logistic = zval_logistic
, ci_low_logistic = ci_lower_logistic
, ci_hi_logistic = ci_upper_logistic
, or_mychisq = or_mychisq
, or_mychisq = or_mychisq
, log10_or_mychisq = log10_or_mychisq # NEW
, or_fisher = or_fisher
, pval_fisher = pval_fisher
, neglog_pval_fisher = neglog_pval_fisher # NEW
, ci_low_fisher= ci_lower_fisher
, ci_hi_fisher = ci_upper_fisher
, est_chisq = est_chisq

View file

@ -76,6 +76,14 @@ if ( all(c1 == c2) ){
exit()
}
#------------------------------
# renaming foldx column from
# "ddg" --> "ddg_foldx"
#------------------------------
# change name to foldx
colnames(df)[n] <- "ddg_foldx"
#==================================
# extract unique mutation entries
#==================================