annotate PLIDflow/scripts/vinafilemaker.R @ 6:795e11fac81b draft default tip

Included new tools for standardization
author bitlab
date Wed, 22 Apr 2020 06:12:00 -0400
parents 6fcfa4756040
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
1
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
2 #!/usr/bin/env Rscript # siempre va comentado, la consola lo interpreta asi.
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
3 args = commandArgs(trailingOnly=TRUE) # siempre es asi, no cambia.
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
4
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
5 if(length(args) < 9){
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
6 stop("USE: Rscript.exe walker.R <receptor_PDBQT> <ligand_PDBQT> <out_PDBQT> <log_file> <coo_x > <coo_y> <coo_z> <eboxsizedata> <galaxy_output>")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
7 }
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
8
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
9 receptor_PDBQT <- args[1]
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
10 ligand_PDBQT <- args[2]
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
11 out_PDBQT <- args[3]
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
12 log_file <- args[4]
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
13 coo_x <- args[5]
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
14 coo_y <- args[6]
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
15 coo_z <- args[7]
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
16 eboxsizedata <- args[8]
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
17
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
18 receptor_data <- paste("receptor =", args[1], sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
19 ligando_data <- paste("ligand =" , args[2], sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
20 out_data <- paste("out =" , args[3], sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
21 log_file <- paste("log =", args[4], sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
22 center_x_data <- paste("center_x =", args[5], sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
23 center_y_data <- paste("center_y =", args[6], sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
24 center_z_data <- paste("center_z =", args[7], sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
25 aux <- as.numeric(scan(args[8], what="character", quiet=TRUE), quiet = TRUE)
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
26 size_x_data <- paste("size_x =", aux, sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
27 size_y_data <- paste("size_y =", aux, sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
28 size_z_data <- paste("size_z =", aux, sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
29
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
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)
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
31
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
32 datos <- c()
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
33 for(i in 1:length(campos)){
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
34 datos <-paste(c(datos, campos[i], sep="\n"))
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
35 }
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
36
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
37 write(datos, file=args[9], append=FALSE)
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
38