forked from Schlicklab/RAG-IF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcollect_input.py
59 lines (40 loc) · 1.31 KB
/
collect_input.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# This script is designed to collect necessary input files automatically
# given a prefix name
#
#
#
import os.path
import sys
import os
prefix = sys.argv[1] #"Top236"
#pathDir1 = "/Users/yt34/NYU_Drive_Google/Work/RNA-projects/Swati_Test/BPSEQ/"
#pathDir2 = "/Users/yt34/NYU_Drive_Google/Work/RNA-projects/Swati_Test/SEQ/"
# change these two paths according to the target and your folder
pathDir1 = sys.argv[2] + "/BPSEQ/"
pathDir2 = sys.argv[2] + "/SEQ/"
if os.path.isfile(pathDir1+prefix+".bpseq"):
os.system("cp "+pathDir1+prefix+".bpseq "+ " .")
else:
print "Error: file missing.\nAbort."
sys.exit()
if os.path.isfile(pathDir1+prefix+".nupack.bpseq"):
os.system("cp "+pathDir1+prefix+".nupack.bpseq "+ " .")
else:
print "Error: file missing.\nAbort."
sys.exit()
if os.path.isfile(pathDir2+prefix+".seq"):
os.system("cp "+pathDir2+prefix+".seq "+ " .")
else:
print "Error: file missing.\nAbort."
sys.exit()
if os.path.isfile(pathDir2+prefix+".rnafold"):
os.system("cp "+pathDir2+prefix+".rnafold "+ " .")
else:
print "Error: file missing.\nAbort."
sys.exit()
if os.path.isfile(pathDir2+prefix+".forna"):
os.system("cp "+pathDir2+prefix+".forna "+ prefix+".rnafold.forna")
else:
print "Error: file missing.\nAbort."
sys.exit()
print "Necessary files have been copied."