diff --git a/DESCRIPTION b/DESCRIPTION index f91625d..803e30a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,6 +27,7 @@ Imports: optparse, reshape2, proto, + grid, ggplot2 (>= 1.0.1), RSQLite, logspline, diff --git a/R/support-save_plots.R b/R/support-save_plots.R index ddccae9..501a099 100644 --- a/R/support-save_plots.R +++ b/R/support-save_plots.R @@ -10,6 +10,7 @@ # Save the last ggplot() object created. For each output format, # generate a plot and put in the output directory + #' @export save_plots <- function( features_analysis, diff --git a/inst/scripts/analysis/plots/antibodies/contacts/ag_ab_contact_den.R b/inst/scripts/analysis/plots/antibodies/contacts/ag_ab_contact_den.R index c49d5aa..f96ff5e 100644 --- a/inst/scripts/analysis/plots/antibodies/contacts/ag_ab_contact_den.R +++ b/inst/scripts/analysis/plots/antibodies/contacts/ag_ab_contact_den.R @@ -58,7 +58,7 @@ run=function(self, sample_sources, output_dir, output_formats){ p <- ggplot(data=binary_data, na.rm=T, aes(x=CDR)) + geom_bar(position="dodge", aes(y=percent, fill=sample_source), stat='identity') + ggtitle("CDR Makes Antigen Contact") + - scale_y_continuous(label=percent) + + scale_y_continuous(label="percent") + ylab("% of sample source") plot_field(p, "cdr_makes_contact_hist") save_tables(self, binary_data, "cdr_makes_contact_table", sample_sources, output_dir, output_formats, @@ -117,7 +117,7 @@ run=function(self, sample_sources, output_dir, output_formats){ ggtitle("Average Percent of total contacts") + xlab("CDR") + ylab("Avg %") + - scale_y_continuous(label=percent) + scale_y_continuous(label="percent") plot_field(p, "avg_perc_total_contacts_hist") save_tables(self, avg_perc, "avg_perc_total_contacts_table", sample_sources, output_dir, output_formats, caption="Avg Percent of total contacts", caption.placement="top", quote_strings=F) diff --git a/inst/scripts/analysis/plots/interfaces/hbonds/int_hbonds_den.R b/inst/scripts/analysis/plots/interfaces/hbonds/int_hbonds_den.R index a9d0453..a6c9a72 100644 --- a/inst/scripts/analysis/plots/interfaces/hbonds/int_hbonds_den.R +++ b/inst/scripts/analysis/plots/interfaces/hbonds/int_hbonds_den.R @@ -138,14 +138,14 @@ run=function(self, sample_sources, output_dir, output_formats){ #Histogram p <- ggplot(data=hbond_counts, na.rm=T) + geom_bar(aes(x=n, y = ..density.. , fill=sample_source), position="dodge", binwidth=1) + - scale_y_continuous(label=percent) + + scale_y_continuous(label="percent") + xlab("hbonds") + ggtitle("Average Cross Interface Hydrogen Bonds") plot_field(p, "hbond_hist_by_all") p <- ggplot(data=hbond_counts, na.rm=T) + geom_bar(aes(x=n, y = ..density.. , fill=sample_source), position="dodge", binwidth=1) + - scale_y_continuous(label=percent) + + scale_y_continuous(label="percent") + xlab("hbonds") + ggtitle("Average Cross Interface Hydrogen Bonds") plot_field(p, "hbond_hist_by_interface", grid=~interface) diff --git a/inst/scripts/analysis/plots/scores/total_score.R b/inst/scripts/analysis/plots/scores/total_score.R index c366547..96cc803 100644 --- a/inst/scripts/analysis/plots/scores/total_score.R +++ b/inst/scripts/analysis/plots/scores/total_score.R @@ -10,6 +10,7 @@ library(ggplot2) library(plyr) +#library(grid) feature_analyses <- c(feature_analyses, methods::new("FeaturesAnalysis", id = "total_score", diff --git a/install_local.R b/install_local.R index 81a8af9..1d29dbd 100755 --- a/install_local.R +++ b/install_local.R @@ -2,9 +2,15 @@ #NOTE: You must run this script with SUDO!! - #install.packages("devtools", repos="http://cran.rstudio.com/") + +required_packages <- c("devtools", "roxygen2") + +if (length(setdiff(required_packages, rownames(installed.packages()))) > 0) { + install.packages(setdiff(required_packages, rownames(installed.packages())), repos="http://cran.rstudio.com/") +} + devtools::document() # if you changed function signatures devtools:build() -devtools::install_local(".") \ No newline at end of file +devtools::install_local(".")