Skip to content

Commit

Permalink
fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jadolfbr committed Jun 16, 2016
1 parent 79f3459 commit f0a3ee4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Imports:
optparse,
reshape2,
proto,
grid,
ggplot2 (>= 1.0.1),
RSQLite,
logspline,
Expand Down
1 change: 1 addition & 0 deletions R/support-save_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions inst/scripts/analysis/plots/scores/total_score.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

library(ggplot2)
library(plyr)
#library(grid)

feature_analyses <- c(feature_analyses, methods::new("FeaturesAnalysis",
id = "total_score",
Expand Down
10 changes: 8 additions & 2 deletions install_local.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(".")
devtools::install_local(".")

0 comments on commit f0a3ee4

Please sign in to comment.