tidied plotting_data.R as a function returning a lits of dfs
This commit is contained in:
parent
9af0249e0e
commit
1505a3c707
3 changed files with 134 additions and 81 deletions
|
@ -1,17 +1,23 @@
|
|||
#!/usr/bin/env Rscript
|
||||
#!/usr/bin/env Rscript
|
||||
|
||||
#########################################################
|
||||
# TASK: importing dir str
|
||||
# create a function that takes 'drug' and 'gene' as args,
|
||||
# This script is sourced by plotting.R to import dir str
|
||||
# for various plots, etc.
|
||||
# TASK: importing global variable for plotting
|
||||
# import_dirs()
|
||||
# other global variables
|
||||
#########################################################
|
||||
|
||||
# import_dirs(): similar to mkdirs from python script in repo.
|
||||
# input args: 'drug' and 'gene'
|
||||
# output: dir names for input and output files
|
||||
|
||||
import_dirs <- function(drug, gene) {
|
||||
gene_match = paste0(gene,"_p.")
|
||||
cat(gene_match)
|
||||
|
||||
#=============
|
||||
#============================
|
||||
# directories and variables
|
||||
#=============
|
||||
#============================
|
||||
|
||||
datadir <<- paste0("~/git/Data/")
|
||||
indir <<- paste0(datadir, drug, "/input")
|
||||
outdir <<- paste0("~/git/Data/", drug, "/output")
|
||||
|
@ -23,10 +29,11 @@ import_dirs <- function(drug, gene) {
|
|||
|
||||
}
|
||||
|
||||
#==================
|
||||
# mcsm ligand distance cut off
|
||||
#==================
|
||||
mcsm_lig_cutoff <<- 10
|
||||
# other globals
|
||||
#===============================
|
||||
# mcsm ligand distance cut off
|
||||
#===============================
|
||||
#mcsm_lig_cutoff <<- 10
|
||||
|
||||
#==================
|
||||
# Angstroms symbol
|
||||
|
@ -35,15 +42,15 @@ mcsm_lig_cutoff <<- 10
|
|||
angstroms_symbol <<- "\u212b"
|
||||
#cat(paste0("There are ", nrow(my_df_u_lig), " sites lying within 10", angstroms_symbol, " of the ligand\n"))
|
||||
|
||||
#==================
|
||||
#===============
|
||||
# Delta symbol
|
||||
#==================
|
||||
#===============
|
||||
|
||||
delta_symbol <<- "\u0394"; delta_symbol
|
||||
|
||||
###########################
|
||||
# variables for my cols
|
||||
###########################
|
||||
#==========
|
||||
# Colours
|
||||
#==========
|
||||
|
||||
mcsm_red2 <<- "#ae301e" # most negative
|
||||
mcsm_red1 <<- "#f8766d"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue