# HG changeset patch # User mb2013 # Date 1400571007 14400 # Node ID f3d9bb18110a7e02eaa313a953dbe62e5c69ba43 # Parent a207e838f23221308d5ae644344857ca79dbb8d0 Uploaded diff -r a207e838f232 -r f3d9bb18110a variance_plot.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/variance_plot.R Tue May 20 03:30:07 2014 -0400 @@ -0,0 +1,26 @@ +#Plottool makes a graph barplot of the variance +#MB + +#commands extracting of commandline +args <- commandArgs(TRUE) + +#input files and options +input <- args[1] +title <- args[2] +#output file +output <- args[3] + +#reading of input files +read <- read.csv(file <- input,header = TRUE) + +stdev<- read[,1] #standard deviation +pov = stdev^2/sum(stdev^2) #variance + +png(output) #output in png format + + +#creating the barplot with the variance of pca +suppressMessages(barplot(pov, main = title, names.arg = c(1:NROW(pov)), ylim = c(0,1), col = heat.colors(3))) + + +graphics.off()