diff PLIDflow/scripts/vinafilemaker.R @ 0:6fcfa4756040 draft

Uploaded
author bitlab
date Tue, 14 Jan 2020 06:09:42 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/scripts/vinafilemaker.R	Tue Jan 14 06:09:42 2020 -0500
@@ -0,0 +1,38 @@
+
+#!/usr/bin/env Rscript      # siempre va comentado, la consola lo interpreta asi. 
+args = commandArgs(trailingOnly=TRUE) # siempre es asi, no cambia.
+
+if(length(args) < 9){
+   stop("USE: Rscript.exe walker.R <receptor_PDBQT> <ligand_PDBQT> <out_PDBQT> <log_file> <coo_x > <coo_y> <coo_z> <eboxsizedata> <galaxy_output>")
+ }
+
+receptor_PDBQT <- args[1]
+ligand_PDBQT <- args[2]
+out_PDBQT <- args[3]
+log_file <- args[4]
+coo_x <- args[5]
+coo_y <- args[6]
+coo_z <- args[7]
+eboxsizedata <- args[8]
+
+receptor_data <- paste("receptor =", args[1], sep = " ")
+ligando_data <- paste("ligand =" , args[2], sep = " ")
+out_data <- paste("out =" , args[3], sep = " ")
+log_file <- paste("log =", args[4], sep = " ")
+center_x_data <- paste("center_x =", args[5], sep = " ")
+center_y_data <- paste("center_y =", args[6], sep = " ")
+center_z_data <- paste("center_z =", args[7], sep = " ")
+aux <- as.numeric(scan(args[8], what="character", quiet=TRUE), quiet = TRUE)
+size_x_data <- paste("size_x =", aux, sep = " ")
+size_y_data <- paste("size_y =", aux, sep = " ")
+size_z_data <- paste("size_z =", aux, sep = " ")
+
+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)
+
+datos <- c()
+for(i in 1:length(campos)){
+  datos <-paste(c(datos, campos[i], sep="\n"))
+}
+
+write(datos, file=args[9], append=FALSE)
+