# HG changeset patch
# User bitlab
# Date 1587550320 14400
# Node ID 795e11fac81bbabe5dd51436615a56c25c0d4447
# Parent 97f12f7cc852fc599db43b8e1aa2ca7bcde3dda3
Included new tools for standardization
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/autodocktools_lig_plidflow.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/autodocktools_lig_plidflow.xml Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,17 @@
+
+ AutoDock is a suite of automated docking tools. It is designed to predict how small molecules, such as substrates or drug candidates, bind to a receptor of known 3D structure.
+
+
+
+
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/autodocktools_rec_plidflow.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/autodocktools_rec_plidflow.xml Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,22 @@
+
+ AutoDock is a suite of automated docking tools. It is designed to predict how small molecules, such as substrates or drug candidates, bind to a receptor of known 3D structure
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/confmaker_multiple_plidflow.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/confmaker_multiple_plidflow.xml Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,34 @@
+
+ is a tool to select optimal Vina mode 1 energy.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/drawSMI_plidflow.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/drawSMI_plidflow.xml Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,30 @@
+
+ Plot an SMI chain using the Rdkit package
+
+ rdkit
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/eboxsize_plidflow.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/eboxsize_plidflow.xml Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,15 @@
+
+ is a tool to customize the box size for individual query ligands in order to maximize the accuracy of molecular docking.
+
+
+
+ $eboxsizedata ;
+ rm ${ligand_pdbqt}.pdbqt ;
+ ]]>
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/launch_confmaker_multiple.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/launch_confmaker_multiple.sh Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,103 @@
+receptor_pdbqt=$1
+receptor_pdbqt_modified=$2
+receptor_pdbqt_modified2=$3
+ligand_pdbqt=$4
+size_x=$5
+out=$6
+log=$7
+receptor_name=$8
+ligand_name=$9
+receptor_file=${10}
+receptorTypes=${11}
+toolsDirectory=${12}
+
+MYRAND=$(( ( RANDOM % 10000000 ) + 1 ))
+RANDDIR=${MYRAND}
+
+
+# ENABLE PROTEIN CODE
+proteinCode=$(echo ${13} | awk '{print toupper($0)}')
+
+# ENABLE PROTEIN CODE
+#PROTEINDB=${YOUR_PATH_TO_FOLDER_DB}
+PROTEINDB=/home/galaxy-bitlab/proteindb
+
+
+
+mkdir $RANDDIR
+
+
+cp -r ${toolsDirectory}/scripts/* $RANDDIR
+
+cp $receptorTypes $RANDDIR
+NOMBRERECEPTOR=$(basename $receptorTypes)
+mv $RANDDIR/$NOMBRERECEPTOR $RANDDIR/receptor_atm_types.txt
+
+MYPWD=$PWD
+
+
+cd $RANDDIR
+
+source ADT_VENV/bin/activate
+
+(Rscript pdbcenter_npts_finder.R $receptor_pdbqt_modified2 $MYPWD/$RANDDIR) 2>&1
+
+(Rscript gpffilemaker.R $receptor_pdbqt_modified2 $MYPWD/$RANDDIR) 2>&1
+
+(Rscript glgfilemaker.R $receptor_pdbqt_modified2 $MYPWD/$RANDDIR) 2>&1
+
+echo "[INFO] Working path: $PWD"
+
+
+proteinPath=$PROTEINDB/$proteinCode
+echo "[INFO] - Extracting protein code [$proteinPath]"
+isRandomID="FALSE"
+if [ "$proteinCode" == "X__OC__PROTEINCODE__CC__" ]
+then
+ isRandomID="TRUE"
+ echo "No protein code supplied"
+fi
+
+filloutsNum=0
+filloutsAreGood=1
+if [ -d "$proteinPath" ] && [ $isRandomID == "FALSE" ]; then
+
+ for x in {10..600..10}
+ do
+ filloutsNum=$(ls -lh $PROTEINDB/$proteinCode/FILL_${x}out* 2> /dev/null | wc -l)
+ if [ $filloutsNum -eq 0 ]; then
+ filloutsAreGood=0
+ echo "[INFO] Did not find fillout $x"
+ fi
+ done
+else
+ filloutsAreGood=0
+fi
+
+if [ -d "$proteinPath" ] && [ $filloutsAreGood -eq 1 ] && [ $isRandomID == "FALSE" ]; then
+ echo "[INFO] Found protein in database. Reusing envelopes."
+ cp $proteinPath/FILL* .
+else
+ echo "[INFO] Did not find protein in database. Computing envelopes."
+ pathLigand=$(which AutoLigand.py)
+ (Rscript envelopesmaker.R $receptor_pdbqt_modified2 $MYPWD/$RANDDIR $pathLigand) 2>&1
+ mkdir $proteinPath
+ cp FILL* $proteinPath
+
+fi
+
+
+(Rscript clusterfilemaker.R $MYPWD/$RANDDIR) 2>&1
+
+(Rscript clusterfinder_Auto.R $MYPWD/$RANDDIR) 2>&1
+
+(Rscript cluster_to_vina_cluster.R $receptor_pdbqt_modified2 $ligand_pdbqt $out $log $size_x $MYPWD/$RANDDIR $receptor_name $ligand_name) 2>&1
+
+
+rm -rf ./CONDA_RDKIT_ENV
+rm -rf ./ADT_VENV
+
+cd $MYPWD
+
+
+deactivate
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/openbabel_SDF_plidflow.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/openbabel_SDF_plidflow.xml Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,10 @@
+
+ Open Babel converts chemical structures from one file format to another. Use Open Babel to convert SDF files to PDF files
+
+
+
+ (obabel -i sdf $ligand_sdf -o pdb -O $ligand_pdb) &>/dev/null
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/openbabel_SMI_plidflow.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/openbabel_SMI_plidflow.xml Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,14 @@
+
+ Open Babel converts chemical structures from one file format to another. Use Open Babel to convert SMI files to SDF files
+
+
+
+
+
+
+
+ (obabel -i smi $ligand_smi -o sdf -O $ligand_sdf --gen3D $stripsalts) &>/dev/null
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/openbabel_conversion_plidflow.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/openbabel_conversion_plidflow.xml Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,10 @@
+
+ Open Babel converts chemical structures from one file format to another. Use Open Babel to convert to the dative bond form
+
+
+
+ (obabel $ligand_smi -O $ligand_converted_smi -b) &>/dev/null
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/pdb2pqr_plidflow.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/pdb2pqr_plidflow.xml Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,23 @@
+
+ Converts a pdb to pqr
+
+
+
+ /dev/null ;
+
+ rm ${receptor_pdb}.prepdb ;
+
+ ${__tool_directory__}/scripts/includeAtom3.sh ${__tool_directory__}/scripts/table ${pdb_processed}.pqr > ${pdb_processed} ;
+
+ rm ${pdb_processed}.pqr ;
+
+ ]]>
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/pubchemSMI_plidflow.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/pubchemSMI_plidflow.xml Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,19 @@
+
+ Standardize a SMILE chain using the PubChem service
+
+
+
+ $standard_smi
+
+ ]]>
+
+
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/scripts/cluster_to_vina_cluster.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/scripts/cluster_to_vina_cluster.R Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,100 @@
+#cluster_to_vina_clusters.R introduces the x, y,z, coordenates of the cluster/-s identified in the vina file configuration how many cluster/-s identified
+
+#!/usr/bin/env Rscript
+args = commandArgs(trailingOnly=TRUE)
+
+if(length(args) < 8){
+ stop("USE: Rscript cluster_to_vina_clusters.R ")
+ #stop("USE: Rscript cluster_to_vina_clusters.R ")
+}
+
+#Arguments definition
+receptor_name <- args[1]
+ligand_name <- args[2]
+out_PDBQT <- args[3]
+log_file <- args[4]
+eboxsizedata <- args[5]
+session_dir <- args[6]
+#out_conf_file <- args[6]
+receptor_filename <- args[7]
+ligand_filename <- args[8]
+
+setwd(session_dir)
+
+#print("before reading table")
+clusters_file <- read.table("clusterscoordenates.txt", header = TRUE)
+#print("After reading table")
+
+value <- 0
+el_b_que_me_quedo <- 1
+for(v in 1: nrow(clusters_file)){
+ coo_x <- clusters_file[v,2]
+ coo_y <- clusters_file[v,3]
+ coo_z <- clusters_file[v,4]
+
+
+ #
+ argumentos <- paste(args[1],args[2], args[3], args[4], coo_x, coo_y, coo_z, args[5], v, session_dir, sep = " ")
+ script_argumentos <- paste("Rscript vinafilemarkerclusters.R", argumentos, sep = " ")
+
+ system (script_argumentos)
+ system (paste("vina --config ", paste(v, "_vinaconfig", sep = ""), sep =""))
+ #system (paste("/home/eugenia/workflowsoftware/autodock_vina_1_1_2_linux_x86/bin/vina --config ", paste(v, "_vinaconfig", sep = ""), sep =""))
+ #write(paste("/home/eugenia/workflowsoftware/autodock_vina_1_1_2_linux_x86/bin/vina --config ", paste(v, "_vinaconfig", sep = ""), sep =""), file = "commands", append = TRUE)
+ #
+
+ #Save out pdbqt from Vina 30julio2018
+ #print("before scanning")
+ outlog_vina <- scan (paste(v, "_vinaconfig", sep = ""), what = character(), quiet = TRUE)
+ #print("after scanning")
+
+ pegar_mv_out9 <- paste("mv", outlog_vina[9], sep = " ")
+ pegar_v_out <- paste(v,"_", receptor_filename, "_", ligand_filename, "_out_vina.pdbqt", sep = "")
+ pegar_dos_outs <- paste(pegar_mv_out9, pegar_v_out, sep = " ")
+
+
+ #print(pegar_dos_outs)
+ system(pegar_dos_outs)
+
+ #Save log pdbqt from Vina 30julio2018
+ pegar_mv_out12 <- paste("mv", outlog_vina[12], sep = " ")
+ pegar_v_log <- paste(v,"_", receptor_filename, "_", ligand_filename, "_log_vina.log", sep = "")
+ pegar_dos_logs <- paste(pegar_mv_out12, pegar_v_log, sep = " ")
+
+ system(pegar_dos_logs)
+
+ #
+
+ #binding_mode1_energy <- scan(args[4], what = character(), quiet = TRUE)[122]
+ #if(v == 1) value <- binding_mode1_energy
+ #if(value > as.numeric(binding_mode1_energy)){
+ # value <- as.numeric(binding_mode1_energy)
+ # el_b_que_me_quedo <- v
+ #}
+}
+
+#copiador <- paste(el_b_que_me_quedo, "_vinaconfig", sep="")
+#argumentos <- paste("mv", copiador, out_conf_file, sep=" ")
+#print(argumentos)
+#system(argumentos)
+
+#system(paste("zip all-vinas-out.zip", "*_out_vina", sep = " ")) #antes del 31julio
+#system(paste("mv", "all-vinas-out.zip", args[3] , sep = " ")) #antes del 31julio
+
+#system(paste("zip all-vinas-log.zip", "*_log_vina", sep = " ")) #antes del 31julio
+#system(paste("mv", "all-vinas-log.zip", args[4] , sep = " ")) #antes del 31julio
+
+#31julio2018 ----> creo que hay que cambiar los guiones porque hoy se ha quedado pillado en los zip que no lo ha hecho
+#30agosto2018 -----> voy a hacer el cambio
+
+# USE THIS FOR keeping stdout but removing stderr
+# { cmd 2>&1 >&3 3>&- | logger 3>&-; } 3>&1
+
+system(paste("zip all_vinas_out.zip", "*_out_vina.pdbqt", sep = " ")) #30agosto
+system(paste("mv", "all_vinas_out.zip", args[3] , sep = " ")) #30agosto
+
+system(paste("zip all_vinas_log.zip", "*_log_vina.log", sep = " ")) #30agosto
+system(paste("mv", "all_vinas_log.zip", args[4] , sep = " ")) #30agosto
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/scripts/clusterfilemaker.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/scripts/clusterfilemaker.R Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,101 @@
+#clusterfilemaker.R makes a file containg geometric center coordenates for FILL_Xout1.pdb files. X represents envelopes size from 10 to 100
+
+#!/usr/bin/env Rscript
+args = commandArgs(trailingOnly=TRUE)
+
+if(length(args) < 1){
+ stop("USE: Rscript clusterfilemaker.R ")
+}
+
+#Select the directory where all files are being stored
+
+session_id <- args[1]
+
+print(session_id)
+
+setwd(session_id)
+
+#Scan dataset containig FILL_out1.pdb with point from 10 to 500
+fill_outs_1 <- scan("templatefillouts1.txt", what = character(), quiet = TRUE)
+
+#Write the head for the file later created which contains the middle point from FILL_out1.pdb with point from 10 to 500
+cabecera_fillfile <- paste("npts", sep = ";")
+cabecera <- c("x","y","z")
+
+for(i in 1:3){
+ cabecera_fillfile <- paste(cabecera_fillfile, cabecera[i], sep=";")
+}
+write(cabecera_fillfile, file="fillouts1file.txt", append= TRUE)
+
+#Loop to read the files FILL_out1.pdb and calculate the middle point
+num_points <- 0
+start_env <- 10 # to fit the first envelope size. In case to change envelope size, only modify this parameter
+jp <- 10 #jump between envelopes size. In case modify jump between envelopes size, only modify this parameter
+#In case modify start envelope size and jump, only modify start_env and jp parameters in the script nothing in following steps
+
+
+
+
+
+num_points <- (start_env - jp)
+for(f in 1:length(fill_outs_1)){
+# print(paste("Testing file ", fill_outs_1[f]))
+ if(file_test("-f", fill_outs_1[f])){
+ archivo <- scan(fill_outs_1[f], what = character(), quiet = TRUE)
+ }else{
+ next
+ }
+
+#Make a table with only x, y, z coordenates for C atoms only
+salto <- 0
+for(i in 1:(length(archivo)-2)){
+ if(archivo[i] == "ATOM" && ( archivo[i+2] == "C" || archivo[i+2] == "O" || archivo[i+2] == "H" )){
+ salto <- salto + 1
+ }
+}
+tablaC <- matrix(1, nrow = salto, ncol = 4)
+
+#Names for columns
+##First column correspond to position for atoms C. This column will be created when the C atom positions will be know
+###Write the name for columns and rows
+colnames(tablaC) <- c("C Position","X", "Y", "z")
+rownames(tablaC) <- 1:salto
+
+#Calculate the number of C atoms and to write theirs coordenates x,y,z in the tablaC
+salto <- 0
+posicionC <- c()
+for(i in 1:(length(archivo)-2)){
+ if(archivo[i] == "ATOM" && ( archivo[i+2] == "C" || archivo[i+2] == "O" || archivo[i+2] == "H" )){
+ salto <- salto + 1
+ posicionC <- c(posicionC, archivo[i+1])
+ tablaC[salto,2] <- as.numeric(archivo[i+5])
+ tablaC[salto,3] <- as.numeric(archivo[i+6])
+ tablaC[salto,4] <- as.numeric(archivo[i+7])
+ }
+}
+
+#Write the C atoms positions in column 1 of the table tablaC
+for(i in 1:salto){
+tablaC[i,1] <- as.numeric(posicionC[i])
+}
+
+#Calculate middle point for the FILL_out1.pdb given
+pto_x_medio <- (max(tablaC[,2]) + min(tablaC[,2]))/2
+pto_y_medio <- (max(tablaC[,3]) + min(tablaC[,3]))/2
+pto_z_medio <- (max(tablaC[,4]) + min(tablaC[,4]))/2
+
+#Write a plain text called fillouts1file.txt which contain in the first column number of point
+#for the envelope according to AutoLigand program. Columns 2,3,4 for coordenates x, y ,z
+#for the middle points for FILL_out1.pdb from 10 to 500 points
+num_points <- num_points + jp
+write(paste(num_points,pto_x_medio, pto_y_medio, pto_z_medio, sep=";"),file="fillouts1file.txt", append= TRUE)
+}
+
+
+
+
+
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/scripts/clusterfinder_Auto.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/scripts/clusterfinder_Auto.R Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,170 @@
+# #clusterfinder_Auto.R makes a file containig the coordenates of the identified cluster/-s by Silhouette criterion
+#
+#!/usr/bin/env Rscript
+args = commandArgs(trailingOnly=TRUE)
+
+if(length(args) < 1){
+ stop("USE: Rscript clusterfinder_Auto.R ")
+}
+
+#Arguments definition
+
+session_id <- args[1]
+
+print(session_id)
+
+setwd(session_id)
+
+options(error=traceback)
+options(warn=-1)
+
+#Load required library
+library(cluster)
+
+#Load required libraries
+library(clValid)
+
+#Loading required package: cluster
+library(fpc)
+
+#Install NbClust package
+#install.packages("NbClust",dependencies = TRUE)
+
+#Loading required package: NbClust
+library(NbClust)
+
+
+#Read the dataset
+data_centers <- read.table("fillouts1file.txt", header=TRUE, sep=";", na.strings="")
+#data_centers <- read.table("fillouts1file.txt", header=TRUE, sep=";", na.strings="")
+
+
+#Run the XXX for selection of the number of clusters
+
+clustersdata <- NbClust(data_centers, diss=NULL, distance = "euclidean", min.nc=2, max.nc=15, method = "kmeans", index = "all", alphaBeale = 0.1)
+
+#capture.output(clustersdata$Best.nc[1,], file = "bestnumberclusters.txt")
+
+#capture.output(NbClust(data_centers, diss=NULL, distance = "euclidean", min.nc=2, max.nc=15, method = "kmeans", index = "all", alphaBeale = 0.1), file = "proofclusters.txt")
+
+#capture.output(NbClust(data_centers, diss=NULL, distance = "euclidean", min.nc=2, max.nc=15, method = "kmeans", index = "all", alphaBeale = 0.1), file = "numclusters.txt")
+
+#best_num_cluster <- scan("proofclusters.txt", what = character(), quiet = TRUE)
+
+k.max <- as.integer(rownames(table(clustersdata$Best.nc[1,]))[which.max(apply(table(clustersdata$Best.nc[1,]),MARGIN=1,max))])
+
+km.res <- kmeans(as.matrix(data_centers), centers = k.max, nstart = 25)
+
+best_position <- as.integer(rownames(table(clustersdata$Best.nc[1,]))[which.max(apply(table(clustersdata$Best.nc[1,]),MARGIN=1,max))])
+
+# Make clustercoordenates table
+#X Coordenate
+start_x <- best_position + 1
+end_x <- start_x + (best_position - 1)
+
+cluster_pos_x <- 1
+x_pos <- c()
+for (c in start_x:end_x){
+ x_pos[cluster_pos_x] <- km.res$centers[c]
+ cluster_pos_x <- cluster_pos_x + 1
+}
+#print(x_pos)
+
+#Y Coordenate
+start_y <- end_x + 1
+end_y <- start_y + (best_position - 1)
+
+cluster_pos_y <- 1
+y_pos <- c()
+for(cc in start_y:end_y){
+ y_pos[cluster_pos_y] <- km.res$centers[cc]
+ cluster_pos_y <- cluster_pos_y + 1
+}
+#print(y_pos)
+
+#Z Coordenate
+start_z <- end_y + 1
+end_z <- start_z + (best_position - 1)
+
+cluster_pos_z <- 1
+z_pos <- c()
+for(ccc in start_z:end_z){
+ z_pos[cluster_pos_z] <- km.res$centers[ccc]
+ cluster_pos_z <- cluster_pos_z + 1
+}
+#print(z_pos)
+
+#Create a file with clusters coordenates. Cluster coordenates are vectors x_pos, y_pos, z_pos
+num_filas <- length(x_pos)
+clusters_tabla <- matrix(1, nrow = num_filas, ncol = 4) #columns are column 1 number of ccluster, column 2 x-coordenates, colum 3 y-coordenates, column 4 z-coordenates
+
+##Add number of cluster located in column 1
+for(i in 1:num_filas){
+ clusters_tabla[i,1] <- i
+}
+
+##Add cluster x,y,z-coordenates in clusters_tabla
+#x-coordenates
+v_pos_x <- 1
+for(f in 1:num_filas){
+ clusters_tabla[f,2] <- x_pos[v_pos_x]
+ v_pos_x <- v_pos_x + 1
+}
+
+#y-coordenates
+v_pos_y <- 1
+for(ff in 1:num_filas){
+ clusters_tabla[ff,3] <- y_pos[v_pos_y]
+ v_pos_y <- v_pos_y + 1
+}
+
+#z-coordenates
+v_pos_z <- 1
+for(fff in 1:num_filas){
+ clusters_tabla[fff,4] <- z_pos[v_pos_z]
+ v_pos_z <- v_pos_z + 1
+}
+
+#Write the head for the file which contains the number of clusters annd their coordenates
+cabecera_clusterscoordenates <- paste("cluster", sep = " ")
+cabecera <- c("x","y","z")
+
+for(i in 1:3){
+ cabecera_clusterscoordenates <- paste(cabecera_clusterscoordenates, cabecera[i], sep=" ")
+}
+#write(cabecera_clusterscoordenates, file="/home/galaxy/galaxy/tools/proteindocking/scripts/clusterscoordenates.txt", append= TRUE)
+write(cabecera_clusterscoordenates, file="clusterscoordenates.txt", append= TRUE)
+
+#Write rows containing number of cluster and coordenates
+for(i in 1:nrow(clusters_tabla)){
+ fila_completa <- paste(clusters_tabla[i,1], sep = " ")
+ for(j in 2:ncol(clusters_tabla)){
+ fila_completa <- paste(fila_completa, clusters_tabla[i,j], sep=" ")
+ }
+ write(fila_completa, file="clusterscoordenates.txt", append= TRUE)
+ #write(fila_completa, file="/home/galaxy/galaxy/tools/proteindocking/scripts/clusterscoordenates.txt", append= TRUE)
+}
+
+
+#Table to see Binding Sited finded in Galaxy screen
+#BS_screen <- scan("/home/galaxy/galaxy/tools/proteindocking/scripts/clusterscoordenates.txt", what = character(), quiet = TRUE)
+BS_screen <- scan("clusterscoordenates.txt", what = character(), quiet = TRUE)
+
+BS_table <- matrix(1, nrow = nrow(clusters_tabla), ncol = ncol(clusters_tabla))
+
+bs_count <- 5
+for(i in 1:nrow(clusters_tabla)){
+ for(j in 1:ncol(clusters_tabla)){
+ BS_table[i,j] <- BS_screen[bs_count]
+ bs_count <- bs_count +1
+ }
+}
+
+colnames(BS_table) <- c("Binding Site", "X", "Y", "Z")
+print(BS_table)
+
+
+
+
+
+
diff -r 97f12f7cc852 -r 795e11fac81b PLIDflow/scripts/draw_mol.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PLIDflow/scripts/draw_mol.py Wed Apr 22 06:12:00 2020 -0400
@@ -0,0 +1,25 @@
+from rdkit import Chem
+from rdkit.Chem import Draw
+
+import sys
+
+
+if(len(sys.argv) < 3):
+ print("Use: ", str(sys.argv[0]), "