19
|
1 #Plottool makes a graph barplot of the variance
|
|
2 #MB
|
|
3
|
|
4 #commands extracting of commandline
|
|
5 args <- commandArgs(TRUE)
|
|
6
|
|
7 #input files and options
|
|
8 input <- args[1]
|
|
9 title <- args[2]
|
|
10 #output file
|
|
11 output <- args[3]
|
|
12
|
|
13 #reading of input files
|
|
14 read <- read.csv(file <- input,header = TRUE)
|
|
15
|
|
16 stdev<- read[,1] #standard deviation
|
|
17 pov = stdev^2/sum(stdev^2) #variance
|
|
18
|
|
19 png(output) #output in png format
|
|
20
|
|
21
|
|
22 #creating the barplot with the variance of pca
|
|
23 suppressMessages(barplot(pov, main = title, names.arg = c(1:NROW(pov)), ylim = c(0,1), col = heat.colors(3)))
|
|
24
|
|
25
|
|
26 graphics.off()
|