-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecompose
executable file
·45 lines (35 loc) · 1.15 KB
/
decompose
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
#!/usr/bin/env python
# -*- coding: utf-8
# Copyright (C) 2010 - 2012, A. Murat Eren
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
import os
import sys
try:
import Oligotyping
except ImportError:
import inspect
print('''
Oligotyping package seems to be missing from your PYTHONPATH. Running this may help:
export PYTHONPATH="$PYTHONPATH:%s"
''' % (os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0]))))
sys.exit()
from Oligotyping.lib.decomposer import Decomposer
from Oligotyping.utils.utils import ConfigError
from Oligotyping.utils import parsers
if __name__ == '__main__':
if '--version' in sys.argv:
print(parsers.version)
sys.exit()
parser = parsers.decomposer()
decomposer = Decomposer(parser.parse_args())
try:
decomposer.decompose()
except ConfigError as e:
print(e)
sys.exit(-1)