# HG changeset patch # User bornea # Date 1447957086 18000 # Node ID 79285a7acfbf782c28b239399fbd7e8995714ac3 # Parent 9617d82034c6f290db283c2217ad2568fd9485cd Uploaded diff -r 9617d82034c6 -r 79285a7acfbf bubbles_v9_NSAF_natural_log.R --- a/bubbles_v9_NSAF_natural_log.R Thu Nov 19 10:48:55 2015 -0500 +++ b/bubbles_v9_NSAF_natural_log.R Thu Nov 19 13:18:06 2015 -0500 @@ -3,6 +3,7 @@ # R-code: Multi-bubble graph generation from SAINTexpress output # Author: Brent Kuenzi ################################################################################################### +ins_check_run() library(dplyr); library(tidyr); library(ggplot2) ################################################################################################### ### Run program ### @@ -226,7 +227,22 @@ cutoff_check <- function(cutoff){ if( any(cutoff < 0 | cutoff > 1) ) stop('SAINT score cutoff not between 0 and 1. Please correct and try again') } +ins_check_run <- function() { + if ('dplyr' %in% rownames(installed.packages())){} + else { + install.packages('dplyr', repos='http://cran.us.r-project.org') + } + if ('tidyr' %in% rownames(installed.packages())){} + else { + install.packages('tidyr', repos='http://cran.us.r-project.org') + } + if ('ggplot2' %in% rownames(installed.packages())){} + else { + install.packages('ggplot2', repos='http://cran.us.r-project.org') + } +} +ins_check_run() args <- commandArgs(trailingOnly = TRUE) main(args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9])