updated running_plotting_scripts.R

This commit is contained in:
Tanushree Tunstall 2021-09-07 11:16:41 +01:00
parent ebca0f4221
commit bc89534f64
24 changed files with 49 additions and 11 deletions

24
scripts/plotting/lineage_basic_barplots_combined.R Normal file → Executable file
View file

@ -3,9 +3,10 @@ getwd()
setwd("~/git/LSHTM_analysis/scripts/plotting/")
getwd()
#########################################################
# TASK: Basic lineage barplot showing numbers
# TASK: Basic lineage barplots showing numbers
# Output: Basic barplot with lineage samples and mut count
# + SNP diversity
##########################################################
# Installing and loading required packages
@ -16,6 +17,27 @@ source("../functions/bp_lineage.R")
#===========
# input
#===========
#drug = 'streptomycin'
#gene = 'gid'
spec = matrix(c(
"drug" , "d", 1, "character",
"gene" , "g", 1, "character",
"data_file1" , "fa", 2, "character",
"data_file2" , "fb", 2, "character"
), byrow = TRUE, ncol = 4)
opt = getopt(spec)
drug = opt$drug
gene = opt$gene
infile_params = opt$data_file1
infile_metadata = opt$data_file2
if(is.null(drug)|is.null(gene)) {
stop("Missing arguments: --drug and --gene must both be specified (case-sensitive)")
}
source ('get_plotting_dfs.R')
cat("Directories imported:"