added output tables with active site

This commit is contained in:
Tanushree Tunstall 2022-08-26 21:50:33 +01:00
parent f290d8ec9e
commit 2cbc460f87
4 changed files with 43 additions and 17 deletions

View file

@ -136,8 +136,6 @@ bar = bar[, c("mutationinformation"
table(bar$sensitivity)
table(bar$or_mychisq>1&bar$signif_fdr) # sen and res ~ OR
str(bar)
sen = bar[bar$or_mychisq<1,]
sen = na.omit(sen)
@ -162,7 +160,9 @@ if (nrow(bar_or) == nrow(sen1) + nrow(res1) ){
# percent for OR muts
pc_orR = nrow(res1)/(nrow(sen1) + nrow(res1)); pc_orR
cat("\nPercentage of muts with OR>1 i.e resistant:"
cat("Number of R muts with OR>1:", nrow(res1)
, "\nPercentage of muts with OR>1 i.e resistant:"
, pc_orR *100 )
# muts with highest OR
@ -171,22 +171,23 @@ head(bar_or$mutationinformation, 10)
# sort df
bar_or = bar_or[order(bar_or$or_mychisq
, bar_or$ligand_distance
, bar_or$interface_dist
, bar_or$nca_dist
#, bar_or$interface_dist
, decreasing = T), ]
nrow(bar_or)
bar_or$drug_site = ifelse(bar_or$position%in%aa_pos_drug, "drug", "no")
table(bar_or$drug_site)
bar_or$dsl_site = ifelse(bar_or$position%in%aa_pos_dsl, "dsl", "no")
bar_or$rna_site = ifelse(bar_or$position%in%aa_pos_rna, "rna", "no")
table(bar_or$dsl_site)
bar_or$ca_site = ifelse(bar_or$position%in%aa_pos_ca, "ca", "no")
bar_or$sam_site = ifelse(bar_or$position%in%aa_pos_sam, "sam", "no")
table(bar_or$ca_site)
bar_or$cdl_site = ifelse(bar_or$position%in%aa_pos_cdl, "cdl", "no")
bar_or$amp_site = ifelse(bar_or$position%in%aa_pos_amp, "amp", "no")
table(bar_or$cdl_site)
top10_or = bar_or[1:10,]
# are these active sites