-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetup.py
More file actions
143 lines (135 loc) · 3.69 KB
/
Setup.py
File metadata and controls
143 lines (135 loc) · 3.69 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri March 26 10:19:44 2021
@author: sb069
"""
from os.path import expanduser
import os
import errno
os.system("sudo apt-get install python 3.8 >/dev/null")
os.system("pip install scikit-learn >/dev/null")
os.system("pip install matplotlib >/dev/null")
os.system("pip install pickle-mixin >/dev/null")
os.system("pip install seaborn >/dev/null")
os.system("pip install isoelectric >/dev/null")
Download=str(os.environ['_'])
Downloads=Download.replace('/Setup.py','')
hdir=expanduser('~')
try:
os.system("sudo apt install hmmer")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mkdir -p 'Documents/PredFast'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mkdir -p 'Documents/PredFast/Databases'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mkdir -p 'Documents/PredFast/Output Files'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mkdir -p 'Documents/PredFast/Input Files'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mkdir -p 'Documents/PredFast/Machine Learning'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mkdir -p 'Documents/PredFast/Machine Learning/Model'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mkdir -p 'Documents/PredFast/Machine Learning/Prosite'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mkdir -p 'Documents/PredFast/Machine Learning/Run Outputs'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mkdir -p 'Documents/PredFast/Machine Learning/Run Outputs/Plots'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mkdir -p 'Documents/PredFast/Machine Learning/Run Outputs/Predictions'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
os.chdir(Downloads)
os.system("dir")
Dir=Downloads+"/"
try:
os.system("mv 'Header.txt' '" + hdir + "/Documents/PredFast/Machine Learning/Header.txt'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mv 'Resources Used' '" + hdir + "/Documents/PredFast'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mv 'RunAgainstModel.py' '" + hdir + "/Documents/PredFast/RunAgainstModel.py'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mv 'isol.py' '"+ hdir + "/Documents/PredFast/isol.py'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mv 'GradientBoostedRandomForest.py' '" + hdir + "/Documents/PredFast/GradientBoostedRandomForest.py'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mv 'Line.py' '" + hdir + "/Documents/PredFast/Line.py'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mv 'DatabaseBuilder.py' '" + hdir + "/Documents/PredFast/DatabaseBuilder.py'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mv 'prosite.dat' '" + hdir + "/Documents/PredFast/prosite.dat'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
try:
os.system("mv 'PFAM' '" + hdir + "/Documents/PredFast/Machine Learning'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
def main():
print("SITE PACKAGE LOCATED HERE")
os.system("python -m site")
isoelectric=input("Drag and Drop your _init_.py file from site-packages/isoelectric/_init_.py: ")
with open("config.txt", "w+") as config1:
config1.write(isoelectric)
config1.close()
try:
os.system("mv 'config.txt' '" + hdir + "/Documents/PredFast/config.txt'")
except OSError as e:
if e.errno != errno.EEXIST:
raise
print("PredFast is now setup! Happy Protein Research!")
main()