0
|
1
|
|
2 #!/usr/bin/env Rscript # siempre va comentado, la consola lo interpreta asi.
|
|
3 args = commandArgs(trailingOnly=TRUE) # siempre es asi, no cambia.
|
|
4
|
|
5 if(length(args) < 9){
|
|
6 stop("USE: Rscript.exe walker.R <receptor_PDBQT> <ligand_PDBQT> <out_PDBQT> <log_file> <coo_x > <coo_y> <coo_z> <eboxsizedata> <galaxy_output>")
|
|
7 }
|
|
8
|
|
9 receptor_PDBQT <- args[1]
|
|
10 ligand_PDBQT <- args[2]
|
|
11 out_PDBQT <- args[3]
|
|
12 log_file <- args[4]
|
|
13 coo_x <- args[5]
|
|
14 coo_y <- args[6]
|
|
15 coo_z <- args[7]
|
|
16 eboxsizedata <- args[8]
|
|
17
|
|
18 receptor_data <- paste("receptor =", args[1], sep = " ")
|
|
19 ligando_data <- paste("ligand =" , args[2], sep = " ")
|
|
20 out_data <- paste("out =" , args[3], sep = " ")
|
|
21 log_file <- paste("log =", args[4], sep = " ")
|
|
22 center_x_data <- paste("center_x =", args[5], sep = " ")
|
|
23 center_y_data <- paste("center_y =", args[6], sep = " ")
|
|
24 center_z_data <- paste("center_z =", args[7], sep = " ")
|
|
25 aux <- as.numeric(scan(args[8], what="character", quiet=TRUE), quiet = TRUE)
|
|
26 size_x_data <- paste("size_x =", aux, sep = " ")
|
|
27 size_y_data <- paste("size_y =", aux, sep = " ")
|
|
28 size_z_data <- paste("size_z =", aux, sep = " ")
|
|
29
|
|
30 campos <- c(receptor_data,ligando_data, out_data, log_file, center_x_data, center_y_data, center_z_data, size_x_data, size_y_data, size_z_data)
|
|
31
|
|
32 datos <- c()
|
|
33 for(i in 1:length(campos)){
|
|
34 datos <-paste(c(datos, campos[i], sep="\n"))
|
|
35 }
|
|
36
|
|
37 write(datos, file=args[9], append=FALSE)
|
|
38
|