annotate PLIDflow/scripts/glgfilemaker.R @ 2:afd5b5ffc38f draft

Uploaded
author bitlab
date Tue, 14 Jan 2020 07:52:48 -0500
parents 6fcfa4756040
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
1 #glgfilemarker.R makes GLG file and map files
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
2
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
3 #!/usr/bin/env Rscript
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
4 args = commandArgs(trailingOnly=TRUE)
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
5
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
6 if(length(args) < 1){
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
7 stop("USE: Rscript glgfilemaker.R <receptor_name> <session_dir>")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
8 }
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
9
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
10 #Arguments definition
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
11 receptor_name <- args[1]
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
12 session_dir <- args[2]
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
13
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
14 #Running AutiGrid4
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
15 ##autogrid4 -p <file>.gpf -l <file>.glg &
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
16
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
17
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
18 recopy <- paste( basename(args[1]),".pdbqt" ,sep="")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
19 command <- paste("cp ", args[1], " ", recopy, sep="")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
20 #print(paste("ESTOY IMPRIMIENDO ", command))
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
21 system(command)
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
22
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
23 #print(recopy)
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
24
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
25 receptor_name_gpf <- paste( basename(args[1]), ".gpf", sep="")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
26 receptor_name_glg <- paste( basename(args[1]), ".glg", sep="")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
27 #print(receptor_name_gpf)
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
28 elemento_concetenar <- paste( "autogrid4 -p", sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
29 elemento_concetenar <- paste(elemento_concetenar, receptor_name_gpf, sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
30 elemento_concetenar <- paste(elemento_concetenar, "-l ", receptor_name_glg, sep = " ")
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
31
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
32 #print(elemento_concetenar)
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
33
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
34
6fcfa4756040 Uploaded
bitlab
parents:
diff changeset
35 system(elemento_concetenar)