forked from victorfica/ANARCI-PYT3-vfica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
62 lines (51 loc) · 1.73 KB
/
setup.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
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env python
# #
# Developed by James Dunbar #
# Maintained by members of OPIG #
# #
import shutil, os, subprocess, imp
# Clean this out if it exists
if os.path.isdir("build"):
shutil.rmtree("build/")
from distutils.core import setup
setup(name='anarci',
version='1.3',
description='Antibody Numbering and Receptor ClassIfication',
author='James Dunbar',
author_email='[email protected]',
url='http://opig.stats.ox.ac.uk/webapps/ANARCI',
packages=['anarci'],
package_dir={'anarci': 'lib/python/anarci'},
package_data={'anarci': ['dat/HMMs/ALL.hmm',
'dat/HMMs/ALL.hmm.h3f',
'dat/HMMs/ALL.hmm.h3i',
'dat/HMMs/ALL.hmm.h3m',
'dat/HMMs/ALL.hmm.h3p']},
#scripts=['bin/ANARCI', "bin/muscle"],
license="GPLv3"
)
####
import sys
if sys.argv[1] != "install":
sys.exit(0)
try:
ANARCI_LOC = imp.find_module("anarci")[1]
except:
sys.stderr.write("Something isn't right. Aborting.")
sys.exit(1)
os.chdir("build_pipeline")
try:
# shutil.rmtree("curated_alignments/")
# shutil.rmtree("muscle_alignments/")
# shutil.rmtree("HMMs/")
# shutil.rmtree("IMGT_sequence_files/")
os.mkdir(os.path.join(ANARCI_LOC, "dat"))
except OSError:
pass
print('Downloading germlines from IMGT and building HMMs...')
#proc = subprocess.Popen(["bash", "RUN_pipeline.sh"], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
#o, e = proc.communicate()
#print(o)
#print(e)
shutil.copy( "curated_alignments/germlines.py", ANARCI_LOC )
shutil.copytree( "HMMs", os.path.join(ANARCI_LOC, "dat/HMMs/") )