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