going through functions and script for interactive plots
This commit is contained in:
parent
1f266c4cb8
commit
3f7bc908ec
7 changed files with 83 additions and 95 deletions
|
@ -21,7 +21,7 @@
|
|||
# 1) large combined df including NAs for AF, OR,etc
|
||||
# Dim: same no. of rows as gene associated meta_data_with_AFandOR
|
||||
# 2) small combined df including NAs for AF, OR, etc.
|
||||
# Dim: same as mcsm data
|
||||
# Dim: same as mcsm data or foldX
|
||||
# 3) large combined df excluding NAs
|
||||
# Dim: dim(#1) - na_count_df2
|
||||
# 4) small combined df excluding NAs
|
||||
|
@ -31,10 +31,13 @@
|
|||
# 6) LIGAND small combined df excluding NAs
|
||||
# Dim: dim()
|
||||
#==========================================================
|
||||
#lig_dist_colname = 'ligand_distance' or global var LigDist_colname
|
||||
#lig_dist_cutoff = 10 or global var LigDist_cutoff
|
||||
|
||||
combining_dfs_plotting <- function( my_df_u
|
||||
, gene_metadata
|
||||
, lig_dist_colname = 'ligand_distance'
|
||||
, lig_dist_cutoff = 10){
|
||||
, lig_dist_colname = ''
|
||||
, lig_dist_cutoff = ''){
|
||||
|
||||
# counting NAs in AF, OR cols
|
||||
# or_mychisq
|
||||
|
|
|
@ -16,9 +16,12 @@ library(dplyr)
|
|||
## my_df_u_lig
|
||||
## dup_muts
|
||||
#========================================================
|
||||
#lig_dist_colname = 'ligand_distance' or global var LigDist_colname
|
||||
#lig_dist_cutoff = 10 or global var LigDist_cutoff
|
||||
|
||||
plotting_data <- function(df
|
||||
, lig_dist_colname = 'ligand_distance'
|
||||
, lig_dist_cutoff = 10) {
|
||||
, lig_dist_colname = ''
|
||||
, lig_dist_cutoff = '') {
|
||||
my_df = data.frame()
|
||||
my_df_u = data.frame()
|
||||
my_df_u_lig = data.frame()
|
||||
|
|
|
@ -23,12 +23,16 @@ import_dirs <- function(drug_name, gene_name) {
|
|||
|
||||
dr_muts_col <<- paste0('dr_mutations_', drug_name)
|
||||
other_muts_col <<- paste0('other_mutations_', drug_name)
|
||||
resistance_col <<- "drtype"
|
||||
gene_match <<- paste0(gene_name,"_p.")
|
||||
|
||||
}
|
||||
|
||||
# other globals
|
||||
# Other globals
|
||||
#=====================
|
||||
# Resistance colname
|
||||
#=====================
|
||||
resistance_col <<- "drtype"
|
||||
|
||||
#===============================
|
||||
# mcsm ligand distance cut off
|
||||
#===============================
|
||||
|
@ -39,7 +43,6 @@ LigDist_cutoff <<- 10
|
|||
# Angstroms symbol
|
||||
#==================
|
||||
angstroms_symbol <<- "\u212b"
|
||||
#cat(paste0("There are ", nrow(my_df_u_lig), " sites lying within 10", angstroms_symbol, " of the ligand\n"))
|
||||
|
||||
#===============
|
||||
# Delta symbol
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue