Mercurial > repos > bitlab > plidflow
comparison PLIDflow/scripts/envelopesmaker.R @ 0:6fcfa4756040 draft
Uploaded
author | bitlab |
---|---|
date | Tue, 14 Jan 2020 06:09:42 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6fcfa4756040 |
---|---|
1 #envelopesmaker.R makes FILL_Xout.pdb files where X represents values for envelopes from 10 to 100 | |
2 | |
3 #!/usr/bin/env Rscript | |
4 args = commandArgs(trailingOnly=TRUE) | |
5 | |
6 if(length(args) < 1){ | |
7 stop("USE: Rscript envelopesmaker.R <receptor_pdbqt> <session_dir> <pathAutoligand>") | |
8 } | |
9 | |
10 #Arguments definition | |
11 receptor_name <- args[1] | |
12 session_dir <- args[2] | |
13 pathLigand <- args[3] | |
14 | |
15 #recopy <- paste("/home/galaxy/galaxy/tools/proteindocking/scripts/", basename(args[1]), ".txt", sep="") | |
16 #command <- paste("cp ", args[1], " ", recopy, sep="") #18jun2018 | |
17 #system(command) #18jun2018 | |
18 | |
19 # | |
20 | |
21 recopy_2 <- scan(paste(basename(args[1]), ".txt", sep=""), what = character(), quiet = TRUE) | |
22 | |
23 | |
24 #print(paste("es lo que va a salir",recopy_2[1])) | |
25 | |
26 #Ejecute from R a python script for Running Autoligand | |
27 sizes_file <- scan("templateenvelopsizes.txt", what = character(), quiet = TRUE) | |
28 | |
29 path_cajonDesastre <- recopy_2[1] | |
30 | |
31 segment_paste <- paste("python", pathLigand, "-r", path_cajonDesastre, "-p", sep = " ") | |
32 #segment_paste <- paste("python /home/eugenia/workflowsoftware/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/AutoDockTools/AutoLigand.py -r", path_cajonDesastre, "-p", sep = " ") | |
33 | |
34 #print(segment_paste) | |
35 | |
36 #print(paste("es lo que va a salir",recopy_2[1])) | |
37 | |
38 for(i in 1:length(sizes_file)){ | |
39 size <- sizes_file[i] | |
40 | |
41 ##porcentaje <- (i/length(sizes_file))*100 | |
42 | |
43 ##print(paste(paste(porcentaje, "%", sep = ""),"completed", sep = " ")) | |
44 | |
45 | |
46 # HEMOS TACHADO ESTE SYSTEM | |
47 print(paste(segment_paste,size, sep = " ")) | |
48 | |
49 # ENABLE THIS SYSTEM | |
50 #system(paste(segment_paste,size, sep = " "), intern = TRUE) | |
51 write(paste(segment_paste,size, sep = " "), file = "commands", append = TRUE) | |
52 } | |
53 | |
54 system("tac commands > rev_commands") | |
55 system("./parallel_launch.sh rev_commands 2") | |
56 | |
57 |