tweaking baic bp to make generic
This commit is contained in:
parent
aaa24ca32d
commit
a5715bcccc
2 changed files with 55 additions and 73 deletions
|
@ -14,7 +14,49 @@ getwd()
|
|||
library(ggplot2)
|
||||
library(data.table)
|
||||
library(dplyr)
|
||||
|
||||
# Set globals:
|
||||
source("plotting_globals.R")
|
||||
# pretent cli
|
||||
drug = "streptomycin"
|
||||
gene = "gid"
|
||||
infile = "merged_df3_short.csv"
|
||||
|
||||
import_dirs(drug, gene)
|
||||
|
||||
source("plotting_data.R")
|
||||
plotting_data("merged_df3_short.csv")
|
||||
|
||||
if (!exists("infile") && exists("gene")){
|
||||
#in_filename_params = paste0(tolower(gene), "_all_params.csv")
|
||||
in_filename_params = paste0(tolower(gene), "_comb_stab_struc_params.csv") # part combined for gid
|
||||
infile = paste0(outdir, "/", in_filename_params)
|
||||
}
|
||||
|
||||
plotting_data(infile)
|
||||
|
||||
|
||||
#=======================================================================
|
||||
# command line args
|
||||
spec = matrix(c(
|
||||
"drug" , "d", 1, "character",
|
||||
"gene" , "g", 1, "character"
|
||||
), byrow = TRUE, ncol = 4)
|
||||
|
||||
opt = getopt(spec)
|
||||
|
||||
#FIXME: detect if script running from cmd, then set these
|
||||
drug = opt$drug
|
||||
gene = opt$gene
|
||||
|
||||
# hardcoding when not using cmd
|
||||
#drug = "streptomycin"
|
||||
#gene = "gid"
|
||||
|
||||
if(is.null(drug)|is.null(gene)) {
|
||||
stop("Missing arguments: --drug and --gene must both be specified (case-sensitive)")
|
||||
}
|
||||
#=======================================================================
|
||||
|
||||
# should return the following dfs, directories and variables
|
||||
# my_df
|
||||
|
@ -31,7 +73,7 @@ cat(paste0("Directories imported:"
|
|||
cat(paste0("Variables imported:"
|
||||
, "\ndrug:", drug
|
||||
, "\ngene:", gene
|
||||
, "\ngene_match:", gene_match
|
||||
#, "\ngene_match:", gene_match
|
||||
, "\nLength of upos:", length(upos)
|
||||
, "\nAngstrom symbol:", angstroms_symbol))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue