# HG changeset patch # User bornea # Date 1447957804 18000 # Node ID 7b797749e8c4add9acf3fe7e3a63b0db327dad39 # Parent 80cc85d7d6e39ec0b3976de9a776070212ccceee Uploaded diff -r 80cc85d7d6e3 -r 7b797749e8c4 bubbles_v9_NSAF_natural_log.R --- a/bubbles_v9_NSAF_natural_log.R Thu Nov 19 13:26:35 2015 -0500 +++ b/bubbles_v9_NSAF_natural_log.R Thu Nov 19 13:30:04 2015 -0500 @@ -3,6 +3,20 @@ # R-code: Multi-bubble graph generation from SAINTexpress output # Author: Brent Kuenzi ################################################################################################### +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() library(dplyr); library(tidyr); library(ggplot2) ################################################################################################### @@ -228,20 +242,7 @@ 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') - } -} + args <- commandArgs(trailingOnly = TRUE) main(args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9])